On Mon, Apr 28, 2025 at 12:24:13PM -0700, 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>
> ---

If there's no other feedback, this is fine. But otherwise, I think the
Makefile logic is a tad odd.
[snip]
> diff --git a/lib/Makefile b/lib/Makefile
> index 18ae0cd87bfc..ff3d8cacc0fc 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -136,6 +136,8 @@ obj-$(CONFIG_LIB_UUID) += uuid.o
>  obj-$(CONFIG_LIB_RAND) += rand.o
>  obj-y += panic.o
>  
> +obj-$(CONFIG_$(XPL_)COREBOOT_SYSINFO)        += coreboot/

I think here we should always traverse the directory on
CONFIG_VENDOR_COREBOOT (and later SYS_COREBOOT?).

[snip]
> diff --git a/lib/coreboot/Makefile b/lib/coreboot/Makefile
> new file mode 100644
> index 000000000000..0f5cb90a056e
> --- /dev/null
> +++ b/lib/coreboot/Makefile
> @@ -0,0 +1,17 @@
> +# SPDX-License-Identifier: GPL-2.0+
> +#
> +# Copyright (c) 2011 The Chromium OS Authors.
> +#
> +# (C) Copyright 2008
> +# Graeme Russ, graeme.r...@gmail.com.
> +#
> +# (C) Copyright 2006
> +# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
> +#
> +# (C) Copyright 2002
> +# Daniel Engström, Omicron Ceti AB, dan...@omicron.se.
> +
> +obj-y += cb_sysinfo.o

Then here obj-$(CONFIG_$(XPL_)COREBOOT_SYSINFO) += cb_sysinfo.o
and similar changes in later patches I suspect.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to