I recently added to my code an IDT table to attempt to add interrupts to my os. The GDT has been tested and loaded, the Page Tables have been loaded (first six megs identity mapped, and fee00000/fec00000 for APIC stuff). The stack is set up at 3 megs, expand down. The kernel is located at 0x101000 and the page tables are at 4 megs. Simics reports a page fault after enabling interrupts. Our interrupt handler "catches" it, however there is no handling yet. Adding a "read/write/execute" break in simics turns up no breaks, meaning the Page Table is not actually being accessed. On the actual test system boot, a double fault was registered instead. Anybody had this problem before?
Thanks in advance
sti/interrupt problems
extra info
We are printing the contents of cr2 and the error code along with cr3 (to make sure we are getting correct reads). The contents on these page faults are cr2=0x0, the error code off the stack is an instruction pointer, not an error code, and cr3 does equal 0x400000, or our first pml4 entry. It still does not reference the page tables, and the information gotten does not look like a page fault. What's going on?
RE:extra info
code, please. did you remember to mask the pgd/pgts values with 0x03?
Cheers\
Adrian
Cheers\
Adrian
maybe a fix
It seems there is junk in the Local APIC (maybe)...
I am writing some code to clean it out and remap, but right now... Disabling the Local APIC produces no page faults.
I am writing some code to clean it out and remap, but right now... Disabling the Local APIC produces no page faults.
Local APIC was the problem
Local APIC was the problem, and clearing and remapping it worked wonders!
Now get correct interrupts...
Now get correct interrupts...