diff options
-rw-r--r-- | sys/i386/i386/machdep.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_mib.c | 2 | ||||
-rw-r--r-- | sys/sys/sysctl.h | 8 |
3 files changed, 14 insertions, 0 deletions
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index fad1adb010a6..aa50be9f08ed 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -194,6 +194,10 @@ static void freebsd4_sendsig(sig_t catcher, ksiginfo_t *, sigset_t *mask); long Maxmem = 0; long realmem = 0; +#ifdef PAE +FEATURE(pae, "Physical Address Extensions"); +#endif + /* * The number of PHYSMAP entries must be one less than the number of * PHYSSEG entries because the PHYSMAP entry that spans the largest diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c index 04e3ed214101..30b08a257e64 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -337,6 +337,8 @@ char hostuuid[64] = "00000000-0000-0000-0000-000000000000"; SYSCTL_STRING(_kern, KERN_HOSTUUID, hostuuid, CTLFLAG_RW, hostuuid, sizeof(hostuuid), "Host UUID"); +SYSCTL_NODE(_kern, OID_AUTO, features, CTLFLAG_RD, 0, "Kernel Features"); + /* * This is really cheating. These actually live in the libc, something * which I'm not quite sure is a good idea anyway, but in order for diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 8fdc78a64219..e34602f81c32 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -322,6 +322,13 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); sysctl_add_oid(ctx, parent, nbr, name, (access), \ ptr, arg, handler, fmt, __DESCR(descr)) +/* + * A macro to generate a read-only sysctl to indicate the presense of optional + * kernel features. + */ +#define FEATURE(name, desc) \ + SYSCTL_INT(_kern_features, OID_AUTO, name, CTLFLAG_RD, 0, 1, desc) + #endif /* _KERNEL */ /* @@ -620,6 +627,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); */ extern struct sysctl_oid_list sysctl__children; SYSCTL_DECL(_kern); +SYSCTL_DECL(_kern_features); SYSCTL_DECL(_kern_ipc); SYSCTL_DECL(_kern_proc); SYSCTL_DECL(_sysctl); |