From 404c0c455c4f9ae3b1c40f8fbe8328349b6b547d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sun, 22 Nov 2020 00:47:04 +0200 Subject: cpu/x86: Link reset16.inc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: If2caab67286cf77e37928e03be4f581070e771d8 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/47968 Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- src/arch/x86/bootblock_crt0.S | 1 - src/cpu/x86/16bit/reset16.inc | 15 --------------- src/cpu/x86/Makefile.inc | 1 + src/cpu/x86/reset16.S | 14 ++++++++++++++ 4 files changed, 15 insertions(+), 16 deletions(-) delete mode 100644 src/cpu/x86/16bit/reset16.inc create mode 100644 src/cpu/x86/reset16.S (limited to 'src') diff --git a/src/arch/x86/bootblock_crt0.S b/src/arch/x86/bootblock_crt0.S index 3e9065b707..16daed1b54 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 #include #if CONFIG(BOOTBLOCK_DEBUG_SPINLOOP) diff --git a/src/cpu/x86/16bit/reset16.inc b/src/cpu/x86/16bit/reset16.inc deleted file mode 100644 index b5abb3d9ec..0000000000 --- a/src/cpu/x86/16bit/reset16.inc +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - - .section ".reset", "ax", %progbits - .code16 -.globl _start -_start: - .byte 0xe9 - .int _start16bit - ( . + 2 ) - /* Note: The above jump is hand coded to work around bugs in binutils. - * 5 byte are used for a 3 byte instruction. This works because x86 - * is little endian and allows us to use supported 32bit relocations - * instead of the weird 16 bit relocations that binutils does not - * handle consistently between versions because they are used so rarely. - */ - .previous diff --git a/src/cpu/x86/Makefile.inc b/src/cpu/x86/Makefile.inc index 393506b8e3..9112ddbe1b 100644 --- a/src/cpu/x86/Makefile.inc +++ b/src/cpu/x86/Makefile.inc @@ -9,6 +9,7 @@ ramstage-y += backup_default_smm.c 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/reset16.S b/src/cpu/x86/reset16.S new file mode 100644 index 0000000000..38580146b4 --- /dev/null +++ b/src/cpu/x86/reset16.S @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + + .section ".reset", "ax", %progbits + .code16 +.globl _start +_start: + .byte 0xe9 + .int _start16bit - ( . + 2 ) + /* Note: The above jump is hand coded to work around bugs in binutils. + * 5 byte are used for a 3 byte instruction. This works because x86 + * is little endian and allows us to use supported 32bit relocations + * instead of the weird 16 bit relocations that binutils does not + * handle consistently between versions because they are used so rarely. + */ -- cgit v1.2.3