]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeMdeModulePkg/BootScriptExecutorDxe: Replaces absolute addressing that requires...
authorerictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 16 Apr 2013 02:45:36 +0000 (02:45 +0000)
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 16 Apr 2013 02:45:36 +0000 (02:45 +0000)
Signed-off-by: Andrew Fish <afish@apple.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14279 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/S3Asm.S

index dcce6fb6aefd201fc446bb8b49ee1ccc4803e9d3..e59fd048b0b4d0ce10091254993eb743d4914c88 100644 (file)
@@ -2,7 +2,7 @@
 #   This is the assembly code for transferring to control to OS S3 waking vector\r
 #   for X64 platform\r
 #\r
-# Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials are\r
 # licensed and made available under the terms and conditions of the BSD License\r
@@ -18,14 +18,14 @@ ASM_GLOBAL ASM_PFX(AsmTransferControl)
 ASM_PFX(AsmTransferControl):\r
     # rcx S3WakingVector    :DWORD\r
     # rdx AcpiLowMemoryBase :DWORD\r
-    lea   _AsmTransferControl_al_0000, %eax \r
+    lea   _AsmTransferControl_al_0000(%rip), %eax \r
     movq  $0x2800000000, %r8 \r
     orq   %r8, %rax\r
     pushq %rax\r
     shrd  $20, %ecx, %ebx\r
     andl  $0x0f, %ecx \r
     movw  %cx, %bx\r
-    movl  %ebx, jmp_addr \r
+    movl  %ebx, jmp_addr(%rip) \r
     lret\r
 _AsmTransferControl_al_0000:\r
     .byte    0x0b8, 0x30, 0      # mov ax, 30h as selector\r
@@ -124,7 +124,7 @@ ASM_PFX(PageFaultHandlerHook):
     popq     %rcx\r
     popq     %rax                         # restore all volatile registers\r
     jnz      L1\r
-    jmpq     *ASM_PFX(mOriginalHandler)\r
+    jmpq     *ASM_PFX(mOriginalHandler)(%rip)\r
 L1:\r
     addq     $0x08, %rsp                  # skip error code for PF\r
     iretq\r