diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-02-27 22:10:02 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-02-27 22:10:02 +0000 |
commit | 2e3542540ec3bce8f78fb62f6fbf482222b67b82 (patch) | |
tree | 31daf8743b785b8f12fa80fabee0af2aadb37d2c | |
parent | 50eb83de9710a41cabc74b3105c7e5441064da5b (diff) |
more machdep sysctl support
-rw-r--r-- | sys/arch/amd64/amd64/machdep.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index 11354769f6e..528319c8e4d 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.15 2004/02/27 21:55:49 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.16 2004/02/27 22:10:01 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */ /*- @@ -172,6 +172,8 @@ paddr_t idt_paddr; vaddr_t lo32_vaddr; paddr_t lo32_paddr; +int kbd_reset; + struct vm_map *exec_map = NULL; struct vm_map *phys_map = NULL; @@ -663,6 +665,17 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) case CPU_BIOS: return bios_sysctl(name + 1, namelen - 1, oldp, oldlenp, newp, newlen, p); + case CPU_CPUVENDOR: + return (sysctl_rdstring(oldp, oldlenp, newp, cpu_vendor)); + case CPU_CPUFEATURE: + return (sysctl_rdint(oldp, oldlenp, newp, cpu_feature)); + case CPU_KBDRESET: + if (securelevel > 0) + return (sysctl_rdint(oldp, oldlenp, newp, + kbd_reset)); + else + return (sysctl_int(oldp, oldlenp, newp, newlen, + &kbd_reset)); case CPU_ALLOWAPERTURE: if (namelen != 1) return (ENOTDIR); /* overloaded */ |