It sets up a GDT with a flat address space and IDT before initializing paging.
I know I have the GDT and paging set up correctly
because I can do a lot of other things before issuing the interrupt, including printing to the screen
and detecting some hardware. However, when I try an "int $0x00" the CPU triple faults immediately.
I have tried using both logical and virtual addresses for vectors in the IDT, but neither worked.
Bochs reports the GDT and IDT like this.
Code: Select all
gdtr:base=0x00103006, limit=0x17
idtr:base=0x00102008, limit=0xff
Here are some relevant lines from Bochs' log:
Code: Select all
00079450127-d-@c01004fd-[CPU0 ] interrupt(): vector = 00, TYPE = 4, EXT = 0
00079450127-d-@c01004fd-[CPU0 ] page walk for address 0x0010300e
00079450127-d-@c01004fd-[CPU0 ] PDE: entry not present
00079450127-d-@c01004fd-[CPU0 ] page fault for address 0010300e @ c01004fd
00079450127-d-@c01004fd-[CPU0 ] exception(0x0e): error_code=0000
00079450127-d-@c01004fb-[CPU0 ] interrupt(): vector = 0e, TYPE = 3, EXT = 1
00079450127-d-@c01004fb-[CPU0 ] page walk for address 0x0010300e
00079450127-d-@c01004fb-[CPU0 ] PDE: entry not present
00079450127-d-@c01004fb-[CPU0 ] page fault for address 0010300e @ c01004fb
00079450127-d-@c01004fb-[CPU0 ] exception(0x0e): error_code=0000
00079450127-d-@c01004fb-[CPU0 ] exception(0x08): error_code=0000
00079450127-d-@c01004fb-[CPU0 ] interrupt(): vector = 08, TYPE = 3, EXT = 1
00079450127-d-@c01004fb-[CPU0 ] page walk for address 0x0010300e
00079450127-d-@c01004fb-[CPU0 ] PDE: entry not present
00079450127-d-@c01004fb-[CPU0 ] page fault for address 0010300e @ c01004fb
00079450127-d-@c01004fb-[CPU0 ] exception(0x0e): error_code=0000
but even when I put virtual addresses in my IDT it repots this.
Does anybody have an idea as to what could be going wrong?