From 53810448fc7f132def7942d40ef2c38e2ab327d2 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Wed, 26 Apr 2023 23:41:11 +0200 Subject: [PATCH] cpu/x86/reset16.S: Remove handcoded reset vector Only 3 bytes should be used for the reset vector and it looks like modern tooling has no problem with using a regular relative jump instruction. TESTED: Qemu Q35 still boots fine. Signed-off-by: Arthur Heymans Change-Id: Ie371000c60d66c032a8dcccb98e7627df09d3aa4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/74797 Tested-by: build bot (Jenkins) Reviewed-by: Elyes Haouas Reviewed-by: Matt DeVillier --- src/cpu/x86/reset16.S | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/cpu/x86/reset16.S b/src/cpu/x86/reset16.S index 38580146b4..9cc85c9746 100644 --- a/src/cpu/x86/reset16.S +++ b/src/cpu/x86/reset16.S @@ -4,11 +4,4 @@ .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. - */ + jmp _start16bit