From 0308313e07caf60ac77c416a448026c09351fe5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sun, 22 Nov 2020 00:34:13 +0200 Subject: [PATCH] cpu/x86: Link entry16.inc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I78ecd15716169b58cf6696ff8c5069ac2d5038ef Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/47967 Reviewed-by: Angel Pons Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- src/arch/x86/bootblock_crt0.S | 3 +-- src/cpu/x86/32bit/entry32.inc | 1 + src/cpu/x86/Makefile.inc | 2 ++ src/cpu/x86/{16bit/entry16.inc => entry16.S} | 8 ++++++-- 4 files changed, 10 insertions(+), 4 deletions(-) rename src/cpu/x86/{16bit/entry16.inc => entry16.S} (95%) diff --git a/src/arch/x86/bootblock_crt0.S b/src/arch/x86/bootblock_crt0.S index 387920e38a..3e9065b707 100644 --- a/src/arch/x86/bootblock_crt0.S +++ b/src/arch/x86/bootblock_crt0.S @@ -10,13 +10,12 @@ #include -.section .init._start, "ax", @progbits +.section .init, "ax", @progbits /* * Include the old code for reset vector and protected mode entry. That code has * withstood the test of time. */ -#include #include #include diff --git a/src/cpu/x86/32bit/entry32.inc b/src/cpu/x86/32bit/entry32.inc index 873a809616..b28fa2f37e 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 cd73b72fe3..393506b8e3 100644 --- a/src/cpu/x86/Makefile.inc +++ b/src/cpu/x86/Makefile.inc @@ -8,6 +8,8 @@ ramstage-y += backup_default_smm.c 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 95% rename from src/cpu/x86/16bit/entry16.inc rename to src/cpu/x86/entry16.S index 5e90da1413..1ecd6ed422 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,8 +30,10 @@ #include #include -/* 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