--- np2/i386c/ia32/interface.c 2004/03/09 18:52:12 1.18 +++ np2/i386c/ia32/interface.c 2004/03/25 08:51:24 1.20 @@ -1,4 +1,4 @@ -/* $Id: interface.c,v 1.18 2004/03/09 18:52:12 yui Exp $ */ +/* $Id: interface.c,v 1.20 2004/03/25 08:51:24 yui Exp $ */ /* * Copyright (c) 2002-2003 NONAKA Kimihiro @@ -95,6 +95,16 @@ ia32shut(void) } void +ia32a20enable(BOOL enable) +{ +#if (CPU_FAMILY == 3) + CPU_ADRSMASK = (enable)?0x00ffffff:0x00ffffff; +#else + CPU_ADRSMASK = (enable)?0xffffffff:0x00ffffff; +#endif +} + +void ia32(void) { int rv; @@ -185,10 +195,19 @@ ia32_step(void) } void CPUCALL -ia32_interrupt(int vect) +ia32_interrupt(int vect, int soft) { - INTERRUPT(vect, FALSE, FALSE, 0); +// TRACEOUT(("int (%x, %x) PE=%d VM=%d", vect, soft, CPU_STAT_PM, CPU_STAT_VM86)); + if (!soft) { + INTERRUPT(vect, FALSE, FALSE, 0); + } + else { + if (CPU_STAT_VM86 && (CPU_STAT_IOPL < CPU_IOPL3) && (soft == -1)) { + TRACEOUT(("BIOS interrupt: VM86 && IOPL < 3 && INTn")); + } + INTERRUPT(vect, TRUE, FALSE, 0); + } }