From 6a60f8cb11317bf50e28f4b8be0a99d6602191d8 Mon Sep 17 00:00:00 2001 From: rsun3 Date: Thu, 22 Jul 2010 06:29:29 +0000 Subject: [PATCH] Fix a bug in SmmBaseHelper driver that the JMP instruction which jumps to the original page fault handler is incorrect. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10681 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Compatibility/SmmBaseHelper/X64/PageFaultHandler.S | 2 +- .../Compatibility/SmmBaseHelper/X64/PageFaultHandler.asm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/X64/PageFaultHandler.S b/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/X64/PageFaultHandler.S index bcf2bd6118..5a50507353 100644 --- a/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/X64/PageFaultHandler.S +++ b/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/X64/PageFaultHandler.S @@ -40,7 +40,7 @@ ASM_PFX(PageFaultHandlerHook): popq %rcx popq %rax # restore all volatile registers jnz L1 - jmp ASM_PFX(mOriginalHandler) + jmpq *ASM_PFX(mOriginalHandler) L1: addq $0x08, %rsp # skip error code for PF iretq diff --git a/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/X64/PageFaultHandler.asm b/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/X64/PageFaultHandler.asm index 2c695e3b88..2bc6abdd2e 100644 --- a/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/X64/PageFaultHandler.asm +++ b/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/X64/PageFaultHandler.asm @@ -19,8 +19,8 @@ ; ;------------------------------------------------------------------------------ -mOriginalHandler PROTO -PageFaultHandler PROTO +EXTERN mOriginalHandler:QWORD +EXTERN PageFaultHandler:PROC .code @@ -49,4 +49,4 @@ PageFaultHandlerHook PROC add rsp, 08h ; skip error code for PF iretq PageFaultHandlerHook ENDP - END \ No newline at end of file + END