]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/sys/sysctl.h
xnu-3789.21.4.tar.gz
[apple/xnu.git] / bsd / sys / sysctl.h
index f224e999acb64d113cba2556d8e73207d65ddf10..4ccc92c7206292aac2194821cb3b91de0b846ca0 100644 (file)
@@ -281,8 +281,8 @@ int sysctl_io_opaque(struct sysctl_req *req, void *pValue, size_t valueSize, int
 void sysctl_register_oid(struct sysctl_oid *oidp);
 void sysctl_unregister_oid(struct sysctl_oid *oidp);
 
-/* Not exported */
-void sysctl_register_fixed(void);
+/* Deprecated */
+void sysctl_register_fixed(void) __deprecated;
 
 __END_DECLS
 
@@ -410,6 +410,10 @@ SYSCTL_DECL(_hw);
 SYSCTL_DECL(_machdep);
 SYSCTL_DECL(_user);
 
+#ifdef PRIVATE
+SYSCTL_DECL(_hw_features);
+#endif
+
 #endif /* KERNEL */
 
 #ifdef XNU_KERNEL_PRIVATE
@@ -521,7 +525,7 @@ SYSCTL_DECL(_user);
 #define        KERN_SPECULATIVE_READS  64      /* int: whether speculative reads are disabled */
 #define        KERN_OSVERSION          65      /* for build number i.e. 9A127 */
 #define        KERN_SAFEBOOT           66      /* are we booted safe? */
-#define        KERN_LCTX               67      /* node: login context */
+                       /*      67 was KERN_LCTX (login context) */
 #define KERN_RAGEVNODE         68
 #define KERN_TTY               69      /* node: tty settings */
 #define KERN_CHECKOPENEVT       70      /* spi: check the VOPENEVT flag on vnodes at open time */
@@ -562,30 +566,33 @@ SYSCTL_DECL(_user);
 #define KERN_TFP_POLICY_DEFAULT        2       /* Default  Mode: related ones allowed and upcall authentication */
 
 /* KERN_KDEBUG types */
-#define KERN_KDEFLAGS          1
-#define KERN_KDDFLAGS          2
-#define KERN_KDENABLE          3
-#define KERN_KDSETBUF          4
-#define KERN_KDGETBUF          5
-#define KERN_KDSETUP           6
-#define KERN_KDREMOVE          7
-#define KERN_KDSETREG          8
-#define KERN_KDGETREG          9
-#define KERN_KDREADTR          10
-#define KERN_KDPIDTR           11
-#define KERN_KDTHRMAP           12
+#define KERN_KDEFLAGS         1
+#define KERN_KDDFLAGS         2
+#define KERN_KDENABLE         3
+#define KERN_KDSETBUF         4
+#define KERN_KDGETBUF         5
+#define KERN_KDSETUP          6
+#define KERN_KDREMOVE         7
+#define KERN_KDSETREG         8
+#define KERN_KDGETREG         9
+#define KERN_KDREADTR         10
+#define KERN_KDPIDTR          11
+#define KERN_KDTHRMAP         12
 /* Don't use 13 as it is overloaded with KERN_VNODE */
-#define KERN_KDPIDEX            14
-#define KERN_KDSETRTCDEC        15
-#define KERN_KDGETENTROPY       16             /* Obsolescent */
-#define KERN_KDWRITETR         17
-#define KERN_KDWRITEMAP                18
-#define KERN_KDENABLE_BG_TRACE 19
-#define KERN_KDDISABLE_BG_TRACE        20
-#define KERN_KDREADCURTHRMAP   21
-#define KERN_KDSET_TYPEFILTER   22
-#define KERN_KDBUFWAIT         23
-#define KERN_KDCPUMAP          24
+#define KERN_KDPIDEX          14
+#define KERN_KDSETRTCDEC      15 /* obsolete */
+#define KERN_KDGETENTROPY     16 /* obsolete */
+#define KERN_KDWRITETR        17
+#define KERN_KDWRITEMAP       18
+#define KERN_KDTEST           19
+/* 20 unused */
+#define KERN_KDREADCURTHRMAP  21
+#define KERN_KDSET_TYPEFILTER 22
+#define KERN_KDBUFWAIT        23
+#define KERN_KDCPUMAP         24
+/* 25 - 26 unused */
+#define KERN_KDWRITEMAP_V3    27
+#define KERN_KDWRITETR_V3     28
 
 #define CTL_KERN_NAMES { \
        { 0, 0 }, \
@@ -655,7 +662,7 @@ SYSCTL_DECL(_user);
        { "speculative_reads_disabled", CTLTYPE_INT }, \
        { "osversion", CTLTYPE_STRING }, \
        { "safeboot", CTLTYPE_INT }, \
-       { "lctx", CTLTYPE_NODE }, \
+       { "dummy", CTLTYPE_INT },               /* deprecated: lctx */ \
        { "rage_vnode", CTLTYPE_INT }, \
        { "tty", CTLTYPE_NODE },        \
        { "check_openevt", CTLTYPE_INT }, \
@@ -681,13 +688,6 @@ SYSCTL_DECL(_user);
 #define        KERN_PROC_RUID          6       /* by real uid */
 #define        KERN_PROC_LCID          7       /* by login context id */
 
-/*
- * KERN_LCTX subtypes
- */
-#define        KERN_LCTX_ALL           0       /* everything */
-#define        KERN_LCTX_LCID          1       /* by login context id */
-
-
 #if defined(XNU_KERNEL_PRIVATE) || !defined(KERNEL) 
 /* 
  * KERN_PROC subtype ops return arrays of augmented proc structures:
@@ -735,20 +735,10 @@ struct kinfo_proc {
 #define        EPROC_SLEADER   0x02    /* session leader */
 #define        COMAPT_MAXLOGNAME       12
                char    e_login[COMAPT_MAXLOGNAME];     /* short setlogin() name */
-#if CONFIG_LCTX
-               pid_t   e_lcid;
-               int32_t e_spare[3];
-#else
                int32_t e_spare[4];
-#endif
        } kp_eproc;
 };
 
-struct kinfo_lctx {
-       pid_t   id;     /* Login Context ID */
-       int     mc;     /* Member Count */
-};
-
 #endif /* defined(XNU_KERNEL_PRIVATE) || !defined(KERNEL) */
 
 #ifdef BSD_KERNEL_PRIVATE
@@ -803,12 +793,7 @@ struct user32_kinfo_proc {
                short   e_xswrss;
                int32_t e_flag;
                char    e_login[COMAPT_MAXLOGNAME];     /* short setlogin() name */
-#if CONFIG_LCTX
-               pid_t   e_lcid;
-               int32_t e_spare[3];
-#else
                int32_t e_spare[4];
-#endif
        } kp_eproc;
 };
 struct user64_kinfo_proc {
@@ -832,12 +817,7 @@ struct user64_kinfo_proc {
                short   e_xswrss;
                int32_t e_flag;
                char    e_login[COMAPT_MAXLOGNAME];     /* short setlogin() name */
-#if CONFIG_LCTX
-               pid_t   e_lcid;
-               int32_t e_spare[3];
-#else
                int32_t e_spare[4];
-#endif
        } kp_eproc;
 };
 
@@ -1140,7 +1120,7 @@ void      sysctl_mib_init(void);
 int sysctl_int(user_addr_t, size_t *, user_addr_t, size_t, int *);
 int sysctl_quad(user_addr_t, size_t *, user_addr_t, size_t, quad_t *);
 
-void sysctl_register_all(void);
+void sysctl_early_init(void);
 
 #endif /* BSD_KERNEL_PRIVATE */
 #else  /* !KERNEL */