[PATCH 04/12] coreboot: Move coreboot logic out of x86 to a generic place

Tom Rini trini at konsulko.com
Fri Feb 21 02:06:58 CET 2025


On Thu, Feb 20, 2025 at 12:58:46PM -0800, Stephen Boyd wrote:

> Lay the groundwork to run U-Boot as a payload on ARM coreboot based
> devices. Move the coreboot table parsing code out of arch/x86 into
> lib/coreboot. The headers like cb_sysinfo.h and coreboot_tables.h need
> to be globally accessible, so move them into the top level include
> directory. Introduce helper functions like
> board_get_usable_ram_top_from_coreboot(), dram_init_from_coreboot(), and
> dram_init_banksize_from_coreboot() so that boards can still override
> these common functions while also supporting booting as a coreboot
> payload.
> 
> Signed-off-by: Stephen Boyd <swboyd at chromium.org>

I see how the abstractions get used later on. The rest of the examples
in tree today are of the form foo_dram_init / foo_dram_init_banksize, so
we should follow that form instead. And I'd be inclined, but I'd like to
hear Caleb or Simon's thoughts too, on just overloading the weak
function we already have and when we don't, #ifndef CONFIG_SYS_COREBOOT
the existing snapdragon function. I suspect we might longer term need a
bit different abstraction here to make it easier to override things when
U-Boot is a payload and getting this information elsewhere.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250220/3cd7721c/attachment.sig>


More information about the U-Boot mailing list