3 ms·
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, w
by JdeBP 1y ago
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://news.ycombinator.com/item?id=18166292
* https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/SecCore/Ia32/ResetVec.nasmb#L70 https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Sec...
* https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/ResetVector/Vtf0/ReadMe.txt https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Res...
* https://github.com/u-boot/u-boot/blob/master/arch/x86/cpu/start16.S#L47 https://github.com/u-boot/u-boot/blob/master/arch/x86/cpu/st...