Hi
In my kernel initalisation I have setup GDT and GDTR, page tables, and paging, IDT and IDTR and I have assembly wrappers ready.
Now here is where it gets strange, If I fire off an interrupt, either by hardware or with the Int instruction, when it jumps into the ISR, my CS selector's base address goes up my 0x100000 (1MB) all on it's own!!
For Example: If I'm currently executing at:
0008:0x100825 (phys: 0x100825)
And I Int to an ISR at:
0008:0x100840 (phys: 0x100840)
I end up at:
0008:0x100840 (phys: 0x200840) ???
I don't get any faults or errors, it just executes untill the end of memory!!
What could be going on?
Thanks
srg
Strange Interrupt Problem
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Strange Interrupt Problem
the stack would be overriding the GDT ? unlikely ...
what may occur is that the GDT actually holds a wrong value but you haven't reloaded CS segment since that value has been set up, so still working with the "old" base.
try replacing your "int nn" test with
and see what happens ...
what may occur is that the GDT actually holds a wrong value but you haven't reloaded CS segment since that value has been set up, so still working with the "old" base.
try replacing your "int nn" test with
Code: Select all
jmp 0x0008:.here
.here:
Re:Strange Interrupt Problem
I've added this as a small function after first setting up the GDT and I get a "Running in Bogus memory" error in bochs, I'll look at it tomorrow.Pype.Clicker wrote: the stack would be overriding the GDT ? unlikely ...
what may occur is that the GDT actually holds a wrong value but you haven't reloaded CS segment since that value has been set up, so still working with the "old" base.
try replacing your "int nn" test withand see what happens ...Code: Select all
jmp 0x0008:.here .here:
Interestingly, I didn't get this error with the interrupts,
Thanks
Re:Strange Interrupt Problem
Fixed! There was a problem with my Descriptors. I've sorted them out and it's woring beautifully
Thanks
srg
Thanks
srg