--- np2/i386c/ia32/interface.c 2008/03/22 04:03:07 1.27 +++ np2/i386c/ia32/interface.c 2012/01/24 17:17:12 1.33 @@ -1,5 +1,3 @@ -/* $Id: interface.c,v 1.27 2008/03/22 04:03:07 monaka Exp $ */ - /* * Copyright (c) 2002-2003 NONAKA Kimihiro * All rights reserved. @@ -36,9 +34,6 @@ #include "iocore.h" #include "dmax86.h" #include "bios.h" -#if defined(IA32_REBOOT_ON_PANIC) -#include "pccore.h" -#endif void @@ -50,12 +45,13 @@ ia32_initreg(void) CPU_EDX = (CPU_FAMILY << 8) | (CPU_MODEL << 4) | CPU_STEPPING; CPU_EFLAG = 2; - CPU_CR0 = CPU_CR0_CD | CPU_CR0_NW | CPU_CR0_ET; + CPU_CR0 = CPU_CR0_CD | CPU_CR0_NW; #if defined(USE_FPU) - CPU_CR0 |= CPU_CR0_EM | CPU_CR0_NE; - CPU_CR0 &= ~CPU_CR0_MP; -#else + CPU_CR0 &= ~CPU_CR0_EM; CPU_CR0 |= CPU_CR0_ET; +#else + CPU_CR0 |= CPU_CR0_EM | CPU_CR0_NE; + CPU_CR0 &= ~(CPU_CR0_MP | CPU_CR0_ET); #endif CPU_MXCSR = 0x1f80; @@ -130,14 +126,6 @@ ia32(void) break; } -#if defined(IA32_SUPPORT_DEBUG_REGISTER) - do { - exec_1step(); - if (dmac.working) { - dmax86(); - } - } while (CPU_REMCLOCK > 0); -#else if (CPU_TRAP) { do { exec_1step(); @@ -157,7 +145,6 @@ ia32(void) exec_1step(); } while (CPU_REMCLOCK > 0); } -#endif } void @@ -185,12 +172,10 @@ ia32_step(void) do { exec_1step(); -#if !defined(IA32_SUPPORT_DEBUG_REGISTER) if (CPU_TRAP) { CPU_DR6 |= CPU_DR6_BS; INTERRUPT(1, INTR_TYPE_EXCEPTION); } -#endif if (dmac.working) { dmax86(); } @@ -229,6 +214,7 @@ ia32_panic(const char *str, ...) va_end(ap); strcat(buf, "\n"); strcat(buf, cpu_reg2str()); + VERBOSE(("%s", buf)); msgbox("ia32_panic", buf);