summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-12-21 10:17:56 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2021-01-28 08:54:21 +0000
commit2289a70b6f5fa14f3e008bc6041d8a8bd4ef956b (patch)
tree6ad1858a4f11d0a05a3afb71c33c8a4396648ff9 /src/lib
parent6c7441f5e6e667b6602aa12832a52894cf06dd89 (diff)
arch/x86: Top-align .init in bootblock
Link .init section near the end of bootblock program. It contains _start16bit, gdtptr and gdt that must be addressable from realmode, thus within top 64 KiB. Change-Id: If7b9737650362ac7cd82685cfdfaf18bd2429238 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/47970 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/program.ld2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/program.ld b/src/lib/program.ld
index 3eebd6cc22..7027747bd5 100644
--- a/src/lib/program.ld
+++ b/src/lib/program.ld
@@ -13,9 +13,11 @@
.text . : {
_program = .;
_text = .;
+#if !(ENV_X86 && ENV_BOOTBLOCK)
*(.init._start);
*(.init);
*(.init.*);
+#endif
*(.text._start);
*(.text.stage_entry);
KEEP(*(.metadata_hash_anchor));