That explains a lot of things... I've added a CLI before entering long mode and now it works! The kernel successfully boots up and everything works. Thanks a lot!Octocontrabass wrote: Oh, how about that, interrupts are enabled. Did you forget to disable interrupts before switching to long mode? Some BIOS calls require interrupts to be enabled and will not disable them before returning to your code.
Debugging the OS with VirtualBox
Re: Debugging the OS with VirtualBox
Regards, Bonfra.
Re: Debugging the OS with VirtualBox
Sure enough, it's displaying them wrong. I made my kernel deliberately triple fault, and it shows my gdt entries as 16-bit as well. My gdt does not and never has contained anything but 64-bit entries, so it's definitely a bug.Octocontrabass wrote:I think it's just displaying them wrong. It shows the appropriate bits are set to put the CPU in 64-bit mode.sj95126 wrote:This pattern (data cpl0, code cpl0, data cpl3, code cpl3) matches your 64-bit GDT but apparently it thinks you've set 16-bit segments.