Esempio n. 1
0
/*
 * Reset the system.
 */
void
resetsys(void)
{

    call_req_reboot();
    printf("panic: can't reboot, halting\n");
    __asm("stop #0x2700");
}
Esempio n. 2
0
void
getbootdev(int *howto)
{
	char c, *ptr = line;

	printf("Boot: [[[%s%d%c:]%s][-acds]] :- ",
	    devsw[bdev].dv_name, bctlr + (8 * badapt), 'a' + bpart, name);

	if (tgets(line)) {
		if (strcmp(line, "reset") == 0) {
			call_req_reboot();      /* reset machine */
			printf("panic: can't reboot, halting\n");
			asm("stop #0x2700");
		}
		while ((c = *ptr) != '\0') {
			while (c == ' ')
				c = *++ptr;
			if (!c)
				return;
			if (c == '-')
				while ((c = *++ptr) && c != ' ')
					switch (c) {
					case 'a':
						*howto |= RB_ASKNAME;
						continue;
					case 'b':
						*howto |= RB_HALT;
						continue;
					case 'c':
						*howto |= RB_CONFIG;
						continue;
					case 'd':
						*howto |= RB_KDB;
						continue;
					case 's':
						*howto |= RB_SINGLE;
						continue;
					}
			else {
				name = ptr;
				while ((c = *++ptr) && c != ' ');
				if (c)
					*ptr++ = 0;
			}
		}
	} else
		printf("\n");
}
Esempio n. 3
0
File: kbd.c Progetto: MarginC/kame
void
kbdnmi()
{

	if (selected_kbd != NULL)
		(*selected_kbd->k_nmi)();

	/*
	 * 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();
}