tags:

views:

66

answers:

3

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
A: 

NO,do you think there was any interrupt tiggered?

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
but i used the "sidt" ,the base and the limit are right.how can i verfy the correctness of my Interrupt Descriptor Table?
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