Пример #1
0
void CoShutdown(int mode)
{
	if (!DisplayIsOn()) {
		DisplayInit();
	}

	DisplayString("Shutting down.\n");
	DisplayString("Done.\n");

	switch (mode) {
	case SD_WAIT:
		while (1)
			;
	case SD_OFF:
		HalShutdown();
		break;
	case SD_REBOOT:
		HalReboot();
		while (1)
			;
	default:
		while (1)
			;
	}
}
Пример #2
0
Файл: stop.c Проект: Ttech/dux
void KrnlStop(uint32_t error, uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4)
{
	if (in_stop) {
		/* Its recursive! */
		HalShutdown();
	}
	in_stop = 1;

	HalInitDisplay();
	HalDisplaySetAttr(0x4f);
	HalDisplayClear();

	HalDisplayString("An error has occured and Dux has been shutdown to prevent damage.\n\n");

	printf("STOP: %x (%x, %x, %x, %x)\n", error, arg1, arg2, arg3, arg4);
 
#ifdef DEBUG
	HalDisplayString("BREAK\n");
	HalBreak();
#else
	HalShutdown();
#endif
}