Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35822 )
Change subject: [RFC]arch/x86: Only allow normal and fallback prefix ......................................................................
[RFC]arch/x86: Only allow normal and fallback prefix
Remove the functionality to use other prefixes which requires a coreboot-stages cbfs file. Specifying the stage prefix in Kconfig and making a properly formatted coreboot-stages cbfs file is errorprone, so get rid of the functionality assuming it's mostly unused.
Change-Id: I04222120bd1241c3b0996afa27dcc35ac42fbbc8 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/Kconfig M src/arch/x86/bootblock_normal.c 2 files changed, 20 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/35822/1
diff --git a/src/Kconfig b/src/Kconfig index 8fcb3ae..baf406f 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -37,12 +37,26 @@ help Select this to prompt to use to configure the prefix for cbfs files.
+choice + prompt "CBFS prefix to use" + depends on CONFIGURABLE_CBFS_PREFIX + default CBFS_PREFIX_FALLBACK + +config CBFS_PREFIX_FALLBACK + bool "fallback" + +config CBFS_PREFIX_NORMAL + bool "normal" + +endchoice + config CBFS_PREFIX - string "CBFS prefix to use" if CONFIGURABLE_CBFS_PREFIX - default "fallback" + string + default "fallback" if !CONFIGURABLE_CBFS_PREFIX || CBFS_PREFIX_FALLBACK + default "normal" if CBFS_PREFIX_NORMAL help Select the prefix to all files put into the image. It's "fallback" - by default, "normal" is a common alternative. + by default, "normal" is the alternative.
choice prompt "Compiler to use" diff --git a/src/arch/x86/bootblock_normal.c b/src/arch/x86/bootblock_normal.c index 905ecb2..9cc99f7 100644 --- a/src/arch/x86/bootblock_normal.c +++ b/src/arch/x86/bootblock_normal.c @@ -26,7 +26,7 @@ static void main(unsigned long bist) { u8 boot_mode; - const char *default_filenames = + const char *romstage_filenames = "normal/romstage\0fallback/romstage";
if (boot_cpu()) { @@ -44,20 +44,15 @@ boot_mode = boot_use_normal(cmos_read(RTC_BOOT_BYTE)); }
- char *normal_candidate = (char *)walkcbfs("coreboot-stages"); - - if (!normal_candidate) - normal_candidate = default_filenames; - unsigned long entry;
if (boot_mode) { - entry = findstage(normal_candidate); + entry = findstage(romstage_filenames); if (entry) call(entry, bist); }
- entry = findstage(get_fallback(normal_candidate)); + entry = findstage(get_fallback(romstage_filenames)); if (entry) call(entry, bist);