On Fri, Jan 08, 2010 at 11:19:56PM -0500, Kevin O'Connor wrote:
On Mon, Jan 04, 2010 at 08:54:48PM -0500, Kevin O'Connor wrote:
On SeaBIOS, I too get "Protected mode has been entered !" followed by a call into resume with a shutdown code of "5". The code then hangs - probably because I also used freedos.
Interestingly, if I apply this change:
--- a/src/resume.c +++ b/src/resume.c @@ -29,6 +29,9 @@ void VISIBLE16 handle_resume(u8 status) { init_dma();
- pic_setup();
- asm volatile("lgdtw %cs:rombios32_gdt_48");
- asm volatile("lidtw %cs:rmode_IDT_info");
Under bochs, with the above change, the screen doesn't hang, and the test program returns to real mode. However, the system still hangs because it looks like bochs reset the f-segment. It looks like the test program triple-faults, and bochs does more than just reset the cpu in that case:
00163682527e[CPU0 ] exception(): 3rd (13) exception with no resolution, shutdown status is 05h, resetting 00163682527i[SYS ] bx_pc_system_c::Reset(HARDWARE) called 00163682527i[CPU0 ] cpu hardware reset 00163682527i[APIC0] local apic in CPU 0 initializing 00163682527i[PLGIN] reset of 'unmapped' plugin device by virtual method 00163682527i[PLGIN] reset of 'biosdev' plugin device by virtual method 00163682527i[PLGIN] reset of 'harddrv' plugin device by virtual method 00163682527i[PLGIN] reset of 'keyboard' plugin device by virtual method 00163682527i[PLGIN] reset of 'serial' plugin device by virtual method 00163682527i[PLGIN] reset of 'parallel' plugin device by virtual method 00163682527i[PLGIN] reset of 'extfpuirq' plugin device by virtual method 00163682527i[PLGIN] reset of 'gameport' plugin device by virtual method 00163682527i[PLGIN] reset of 'speaker' plugin device by virtual method 00163682527i[PLGIN] reset of 'pci_ide' plugin device by virtual method 00163936082i[BIOS ] In resume (status=5)
then FreeDOS is able to resume (I see irqs working). However, the screen is still stuck under qemu - not sure why.
I'm guessing something similar causes the video lockup on qemu.
-Kevin