diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-01-12 08:09:24 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-01-12 08:09:24 +0000 |
commit | d636bc05ab0741ce6306ed6e9cb56b2304e22ad7 (patch) | |
tree | 20d6c7ef2a569a5b6133aecd6e8cecdf7ba1aa78 /sys/arch | |
parent | 170dae2c938af5d9cb2a5aea51bce8b4c98d3eac (diff) |
a native geode reset, because quite a few geode boards without keyboard
controllers are showing up; various ok
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index bf5d19fb34c..d75abf64b9e 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.260 2004/01/06 21:09:20 tedu Exp $ */ +/* $OpenBSD: machdep.c,v 1.261 2004/01/12 08:09:23 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -271,6 +271,7 @@ int cpu_dump(void); void identifycpu(void); void init386(paddr_t); void consinit(void); +void (*cpuresetfn)(void); int bus_mem_add_mapping(bus_addr_t, bus_size_t, int, bus_space_handle_t *); @@ -1596,6 +1597,19 @@ cyrix6x86_cpu_setup(cpu_device, model, step) #endif } +#if defined(I586_CPU) || defined(I686_CPU) +void natsem6x86_cpureset(void); + +void +natsem6x86_cpureset(void) +{ + /* reset control SC1100 (datasheet page 170) */ + outl(0xCF8, 0x80009044UL); + /* system wide reset */ + outb(0xCFC, 0x0F); +} +#endif + void natsem6x86_cpu_setup(cpu_device, model, step) const char *cpu_device; @@ -1610,9 +1624,11 @@ natsem6x86_cpu_setup(cpu_device, model, step) cpu_feature &= ~CPUID_TSC; break; } + cpuresetfn = natsem6x86_cpureset; #endif } + void intel586_cpu_setup(cpu_device, model, step) const char *cpu_device; @@ -3060,6 +3076,9 @@ cpu_reset() disable_intr(); + if (cpuresetfn) + (*cpuresetfn)(); + /* Toggle the hardware reset line on the keyboard controller. */ outb(IO_KBD + KBCMDP, KBC_PULSE0); delay(100000); |