summaryrefslogtreecommitdiff
path: root/src/arch/x86/car.ld
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-05-16 13:20:18 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-05-19 11:07:35 +0000
commitcd259cb08a99812082f8bb2f7ecd23c031bb4e2d (patch)
treed5ca9afd5aa08ee5389eab1541495406dd4d023d /src/arch/x86/car.ld
parente46a9775418501ef77a646adf312975a936f0e51 (diff)
arch/x86/car.ld: Add a Kconfig param to flag AGESA brokenness
AGESA has a lot of code in the .data section (initialized data). However there is no such section in CAR stages as the code runs in XIP mode and CAR is too small to contain the data section. When the linker can not match code to a section it will just append it, which is why AGESA worked at all. Follow-up patches will attempt to fix AGESA and set Kconfig parameter to 'n'. After all AGESA sources have been fixed, this can be removed. Change-Id: I311ee17e3c0bd283692194fcee63af4449583d74 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/64387 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/arch/x86/car.ld')
-rw-r--r--src/arch/x86/car.ld5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/arch/x86/car.ld b/src/arch/x86/car.ld
index 5a46b8b2ec..4e3383cf1e 100644
--- a/src/arch/x86/car.ld
+++ b/src/arch/x86/car.ld
@@ -115,8 +115,13 @@ _rom_mtrr_base = _rom_mtrr_mask;
. = 0xffffff00;
.illegal_globals . : {
+#if CONFIG(AGESA_BROKEN_DATA_SECTION)
*(EXCLUDE_FILE ("*/libagesa.*.a:" "*/romstage*/buildOpts.o" "*/romstage*/agesawrapper.o" "*/vendorcode/amd/agesa/*" "*/vendorcode/amd/cimx/*") .data)
*(EXCLUDE_FILE ("*/libagesa.*.a:" "*/romstage*/buildOpts.o" "*/romstage*/agesawrapper.o" "*/vendorcode/amd/agesa/*" "*/vendorcode/amd/cimx/*") .data.*)
+#else
+ *(.data)
+ *(.data.*)
+#endif
}
_bogus = ASSERT((CONFIG_DCACHE_RAM_SIZE == 0) || (SIZEOF(.car.data) <= CONFIG_DCACHE_RAM_SIZE), "Cache as RAM area is too full");