Search code examples
linux-kerneloperating-systemuefi

How does LinuxBoot differs from Coreboot in the firmware phase?


I am literally confused about the use case of using LinuxBoot as the payload for Coreboot.

I learned that LinuxBoot can completely replace the UEFI's DXE and BDS phases, and then can load the bootloader (say GRUB) or even the Linux kernel directly.

Now, I also read that LinuxBoot can be used as the payload for Coreboot.

If LinuxBoot can do everything from platform initialization to loading kernel, then why would someone even put Coreboot in the sequence? Simply, why the use case of using LinuxBoot as Coreboot's payload exists? What role will Coreboot play?


Solution

  • UEFI consists of multiple phases: SEC, PEI and DXE. LinuxBoot replaces the DXE phase, Coreboot replaces the SEC and PEI phases.

    Coreboot is responsible for the platform initialization that cannot be done by Linux, such as DRAM initialization (it is also called "training") and ACPI table generation. Linux then works as a Coreboot payload, which does things such as PCI device enumeration, and loads the bootloader or can kexec() into another Linux kernel.