Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

No, unreal mode was not the state at reset, at least as far as I know (my knowledge of the details ends around the time of the 3rd-generation i7.) Disassembling from the reset vector of any reset BIOS can confirm/deny whether that's still the case; notably, InsydeH2O BIOS enters unreal mode in around a dozen instructions from the reset vector.


Yes, it is; as I explained back in 2018. It's documented in the IA manuals, and indeed in the AMD manuals. The segment descriptors start off in unreal mode, which is changed at the first far jump that loads CS.

TianoCore does a near jump after a couple of NOPs, because there's a whole 64KiB of space for unreal mode code to do the setup for entering the SEC phase, and it does a modicum of setup in unreal mode finding the boot firmware volume and indeed the SEC phase code.

u-boot does not take as much advantage of the available space, changing directly from unreal mode to flat model 32-bit protected mode within a few instructions of the initial near jump.

* https://news.ycombinator.com/item?id=18166292

* https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Sec...

* https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Res...

* https://github.com/u-boot/u-boot/blob/master/arch/x86/cpu/st...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: