diff options
author | flipk <flipk@cvs.openbsd.org> | 1997-09-28 16:49:42 +0000 |
---|---|---|
committer | flipk <flipk@cvs.openbsd.org> | 1997-09-28 16:49:42 +0000 |
commit | 13ef2b932d9ebc78d20e9de6d3f0c831f892c4df (patch) | |
tree | 7965da7915b1b7271d24dfd74b8223aed10abe49 /sys/arch/i386 | |
parent | df774c69493aa7441abd8c9c24df3b8979289758 (diff) |
cpu_reset() changes, inspired by netbsd
be damned if i can find netbsd's commit msg, tho..
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 35f185a1e09..5b0c8ef62a4 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.52 1997/09/24 22:28:15 niklas Exp $ */ +/* $OpenBSD: machdep.c,v 1.53 1997/09/28 16:49:41 flipk Exp $ */ /* $NetBSD: machdep.c,v 1.202 1996/05/18 15:54:59 christos Exp $ */ /*- @@ -1406,18 +1406,22 @@ cpu_reset() { struct region_descriptor region; + disable_intr(); + /* Toggle the hardware reset line on the keyboard controller. */ outb(KBCMDP, KBC_PULSE0); - delay(20000); + delay(100000); outb(KBCMDP, KBC_PULSE0); - delay(20000); + delay(100000); /* * Try to cause a triple fault and watchdog reset by setting the * IDT to point to nothing. */ - setregion(®ion, 0, 0); + bzero((caddr_t)idt, sizeof(idt)); + setregion(®ion, idt, sizeof(idt) - 1); lidt(®ion); + __asm __volatile("divl %0,%1" : : "q" (0), "a" (0)); /* * Try to cause a triple fault and watchdog reset by unmapping the |