[edk2-devel] [PATCH] UefiCpuPkg/CpuDxe: Fix boot error
Dong, Eric
eric.dong at intel.com
Thu Dec 3 07:08:47 UTC 2020
Reviewed-by: Eric Dong <eric.dong at intel.com>
-----Original Message-----
From: Guo Dong <guo.dong at intel.com>
Sent: Thursday, December 3, 2020 5:39 AM
To: devel at edk2.groups.io
Cc: Dong, Eric <eric.dong at intel.com>; Ni, Ray <ray.ni at intel.com>; lersek at redhat.com; Kumar, Rahul1 <rahul1.kumar at intel.com>
Subject: [edk2-devel] [PATCH] UefiCpuPkg/CpuDxe: Fix boot error
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3084
When DXE drivers are dispatched above 4GB memory and the system is already in 64bit mode, the address setCodeSelectorLongJump in stack will be override by parameter. so change to use 64bit address and jump to qword address.
Signed-off-by: Guo Dong <guo.dong at intel.com>
---
UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm b/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm
index c3489bcc3e..6ad32b49f4 100644
--- a/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm
+++ b/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm
@@ -23,8 +23,8 @@ ASM_PFX(SetCodeSelector):
sub rsp, 0x10
lea rax, [setCodeSelectorLongJump]
mov [rsp], rax
- mov [rsp+4], cx
- jmp dword far [rsp]
+ mov [rsp+8], cx
+ jmp qword far [rsp]
setCodeSelectorLongJump:
add rsp, 0x10
ret
--
2.16.2.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68223): https://edk2.groups.io/g/devel/message/68223
Mute This Topic: https://groups.io/mt/78671060/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list