summaryrefslogtreecommitdiffstats
path: root/src/mainboard/google/peach_pit/romstage.c
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2021-05-29 08:10:49 +0200
committerFelix Held <felix-coreboot@felixheld.de>2023-11-09 13:20:18 +0000
commita2bc2540c2d004b475b401ccf0b162c2452857bb (patch)
tree902284670b43d9e06d7dccc64dbeec24073fca4e /src/mainboard/google/peach_pit/romstage.c
parent4ce52f622ed7fbac4bf5545fd7d39256203cdefe (diff)
downloadcoreboot-a2bc2540c2d004b475b401ccf0b162c2452857bb.tar.gz
coreboot-a2bc2540c2d004b475b401ccf0b162c2452857bb.tar.bz2
coreboot-a2bc2540c2d004b475b401ccf0b162c2452857bb.zip
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/mainboard/google/peach_pit/romstage.c')
-rw-r--r--src/mainboard/google/peach_pit/romstage.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mainboard/google/peach_pit/romstage.c b/src/mainboard/google/peach_pit/romstage.c
index 5a4863d79a91..e38d1cb2cecd 100644
--- a/src/mainboard/google/peach_pit/romstage.c
+++ b/src/mainboard/google/peach_pit/romstage.c
@@ -202,6 +202,7 @@ static void simple_spi_test(void)
#define simple_spi_test()
#endif
+#if CONFIG(SEPARATE_ROMSTAGE)
void main(void)
{
timestamp_init(timestamp_get());
@@ -210,10 +211,11 @@ void main(void)
/*
* From the clocks comment below it looks like serial console won't
* work in the bootblock so keep in the romstage_main flow even with
- * !CONFIG SEPARATE_ROMSTAGE.
+ * !CONFIG(SEPARATE_ROMSTAGE).
*/
romstage_main();
}
+#endif
void __noreturn romstage_main(void)
{