summaryrefslogtreecommitdiff
path: root/src/arch/x86/car.ld
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2019-11-05 00:46:01 +0100
committerPatrick Georgi <pgeorgi@google.com>2020-12-02 10:41:00 +0000
commitc27628e2b7e89fd7e1f7ca3863fc6ef3209f4666 (patch)
treea5e8a7bcac4eb5b237edb896ed3b642674820afd /src/arch/x86/car.ld
parent2aa15872d2468c6244d4c4a1dd0a325a2c9002e9 (diff)
downloadcoreboot-c27628e2b7e89fd7e1f7ca3863fc6ef3209f4666.tar.xz
arch/x86/car.ld: Check for out of bound on no-XIP stages
Check that stages running in CAR have their start and end in CAR. Change-Id: I292aacce564c23d9ae21aa46c5e2f8784fa6a609 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36623 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/arch/x86/car.ld')
-rw-r--r--src/arch/x86/car.ld4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/arch/x86/car.ld b/src/arch/x86/car.ld
index 641d8923bf..c291efb13c 100644
--- a/src/arch/x86/car.ld
+++ b/src/arch/x86/car.ld
@@ -117,3 +117,7 @@ _bogus = ASSERT((CONFIG_DCACHE_RAM_SIZE == 0) || (SIZEOF(.car.data) <= CONFIG_DC
_bogus2 = ASSERT(_pagetables == ALIGN(_pagetables, 4096), "_pagetables aren't 4KiB aligned");
#endif
_bogus3 = ASSERT(CONFIG_DCACHE_BSP_STACK_SIZE > 0x0, "BSP stack size not configured");
+#if CONFIG(NO_XIP_EARLY_STAGES) && (ENV_ROMSTAGE || ENV_VERSTAGE)
+_bogus4 = ASSERT(_eprogram <= _car_region_end, "Stage end too high !");
+_bogus5 = ASSERT(_program >= _car_unallocated_start, "Stage start too low!");
+#endif