diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/arc/arc/machdep.c | 6 | ||||
-rw-r--r-- | sys/arch/arc/dev/pccons.c | 20 |
2 files changed, 23 insertions, 3 deletions
diff --git a/sys/arch/arc/arc/machdep.c b/sys/arch/arc/arc/machdep.c index b500f40273e..610404c01e3 100644 --- a/sys/arch/arc/arc/machdep.c +++ b/sys/arch/arc/arc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.27 1997/05/18 13:45:21 pefo Exp $ */ +/* $OpenBSD: machdep.c,v 1.28 1997/05/19 16:01:09 pefo Exp $ */ /* * Copyright (c) 1988 University of Utah. * Copyright (c) 1992, 1993 @@ -38,7 +38,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 8.3 (Berkeley) 1/12/94 - * $Id: machdep.c,v 1.27 1997/05/18 13:45:21 pefo Exp $ + * $Id: machdep.c,v 1.28 1997/05/19 16:01:09 pefo Exp $ */ /* from: Utah Hdr: machdep.c 1.63 91/04/24 */ @@ -105,6 +105,7 @@ extern void makebootdev __P((char *)); extern void stacktrace __P((void)); extern void configure __P((void)); extern void pmap_bootstrap __P((vm_offset_t)); +extern int kbc_8042sysreset __P((void)); /* the following is used externally (sysctl_hw) */ char machine[] = "arc"; /* cpu "architecture" */ @@ -1141,6 +1142,7 @@ boot(howto) dumpsys(); printf("System restart.\n"); delay(2000000); + (void)kbc_8042sysreset(); /* Try this first */ __asm__(" li $2, 0xbfc00000; jr $2; nop\n"); while(1); /* Forever */ } diff --git a/sys/arch/arc/dev/pccons.c b/sys/arch/arc/dev/pccons.c index cfb1359cc40..58a057f54da 100644 --- a/sys/arch/arc/dev/pccons.c +++ b/sys/arch/arc/dev/pccons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccons.c,v 1.14 1997/04/19 17:19:53 pefo Exp $ */ +/* $OpenBSD: pccons.c,v 1.15 1997/05/19 16:01:07 pefo Exp $ */ /* $NetBSD: pccons.c,v 1.89 1995/05/04 19:35:20 cgd Exp $ */ /*- @@ -157,6 +157,7 @@ void pc_xmode_on __P((void)); void pc_xmode_off __P((void)); static u_char kbc_get8042cmd __P((void)); static int kbc_put8042cmd __P((u_char)); +int kbc_8042sysreset __P((void)); int kbd_cmd __P((u_char, u_char)); static __inline int kbd_wait_output __P((void)); static __inline int kbd_wait_input __P((void)); @@ -287,6 +288,23 @@ kbd_flush_input() } + +/* + * Pass system reset command to keyboard controller (8042). + */ +int +kbc_8042sysreset() +{ + + if (!kbd_wait_output()) + return 0; + outb(kbd_cmdp, 0xd1); + if (!kbd_wait_output()) + return 0; + outb(kbd_datap, 0); /* ZAP */ + return 1; +} + #if 1 /* * Get the current command byte. |