From 15c9c78057f35c05af4ebf348b1f737baf3ef5c8 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Thu, 25 Nov 2021 09:39:02 +0100 Subject: [PATCH] oprom/realmode/x86.c: Fix building for ENV_X86_64 Not tested on hardware. Change-Id: I8ce8d56da326aeff5ff9b400ded02d4309372519 Signed-off-by: Arthur Heymans Signed-off-by: Elyes HAOUAS Reviewed-on: https://review.coreboot.org/c/coreboot/+/59660 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/device/oprom/realmode/x86.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/device/oprom/realmode/x86.c b/src/device/oprom/realmode/x86.c index 224e49b97d..b391b92ee0 100644 --- a/src/device/oprom/realmode/x86.c +++ b/src/device/oprom/realmode/x86.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -89,14 +90,19 @@ static int intXX_exception_handler(void) .edi=X86_EDI, .vector=M.x86.intno, .error_code=0, // FIXME: fill in - .eip=X86_EIP, .cs=X86_CS, +#if ENV_X86_64 + .rip=X86_EIP, + .rflags=X86_EFLAGS +#else + .eip=X86_EIP, .eflags=X86_EFLAGS +#endif }; struct eregs *regs = ®_info; printk(BIOS_INFO, "Oops, exception %d while executing option rom\n", - regs->vector); + (uint32_t)regs->vector); x86_exception(regs); // Call coreboot exception handler return 0; // Never really returns