sti/interrupt problems

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Page Faults

sti/interrupt problems

Post by Page Faults »

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
Page faults

extra info

Post by Page faults »

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?
Adek336

RE:extra info

Post by Adek336 »

code, please. did you remember to mask the pgd/pgts values with 0x03?

Cheers\
Adrian
No Page Faults?

maybe a fix

Post by No Page Faults? »

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.
No More Page Faults!

Local APIC was the problem

Post by No More Page Faults! »

Local APIC was the problem, and clearing and remapping it worked wonders!

Now get correct interrupts...
Post Reply