Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47968 )
Change subject: cpu/x86: Link reset16.inc
......................................................................
cpu/x86: Link reset16.inc
Change-Id: If2caab67286cf77e37928e03be4f581070e771d8
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
M src/arch/x86/bootblock_crt0.S
M src/cpu/x86/Makefile.inc
R src/cpu/x86/reset16.S
3 files changed, 1 insertion(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/47968/1
diff --git a/src/arch/x86/bootblock_crt0.S b/src/arch/x86/bootblock_crt0.S
index a457978..d151feb 100644
--- a/src/arch/x86/bootblock_crt0.S
+++ b/src/arch/x86/bootblock_crt0.S
@@ -16,7 +16,6 @@
* Include the old code for reset vector and protected mode entry. That code has
* withstood the test of time.
*/
-#include <cpu/x86/16bit/reset16.inc>
#include <cpu/x86/32bit/entry32.inc>
#if CONFIG(BOOTBLOCK_DEBUG_SPINLOOP)
diff --git a/src/cpu/x86/Makefile.inc b/src/cpu/x86/Makefile.inc
index 8862e87..f1bca0e 100644
--- a/src/cpu/x86/Makefile.inc
+++ b/src/cpu/x86/Makefile.inc
@@ -6,6 +6,7 @@
subdirs-$(CONFIG_CPU_INTEL_COMMON_SMM) += ../intel/smm
bootblock-y += entry16.S
+bootblock-y += reset16.S
additional-dirs += $(obj)/cpu/x86
diff --git a/src/cpu/x86/16bit/reset16.inc b/src/cpu/x86/reset16.S
similarity index 97%
rename from src/cpu/x86/16bit/reset16.inc
rename to src/cpu/x86/reset16.S
index b5abb3d..3858014 100644
--- a/src/cpu/x86/16bit/reset16.inc
+++ b/src/cpu/x86/reset16.S
@@ -12,4 +12,3 @@
* instead of the weird 16 bit relocations that binutils does not
* handle consistently between versions because they are used so rarely.
*/
- .previous
--
To view, visit https://review.coreboot.org/c/coreboot/+/47968
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If2caab67286cf77e37928e03be4f581070e771d8
Gerrit-Change-Number: 47968
Gerrit-PatchSet: 1
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: newchange
Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47967 )
Change subject: cpu/x86: Link entry16.inc
......................................................................
cpu/x86: Link entry16.inc
TBD: Address SPDX license header
Change-Id: I78ecd15716169b58cf6696ff8c5069ac2d5038ef
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
M src/arch/x86/bootblock_crt0.S
M src/cpu/x86/32bit/entry32.inc
M src/cpu/x86/Makefile.inc
R src/cpu/x86/entry16.S
M src/lib/program.ld
5 files changed, 10 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/47967/1
diff --git a/src/arch/x86/bootblock_crt0.S b/src/arch/x86/bootblock_crt0.S
index 10a8763..a457978 100644
--- a/src/arch/x86/bootblock_crt0.S
+++ b/src/arch/x86/bootblock_crt0.S
@@ -16,7 +16,6 @@
* Include the old code for reset vector and protected mode entry. That code has
* withstood the test of time.
*/
-#include <cpu/x86/16bit/entry16.inc>
#include <cpu/x86/16bit/reset16.inc>
#include <cpu/x86/32bit/entry32.inc>
diff --git a/src/cpu/x86/32bit/entry32.inc b/src/cpu/x86/32bit/entry32.inc
index 873a809..b28fa2f 100644
--- a/src/cpu/x86/32bit/entry32.inc
+++ b/src/cpu/x86/32bit/entry32.inc
@@ -13,6 +13,7 @@
*/
.align 4
+.globl __protected_start
__protected_start:
/* Save the BIST value */
movl %eax, %ebp
diff --git a/src/cpu/x86/Makefile.inc b/src/cpu/x86/Makefile.inc
index 2f789f7..8862e87 100644
--- a/src/cpu/x86/Makefile.inc
+++ b/src/cpu/x86/Makefile.inc
@@ -5,6 +5,8 @@
subdirs-$(CONFIG_CPU_INTEL_COMMON_SMM) += ../intel/smm
+bootblock-y += entry16.S
+
additional-dirs += $(obj)/cpu/x86
SIPI_ELF=$(obj)/cpu/x86/sipi_vector.elf
diff --git a/src/cpu/x86/16bit/entry16.inc b/src/cpu/x86/entry16.S
similarity index 94%
rename from src/cpu/x86/16bit/entry16.inc
rename to src/cpu/x86/entry16.S
index 5e90da1..7043aab 100644
--- a/src/cpu/x86/16bit/entry16.inc
+++ b/src/cpu/x86/entry16.S
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+
/*
* This software and ancillary information (herein called SOFTWARE)
* called LinuxBIOS is made available under the terms described here.
@@ -28,10 +30,11 @@
#include <arch/rom_segs.h>
#include <cpu/x86/post_code.h>
-/* Symbol _start16bit must be aligned to 4kB to start AP CPUs with
- * Startup IPI message without RAM.
+.section ".init._start", "ax", @progbits
+
+/* Symbol _start16bit must reachable from the reset vector, and be aligned to
+ * 4kB to start AP CPUs with Startup IPI message without RAM.
*/
-.align 4096
.code16
.globl _start16bit
.type _start16bit, @function
diff --git a/src/lib/program.ld b/src/lib/program.ld
index 457a20a..98e88e2 100644
--- a/src/lib/program.ld
+++ b/src/lib/program.ld
@@ -16,6 +16,7 @@
*(.text._start);
*(.text.stage_entry);
KEEP(*(.id.keep));
+ *(.init._start);
*(.init);
*(.text);
*(.text.*);
--
To view, visit https://review.coreboot.org/c/coreboot/+/47967
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I78ecd15716169b58cf6696ff8c5069ac2d5038ef
Gerrit-Change-Number: 47967
Gerrit-PatchSet: 1
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: newchange