Page 1 of 1

Triple fault with RSP > 1MB

Posted: Tue Sep 29, 2015 12:19 pm
by spectrum
I have the same issue.

In my case bochs crash and the message is:

00017908527e[CPU0 ] interrupt(long mode): IDT entry extended attributes DWORD4 TYPE != 0
00017908527e[CPU0 ] interrupt(long mode): IDT entry extended attributes DWORD4 TYPE != 0
00017908527e[CPU0 ] interrupt(long mode): IDT entry extended attributes DWORD4 TYPE != 0
00017908527i[CPU0 ] CPU is in long mode (active)
00017908527i[CPU0 ] CS.mode = 64 bit
00017908527i[CPU0 ] SS.mode = 64 bit

It happens olnly if after entering long mode i set rsp to a value > 1MB.

Re: Strange error after moving to 64-bit

Posted: Tue Sep 29, 2015 12:33 pm
by BASICFreak
Taking over a thread? Not to mention it is (nearly) 6 years old...

Either way not enough info...
Do you have A20 enabled, if not only odd MBs are available.

Re: Strange error after moving to 64-bit

Posted: Tue Sep 29, 2015 12:50 pm
by Roman
spectrum wrote:It happens olnly if after entering long mode i set rsp to a value > 1MB.
Does any other memory access to >1MiB cause a crash? Do you have proper page tables for the memory you use? If you use C, the stack also must be properly aligned.

Re: Strange error after moving to 64-bit

Posted: Tue Sep 29, 2015 3:42 pm
by SpyderTL
Bochs is telling you the problem.

The fourth DWORD of each 64-bit IDT must be zero. The interrupt that is occurring has a value other than zero in that entry, making it invalid. You may get this if you are trying to use a 32-bit IDT structure in 64-bit.

Make sure you have created a whole new 64-bit IDT and reloaded it with the LIDT instruction before enabling interrupts in 64-bit mode.

You can find the 64-bit IDT structure here: Interrupt Descriptor Table