I'm writing a binary that runs in an early phase of the boot process. To be specific, a multiboot2-compliant kernel, that runs in 64-bit (AMD64/x86_64) mode after GRUBs handoff (GRUB is my bootloader). To debug and test my code, I thought of writing values to registers and execute a hlt. Afterwards, I can view the register values in QEMU. Surprisingly, my hlt-instructions are ignored/skipped and register values like in eax are not what I expect them to be. I don't understand why, because when I use a multiboot2-header that instructs GRUB to do a 32-bit multiboot2 handoff, it works. What's going on here?