From 6f372c6474f049cec6086316a097c471f4959a53 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 7 Aug 2025 02:32:51 -0400 Subject: kernel: sysctl: Report 'hw.*' variables Signed-off-by: Ian Moffett --- sys/include/sys/sysctl.h | 9 +++++++++ sys/include/sys/systm.h | 1 + 2 files changed, 10 insertions(+) (limited to 'sys/include') diff --git a/sys/include/sys/sysctl.h b/sys/include/sys/sysctl.h index 2b1ebb6..0086847 100644 --- a/sys/include/sys/sysctl.h +++ b/sys/include/sys/sysctl.h @@ -39,12 +39,21 @@ #endif #include +/* + * List of 'kern.* ' identifiers + */ #define KERN_OSTYPE 0 #define KERN_OSRELEASE 1 #define KERN_VERSION 2 #define KERN_VCACHE_TYPE 3 #define KERN_HOSTNAME 4 +/* + * List of 'hw.* ' identifiers + */ +#define HW_PAGESIZE 5 +#define HW_NCPU 6 + /* * Option types (i.e., int, string, etc) for * sysctl entries. diff --git a/sys/include/sys/systm.h b/sys/include/sys/systm.h index 42e1723..2f69175 100644 --- a/sys/include/sys/systm.h +++ b/sys/include/sys/systm.h @@ -39,6 +39,7 @@ int copyin(const void *uaddr, void *kaddr, size_t len); int copyout(const void *kaddr, void *uaddr, size_t len); int copyinstr(const void *uaddr, char *kaddr, size_t len); +int cpu_report_count(uint32_t count); __always_inline static inline void __sigraise(int signo) -- cgit v1.2.3