From 33a68e467606e3f82626418bb12ace4915fe01ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Tue, 8 Dec 2020 19:14:58 +0200 Subject: [PATCH] arch/x86: Move .id section higher MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The (now removed) ID_SECTION_OFFSET=0x80 was actually the secondary address flashrom and FILO are looking for. The primary was 0x10, just below .reset. If .id does not collide with .fit_pointer, use the higher of the two locations. Change-Id: I0d3a58c82efd3bbf94f4bc80ec5bbc97d5b1c109 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/48499 Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- src/arch/x86/bootblock.ld | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/arch/x86/bootblock.ld b/src/arch/x86/bootblock.ld index ad9c2efaa1..479259fcbe 100644 --- a/src/arch/x86/bootblock.ld +++ b/src/arch/x86/bootblock.ld @@ -19,14 +19,19 @@ SECTIONS { .id (.): { KEEP(*(.id)); } - _ID_SECTION = 0xffffff80 - SIZEOF(.id); - . = 0xffffffc0; + /* Flashrom and FILO have two alternatives for the location of .id section. */ + _ID_SECTION_END = SIZEOF(.fit_pointer) && SIZEOF(.id) > 0x28 ? 0xffffff80 : _X86_RESET_VECTOR; + _ID_SECTION = _ID_SECTION_END - SIZEOF(.id); + + . = _FIT_POINTER; .fit_pointer (.): { KEEP(*(.fit_pointer)); } + _FIT_POINTER = SIZEOF(.fit_pointer) ? 0xffffffc0 : _X86_RESET_VECTOR; . = 0xfffffff0; + _X86_RESET_VECTOR = .; .reset . : { *(.reset); . = 15;