INTEL X86 Platform. My programme run start at 2M absolute address in protected mode,everything seems ok, but when i enable interrupt with "sti", the CPU will restart. Why? is there any necessary initialization before "enbale interrupt"? i have setup the idtptr, but it seems no work.
A:
Do you have interrupt handlers that will work in protected mode?
Michael Burr
2010-03-23 07:09:27
A:
The CPU is probably triple-faulting, which happens when an exception occurs while processing a double-fault. When a CPU triple faults, it resets.
This is probably causes by an incorrectly setup Interrupt Descriptor Table.
The OSDev Wiki has a good article that may help you here: http://wiki.osdev.org/Interrupt_Descriptor_Table
Charlie Somerville
2010-03-23 09:32:50
but i used the "sidt" ,the base and the limit are right.how can i verfy the correctness of my Interrupt Descriptor Table?
2010-03-24 07:15:25
It's a tricky thing and I'm not an expert on protected mode interrupts. Your best bet is to ask on the OSDev forums at http://forum.osdev.org
Charlie Somerville
2010-03-24 08:08:36