
Hi,
On Tue, 8 Mar 2022 at 06:57, Heinrich Schuchardt xypron.glpk@gmx.de wrote:
On 3/8/22 13:59, Ahamed Husni wrote:
Hi everyone,
I am trying to work on a project to port the U-Boot UEFI code to coreboot as a payload. I haven't worked with UEFI before except running a basic EFI payload in a coreboot/u-boot environment. (Serial output: https://gist.github.com/drac98/6166d29f6c3a2baf2f4e791925ea98d3)
I would like to know how UEFI is implemented in U-Boot. Is UEFI integrated into u-boot or is it implemented like a payload?
Hello Ahamed,
the UEFI API implementation is an integral part of U-Boot.
Where is the UEFI source code? Is it the following files in the tree https://source.denx.de/u-boot/custodians/u-boot-efi lib/ |__ efi/ |__ efi_driver/ |__ efi_loader/
U-Boot can both be run on top of UEFI. This is the code you find in /lib/efi/. Furthermore UEFI can run as a firmware providing the UEFI API. This is what you find in /lib/efi_loader/ and /lib/efi_driver/.
You can build U-Boot as payload for coreboot which offers the UEFI API implementation. See configs/coreboot64_defconfig.
U-Boot runs ARM and RISC-V Linux successfully via UEFI.
What architecture are you looking at?
Simon (on CC) has been working on U-Boot on UEFI and Coreboot while I have concentrated on the UEFI API implementation in U-Boot.
Yes you can use U-Boot as a coreboot payload - this is now running in CI so we make sure it works on each release. I plan to add more test cases to it but have been waiting to see if coreboot can add something similar to its CI.
+Stefan Reinauer as we have been talking about this
It seems better to go that way than trying to duplicate efforts. We have a program now to move UEFI to use driver model properly, for example.
Regards, Simon