diff options
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/x86/bootblock.ld | 34 | ||||
-rw-r--r-- | src/arch/x86/id.ld | 8 | ||||
-rw-r--r-- | src/arch/x86/memlayout.ld | 8 |
3 files changed, 35 insertions, 15 deletions
diff --git a/src/arch/x86/bootblock.ld b/src/arch/x86/bootblock.ld new file mode 100644 index 0000000000..12f932c2dc --- /dev/null +++ b/src/arch/x86/bootblock.ld @@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +gdtptr16_offset = gdtptr16 & 0xffff; +nullidt_offset = nullidt & 0xffff; + +/* Symbol _start16bit must be aligned to 4kB to start AP CPUs with + * Startup IPI message without RAM. + */ +#if CONFIG(SIPI_VECTOR_IN_ROM) +_bogus = ASSERT((_start16bit & 0xfff) == 0, "Symbol _start16bit is not at 4 KiB boundary"); +ap_sipi_vector_in_rom = (_start16bit >> 12) & 0xff; +#endif + +SECTIONS { + /* Trigger an error if I have an unusable start address */ + _bogus = ASSERT(_start16bit >= 0xffff0000, "_start16bit too low. Please report."); + + . = (0xffffffff - CONFIG_ID_SECTION_OFFSET) - (__id_end - __id_start) + 1; + .id (.): { + KEEP(*(.id)); + } + + . = 0xffffffc0; + .fit_pointer (.): { + KEEP(*(.fit_pointer)); + } + + . = 0xfffffff0; + .reset . : { + *(.reset); + . = 15; + BYTE(0x00); + } +} diff --git a/src/arch/x86/id.ld b/src/arch/x86/id.ld deleted file mode 100644 index b69a8dc1a5..0000000000 --- a/src/arch/x86/id.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -SECTIONS { - . = (0xffffffff - CONFIG_ID_SECTION_OFFSET) - (__id_end - __id_start) + 1; - .id (.): { - KEEP(*(.id)) - } -} diff --git a/src/arch/x86/memlayout.ld b/src/arch/x86/memlayout.ld index cbf887cc1c..52694fa360 100644 --- a/src/arch/x86/memlayout.ld +++ b/src/arch/x86/memlayout.ld @@ -39,11 +39,5 @@ SECTIONS } #if ENV_BOOTBLOCK -/* Bootblock specific scripts which provide more SECTION directives. */ -#include <cpu/x86/16bit/entry16.ld> -#include <cpu/x86/16bit/reset16.ld> -#include <arch/x86/id.ld> -#if CONFIG(CPU_INTEL_FIRMWARE_INTERFACE_TABLE) -#include <cpu/intel/fit/fit.ld> -#endif +#include <arch/x86/bootblock.ld> #endif /* ENV_BOOTBLOCK */ |