QEMU OVMF kernel stuck in reboot loop. Works on Legacy Bios
Posted: Fri May 07, 2021 1:45 pm
I have a very simple higher half long mode kernel.
When I load this kernel using grub on a UEFI BIOS (QEMU OVMF) right after I press enter on the grub boot screen, it hangs for ~5 seconds, and then restarts at the TianoCore logo.
When I load it using a Legacy BIOS (QEMU default bios) it runs as expected (hangs forever)
I have determined (using jmp $) that this problem lies between the call instruction that calls my kernel main function, and the body of my kernel main function. I have absolutely no idea what this problem could be, and have been trying to figure it out for a few days now. Here is the github URL: https://github.com/wireboy5/64bitOS
Here are the versions of the software I am using:
grub-mkrescue 2.04-1ubuntu26.7
x86_64-elf-g++ (GCC) 10.2.0
GNU ld (GNU Binutils) 2.35
qemu x86_64 4.2.1
Any help or pointers on how I should solve this problem would be greatly appreciated.
Thank you for your consideration.
When I load this kernel using grub on a UEFI BIOS (QEMU OVMF) right after I press enter on the grub boot screen, it hangs for ~5 seconds, and then restarts at the TianoCore logo.
When I load it using a Legacy BIOS (QEMU default bios) it runs as expected (hangs forever)
I have determined (using jmp $) that this problem lies between the call instruction that calls my kernel main function, and the body of my kernel main function. I have absolutely no idea what this problem could be, and have been trying to figure it out for a few days now. Here is the github URL: https://github.com/wireboy5/64bitOS
Here are the versions of the software I am using:
grub-mkrescue 2.04-1ubuntu26.7
x86_64-elf-g++ (GCC) 10.2.0
GNU ld (GNU Binutils) 2.35
qemu x86_64 4.2.1
Any help or pointers on how I should solve this problem would be greatly appreciated.
Thank you for your consideration.