From: erictian Date: Tue, 16 Apr 2013 02:45:36 +0000 (+0000) Subject: MdeMdeModulePkg/BootScriptExecutorDxe: Replaces absolute addressing that requires... X-Git-Tag: edk2-stable201903~12596 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=d9a1844ed39a9ccea94e3526e1fad332c8bd96ff MdeMdeModulePkg/BootScriptExecutorDxe: Replaces absolute addressing that requires a relocation entry with PC relative addressing that does not require a relocation entry. This patch is required to make this file assemble and link with Xcode Signed-off-by: Andrew Fish Reviewed-by: Feng Tian Reviewed-by: Liming Gao git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14279 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/S3Asm.S b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/S3Asm.S index dcce6fb6ae..e59fd048b0 100644 --- a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/S3Asm.S +++ b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/S3Asm.S @@ -2,7 +2,7 @@ # This is the assembly code for transferring to control to OS S3 waking vector # for X64 platform # -# Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
# # This program and the accompanying materials are # licensed and made available under the terms and conditions of the BSD License @@ -18,14 +18,14 @@ ASM_GLOBAL ASM_PFX(AsmTransferControl) ASM_PFX(AsmTransferControl): # rcx S3WakingVector :DWORD # rdx AcpiLowMemoryBase :DWORD - lea _AsmTransferControl_al_0000, %eax + lea _AsmTransferControl_al_0000(%rip), %eax movq $0x2800000000, %r8 orq %r8, %rax pushq %rax shrd $20, %ecx, %ebx andl $0x0f, %ecx movw %cx, %bx - movl %ebx, jmp_addr + movl %ebx, jmp_addr(%rip) lret _AsmTransferControl_al_0000: .byte 0x0b8, 0x30, 0 # mov ax, 30h as selector @@ -124,7 +124,7 @@ ASM_PFX(PageFaultHandlerHook): popq %rcx popq %rax # restore all volatile registers jnz L1 - jmpq *ASM_PFX(mOriginalHandler) + jmpq *ASM_PFX(mOriginalHandler)(%rip) L1: addq $0x08, %rsp # skip error code for PF iretq