Dear folks and techpriests,
the more I want to contribute and learn about low-level-code the
less I understand, it seems.
- cb switches the CPU immediately to Protected Mode, yet
Payloads like seaBIOS work in Real Mode. Does coreboot switch
the CPU always back to RM before jumping to the payload?
- When CB switches to PM - who generates and administrates the
Page Tables and where?
Duarte writes that GRUB switches from protected mode to
real mode and vice versa all the time to address >1MiB of RAM
and also use the BIOS-calls. If this is true using GRUB as
payload would not work, as GRUB needs to call the non-existent
- Once CB is in PM it can't access physical addresses anymore?
It doesn't need to, too?
- PM means RAM-access is only possible through virtual addresses
which are translated by the MMU using the Page Tables. This
question is similar to [2.]: If coreboot generates the Page
Tables and the payload would start in PM as well (is this even
possible? At least the Linux-Kernel has entry points for RM and
PM) this would mean the payload needs to use the Page Tables
generated by CB. That wouldn't be a problem as they're linked in
the register CR3 anyways?
And an unimportant bonus question:
- Why does every modern CPU still start in RM? I do get the
compatibility problem, but on the other hand: Do you need it for
anything beside booting MS-DOS on your Ryzen? Is it really
impossible for AMD and Intel to create a new CPU-generation with
the x86-instruction set without RM, 16-bit-registers and
20-bit-mode registers like CS, SS etc. No modern OS uses bios
calls. No CPU is ever switched to RM again after booting up.
They should get rid of this old stuff.
Would be cool if someone could put this in its true light.