diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2021-05-29 08:10:49 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-11-09 13:20:18 +0000 |
commit | a2bc2540c2d004b475b401ccf0b162c2452857bb (patch) | |
tree | 902284670b43d9e06d7dccc64dbeec24073fca4e /src/console | |
parent | 4ce52f622ed7fbac4bf5545fd7d39256203cdefe (diff) |
Allow to build romstage sources inside the bootblock
Having a separate romstage is only desirable:
- with advanced setups like vboot or normal/fallback
- boot medium is slow at startup (some ARM SOCs)
- bootblock is limited in size (Intel APL 32K)
When this is not the case there is no need for the extra complexity
that romstage brings. Including the romstage sources inside the
bootblock substantially reduces the total code footprint. Often the
resulting code is 10-20k smaller.
This is controlled via a Kconfig option.
TESTED: works on qemu x86, arm and aarch64 with and without VBOOT.
Change-Id: Id68390edc1ba228b121cca89b80c64a92553e284
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55068
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/console')
-rw-r--r-- | src/console/Kconfig | 1 | ||||
-rw-r--r-- | src/console/init.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/console/Kconfig b/src/console/Kconfig index 8efe2e4799..84eb9f971d 100644 --- a/src/console/Kconfig +++ b/src/console/Kconfig @@ -2,6 +2,7 @@ menu "Console" config NO_BOOTBLOCK_CONSOLE bool + depends on SEPARATE_ROMSTAGE config BOOTBLOCK_CONSOLE bool "Enable early (bootblock) console output." diff --git a/src/console/init.c b/src/console/init.c index 8918dcff6d..3b89326c7f 100644 --- a/src/console/init.c +++ b/src/console/init.c @@ -9,7 +9,7 @@ #include <option.h> #include <version.h> -#define FIRST_CONSOLE (ENV_BOOTBLOCK || (CONFIG(NO_BOOTBLOCK_CONSOLE) && ENV_ROMSTAGE)) +#define FIRST_CONSOLE (ENV_BOOTBLOCK || (CONFIG(NO_BOOTBLOCK_CONSOLE) && ENV_SEPARATE_ROMSTAGE)) static int console_inited; static int console_loglevel; @@ -53,7 +53,7 @@ void console_init(void) if (CONFIG(DEBUG_CONSOLE_INIT)) console_inited = 1; - if (CONFIG(EARLY_PCI_BRIDGE) && (ENV_BOOTBLOCK || ENV_ROMSTAGE)) + if (CONFIG(EARLY_PCI_BRIDGE) && (ENV_BOOTBLOCK || ENV_SEPARATE_ROMSTAGE)) pci_early_bridge_init(); console_hw_init(); |