diff options
author | Naresh Solanki <naresh.solanki@9elements.com> | 2023-12-08 16:58:52 +0530 |
---|---|---|
committer | Lean Sheng Tan <sheng.tan@9elements.com> | 2023-12-14 14:21:33 +0000 |
commit | 933d2b0f1317aeba74d5005b1d177a507aae0847 (patch) | |
tree | a37b8ee8f79b331d47307fbcfc84e1fb9bc460b0 | |
parent | 18c83e1a9431e8d98a8ca54e3eb82d7f1884c434 (diff) |
lib: ramdetect: Add Kconfig PROBE_RAM
Previously ramdetect.c was compiled only for VENDOR_EMULATION.
Hence add Kconfig option PROBE_RAM which allows board outside
the scope of VENDOR_EMULATION to select and utilize probe_ram
function to runtime detect usable RAM in emulation environment.
PROBE_RAM is default selected if VENDOR_EMULATION is set so
that existing boards under VENDOR_EMULATION scope are not
affected.
Other boards can explicitly select PROBE_RAM to use probe_ram.
TEST=Build mb/arm/rdn2 with PROBE_RAM selected & make sure
there is no any error.
Also checked qemu-aarch64 build to make sure build is success.
Change-Id: Id909ddaee6958cfa8a6c263a11f9a90d94710aa7
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79450
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
-rw-r--r-- | src/lib/Kconfig | 6 | ||||
-rw-r--r-- | src/lib/Makefile.inc | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/Kconfig b/src/lib/Kconfig index 23647947a4..80efe75dc9 100644 --- a/src/lib/Kconfig +++ b/src/lib/Kconfig @@ -143,3 +143,9 @@ config DECOMPRESS_OFAST default y help Compile the decompressing function in -Ofast instead of standard -Os + +config PROBE_RAM + def_bool y if VENDOR_EMULATION + help + When enabled it will be possible to detect usable RAM using probe_ram + function. diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index 0f4600813b..fd3f464ffd 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -83,7 +83,7 @@ verstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c verstage-$(CONFIG_GENERIC_UDELAY) += timer.c verstage-$(CONFIG_GENERIC_GPIO_LIB) += gpio.c -romstage-$(CONFIG_VENDOR_EMULATION) += ramdetect.c +romstage-$(CONFIG_PROBE_RAM) += ramdetect.c romstage-y += prog_loaders.c romstage-y += prog_ops.c romstage-y += memchr.c @@ -129,7 +129,7 @@ endif romstage-$(CONFIG_GENERIC_UDELAY) += timer.c -ramstage-$(CONFIG_VENDOR_EMULATION) += ramdetect.c +ramstage-$(CONFIG_PROBE_RAM) += ramdetect.c ramstage-y += prog_loaders.c ramstage-y += prog_ops.c ramstage-y += hardwaremain.c @@ -183,7 +183,7 @@ ramstage-y += cbmem_common.c ramstage-y += imd_cbmem.c ramstage-y += imd.c -postcar-$(CONFIG_VENDOR_EMULATION) += ramdetect.c +postcar-$(CONFIG_PROBE_RAM) += ramdetect.c postcar-y += cbmem_common.c postcar-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c postcar-y += imd_cbmem.c |