In kbdnmi(), after we have cleared the interrupt condition, reset

the machine, rather than simply returning to the assembly NMI handler.
Previously, the assembly handler would simply jump back to begin:, which
would frob the stack, and re-clear the BSS.  However, this is not sufficient,
as there may be state in initialized data that must be restored.  Thus,
the only reasonable solution is to re-load the boot block.
This commit is contained in:
thorpej 1997-05-12 07:51:32 +00:00
parent c25bfe1365
commit eac0352a9e
1 changed files with 11 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kbd.c,v 1.1 1997/04/14 19:00:11 thorpej Exp $ */
/* $NetBSD: kbd.c,v 1.2 1997/05/12 07:51:32 thorpej Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -67,7 +67,16 @@ kbdnmi()
if (selected_kbd != NULL)
(*selected_kbd->k_nmi)();
printf("\nboot interrupted\n");
/*
* This is the only reasonable thing to do, unfortunately.
* Simply restarting the boot block by frobbing the stack and
* jumping to begin: doesn't properly reset variables that
* are in the data segment.
*/
printf("\nboot interrupted, resetting...\n");
DELAY(1000000);
call_req_reboot();
}
void