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 <swb...@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
signature.asc
Description: PGP signature