diff options
Diffstat (limited to 'sys')
| -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 4f170932b31b..9489753f9ade 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -194,6 +194,10 @@ static void freebsd4_sendsig(sig_t catcher, int sig, sigset_t *mask, long Maxmem = 0; long realmem = 0; +#ifdef PAE +FEATURE(pae, "Physical Address Extensions"); +#endif + #define PHYSMAP_SIZE (2 * 16) vm_paddr_t phys_avail[PHYSMAP_SIZE + 2]; diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c index 16755d477ed1..319651060722 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -302,6 +302,8 @@ SYSCTL_STRING(_kern, KERN_NISDOMAINNAME, domainname, CTLFLAG_RW, u_long hostid; SYSCTL_ULONG(_kern, KERN_HOSTID, hostid, CTLFLAG_RW, &hostid, 0, "Host ID"); +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 26ccb9dbb3d3..951c191a1686 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -305,6 +305,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 */ /* @@ -597,6 +604,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(_sysctl); SYSCTL_DECL(_vm); SYSCTL_DECL(_vfs); |
