My kernel boots into protected mode with GRUB, the multiboot spec says "Bit 17 (VM) must be cleared. Bit 9 (IF) must be cleared. All other bits are undefined".
Since I think I should set the other bits manually, but which bits and to what value should I set them?
For example, I think I need to set the IOPL bits to 00.
Setting EFLAGS after booting
Re: Setting EFLAGS after booting
For most things, you can just set all bits zero. Just
after setting up the stack. This initializes all the spec forgot to mention. It clears VM and IF and IOPL and DF. And then you can work from there.
Code: Select all
push $0
popfd
Carpe diem!