My GDTR (0x508) looks like this:
Code: Select all
0508: 9F0010050000
Code: Select all
0510: 00000000 00000000 FFFF0000 009ACF00
0520: FFFF0000 0093CF00 00000000 00000000
Everything was going well until I enabled interrupts (STI). As soon as I enable interrupts I start getting Stack Segment Fault exceptions when I try to call a C subroutine.
Before enabling interrupts %CS = 0x10 and %ESP = 0x07FFD0.
After enabling interrupts and calling a C function I get a Stack Segment Fault. In the exception handler %SS = 0x10 and %ESP = 0x07FF84.
To my way of thinking all of these values fall well within the limits of my data segment. I can't figure out why I am getting a Stack Segment Fault.
Any help is appreciated.