Exemple #1
0
call_panic_shell (void)
{
	int d;
	static bool flag_free = false, flag_shell = false;
	ulong cr0;

	if (config.vmm.panic_reboot) {
		ttylog_copy_to_panicmem ();
		mm_flush_wb_cache ();
		usleep (1000000);
		asm_rdcr0 (&cr0);
		cr0 = (cr0 & ~CR0_NW_BIT) | CR0_CD_BIT;
		asm_wridtr (0, 0);
		asm_wrcr0 (cr0);
		asm_wbinvd ();
		do_panic_reboot ();
	}
	if (!flag_free) {
		flag_free = true;
		mm_force_unlock ();
		mm_free_panicmem ();
	}
	d = panic_process;
	if (d >= 0 && config.vmm.shell && !flag_shell &&
	    currentcpu->panic.shell_ready) {
		flag_shell = true;
		debug_msgregister ();
		ttylog_stop ();
		msgsendint (d, 0);
	}
	printf ("%s\n", panicmsg);
	freeze ();
}
Exemple #2
0
static void
do_reboot (void)
{
	acpi_reset ();
	rebooting = true;
	/*
	asm_outb (0x70, 0x0F);
	asm_outb (0x71, 0x00);
	asm_outb (0x70, 0x00);
	asm_outb (0x64, 0xFE);
	*/
	if (apic_available ()) {
		usleep (1 * 1000000);
		printf ("shutdown\n");
		asm_wridtr (0, 0);
		asm volatile ("int3");
	} else {
Exemple #3
0
static void
do_reboot (void)
{
	call_initfunc ("panic"); /* for disabling VT-x */
	acpi_reset ();
	rebooting = true;
	/*
	asm_outb (0x70, 0x0F);
	asm_outb (0x71, 0x00);
	asm_outb (0x70, 0x00);
	asm_outb (0x64, 0xFE);
	*/
	if (apic_available ()) {
		usleep (1 * 1000000);
		printf ("shutdown\n");
		asm_wridtr (0, 0);
		asm volatile ("int3");
	} else {