Can't use interrupts after returning to realmode under Bochs
Posted: Sun Mar 02, 2008 12:42 pm
I'm trying to set a video mode by returning to real-mode and issuing an interrupt.
It works well under all VMs I've tried, but Bochs just hangs in the interrupt handler without returning. I also get the following line spammed in the logfile:
io write to address 00000000, len=2
The steps I've taken to return to real-mode are:
0) cli
1) copy some 16-bit code to a low address
2) far-jump to that code on a 16-bit, 64k-limit code segment
3) clear first bit of cr0
4) far-jump to the next instruction
5) set proper real-mode segment register values
5) reset IDT & GDT to the real-mode defaults
6) set proper real-mode segment register values again (don't know if it's needed)
7) issue an interrupt
I'll appreciate it if anyone points out any mistakes I've made or any Bochs-gotchas that could be causing this behaviour. Thanks
It works well under all VMs I've tried, but Bochs just hangs in the interrupt handler without returning. I also get the following line spammed in the logfile:
io write to address 00000000, len=2
The steps I've taken to return to real-mode are:
0) cli
1) copy some 16-bit code to a low address
2) far-jump to that code on a 16-bit, 64k-limit code segment
3) clear first bit of cr0
4) far-jump to the next instruction
5) set proper real-mode segment register values
5) reset IDT & GDT to the real-mode defaults
6) set proper real-mode segment register values again (don't know if it's needed)
7) issue an interrupt
I'll appreciate it if anyone points out any mistakes I've made or any Bochs-gotchas that could be causing this behaviour. Thanks