Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47971 )
Change subject: arch/x86: Top-align .text in bootblock ......................................................................
arch/x86: Top-align .text in bootblock
Change-Id: I64325bd633e1104853cfb928c7f801d94ff3045a Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/arch/x86/Kconfig M src/arch/x86/bootblock.ld 2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/47971/1
diff --git a/src/arch/x86/Kconfig b/src/arch/x86/Kconfig index f4ddd20..1ec0390 100644 --- a/src/arch/x86/Kconfig +++ b/src/arch/x86/Kconfig @@ -184,6 +184,9 @@ hex default 0x10000
+config FIXED_BOOTBLOCK_SIZE + bool + # Default address romstage is to be linked at config ROMSTAGE_ADDR hex diff --git a/src/arch/x86/bootblock.ld b/src/arch/x86/bootblock.ld index bb22413..52bccfc 100644 --- a/src/arch/x86/bootblock.ld +++ b/src/arch/x86/bootblock.ld @@ -14,6 +14,11 @@ SECTIONS { . = _ebootblock - CONFIG_C_ENV_BOOTBLOCK_SIZE;
+#if !CONFIG(FIXED_BOOTBLOCK_SIZE) + . = BOOTBLOCK_TOP - PROGRAM_SZ; + . = ALIGN(16); +#endif + _bootblock = .;
INCLUDE "bootblock/lib/program.ld" @@ -32,6 +37,7 @@ * may cause the total size of a section to change when the start * address gets applied. */ + PROGRAM_SZ = SIZEOF(.text) + 32; EARLYASM_SZ = SIZEOF(.init) + (CONFIG(SIPI_VECTOR_IN_ROM) ? 4096 : 16);
. = ID_SECTION;