From e8de46808a7d2426116de79cdf2aeab43d5a5537 Mon Sep 17 00:00:00 2001 From: AJFISH Date: Thu, 24 Sep 2009 21:48:45 +0000 Subject: [PATCH] Fixed issues compiling for Apple gcc on IA-32 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9310 6f19259b-4bc3-4df7-8a09-765794883524 --- .../SimpleFileSystem/SimpleFileSystem.h | 2 +- .../Foundation/Include/EfiStdArg.h | 22 + .../Foundation/Include/Ia32/EfiBind.h | 2 + .../Foundation/Include/X64/EfiBind.h | 2 + .../Library/CompilerStub/CompilerStubLib.inf | 20 +- .../Library/BaseLib/X64/CpuBreakpoint.S | 52 +-- .../EdkIIGlueLib/Library/BaseLib/X64/CpuId.S | 124 +++--- .../Library/BaseLib/X64/CpuIdEx.S | 126 +++--- .../Library/BaseLib/X64/CpuPause.S | 2 +- .../Library/BaseLib/X64/CpuSleep.S | 2 +- .../Library/BaseLib/X64/DisableInterrupts.S | 2 +- .../Library/BaseLib/X64/DisablePaging64.S | 132 +++--- .../BaseLib/X64/EnableDisableInterrupts.S | 72 +-- .../Library/BaseLib/X64/EnableInterrupts.S | 70 +-- .../Library/BaseLib/X64/EnablePaging64.S | 122 +++--- .../Library/BaseLib/X64/FlushCacheLine.S | 72 +-- .../Library/BaseLib/X64/FxRestore.S | 70 +-- .../EdkIIGlueLib/Library/BaseLib/X64/FxSave.S | 70 +-- .../X64/InterlockedCompareExchange32.S | 2 +- .../X64/InterlockedCompareExchange64.S | 76 ++-- .../BaseLib/X64/InterlockedDecrement.S | 72 +-- .../BaseLib/X64/InterlockedIncrement.S | 72 +-- .../EdkIIGlueLib/Library/BaseLib/X64/Invd.S | 70 +-- .../Library/BaseLib/X64/LongJump.S | 2 +- .../Library/BaseLib/X64/Monitor.S | 2 +- .../EdkIIGlueLib/Library/BaseLib/X64/Mwait.S | 2 +- .../Library/BaseLib/X64/ReadCr0.S | 2 +- .../Library/BaseLib/X64/ReadCr2.S | 2 +- .../Library/BaseLib/X64/ReadCr3.S | 2 +- .../Library/BaseLib/X64/ReadCr4.S | 2 +- .../EdkIIGlueLib/Library/BaseLib/X64/ReadCs.S | 2 +- .../Library/BaseLib/X64/ReadDr0.S | 2 +- .../Library/BaseLib/X64/ReadDr1.S | 2 +- .../Library/BaseLib/X64/ReadDr2.S | 2 +- .../Library/BaseLib/X64/ReadDr3.S | 2 +- .../Library/BaseLib/X64/ReadDr4.S | 2 +- .../Library/BaseLib/X64/ReadDr5.S | 2 +- .../Library/BaseLib/X64/ReadDr6.S | 2 +- .../Library/BaseLib/X64/ReadDr7.S | 2 +- .../EdkIIGlueLib/Library/BaseLib/X64/ReadDs.S | 2 +- .../Library/BaseLib/X64/ReadEflags.S | 2 +- .../EdkIIGlueLib/Library/BaseLib/X64/ReadEs.S | 2 +- .../EdkIIGlueLib/Library/BaseLib/X64/ReadFs.S | 2 +- .../Library/BaseLib/X64/ReadGdtr.S | 2 +- .../EdkIIGlueLib/Library/BaseLib/X64/ReadGs.S | 2 +- .../Library/BaseLib/X64/ReadIdtr.S | 2 +- .../Library/BaseLib/X64/ReadLdtr.S | 2 +- .../Library/BaseLib/X64/ReadMm0.S | 2 +- .../Library/BaseLib/X64/ReadMm1.S | 2 +- .../Library/BaseLib/X64/ReadMm2.S | 2 +- .../Library/BaseLib/X64/ReadMm3.S | 2 +- .../Library/BaseLib/X64/ReadMm4.S | 2 +- .../Library/BaseLib/X64/ReadMm5.S | 2 +- .../Library/BaseLib/X64/ReadMm6.S | 2 +- .../Library/BaseLib/X64/ReadMm7.S | 2 +- .../Library/BaseLib/X64/ReadMsr64.S | 2 +- .../Library/BaseLib/X64/ReadPmc.S | 2 +- .../EdkIIGlueLib/Library/BaseLib/X64/ReadSs.S | 2 +- .../EdkIIGlueLib/Library/BaseLib/X64/ReadTr.S | 2 +- .../Library/BaseLib/X64/ReadTsc.S | 2 +- .../Library/BaseLib/X64/SetJump.S | 84 ++-- .../Library/BaseLib/X64/SwitchStack.S | 88 ++-- .../EdkIIGlueLib/Library/BaseLib/X64/Wbinvd.S | 2 +- .../Library/BaseLib/X64/WriteCr0.S | 72 +-- .../Library/BaseLib/X64/WriteCr2.S | 72 +-- .../Library/BaseLib/X64/WriteCr3.S | 72 +-- .../Library/BaseLib/X64/WriteCr4.S | 72 +-- .../Library/BaseLib/X64/WriteDr0.S | 2 +- .../Library/BaseLib/X64/WriteDr1.S | 2 +- .../Library/BaseLib/X64/WriteDr2.S | 2 +- .../Library/BaseLib/X64/WriteDr3.S | 2 +- .../Library/BaseLib/X64/WriteDr4.S | 72 +-- .../Library/BaseLib/X64/WriteDr5.S | 72 +-- .../Library/BaseLib/X64/WriteDr6.S | 72 +-- .../Library/BaseLib/X64/WriteDr7.S | 72 +-- .../Library/BaseLib/X64/WriteGdtr.S | 70 +-- .../Library/BaseLib/X64/WriteIdtr.S | 70 +-- .../Library/BaseLib/X64/WriteLdtr.S | 70 +-- .../Library/BaseLib/X64/WriteMm0.S | 70 +-- .../Library/BaseLib/X64/WriteMm1.S | 70 +-- .../Library/BaseLib/X64/WriteMm2.S | 70 +-- .../Library/BaseLib/X64/WriteMm3.S | 70 +-- .../Library/BaseLib/X64/WriteMm4.S | 70 +-- .../Library/BaseLib/X64/WriteMm5.S | 70 +-- .../Library/BaseLib/X64/WriteMm6.S | 70 +-- .../Library/BaseLib/X64/WriteMm7.S | 70 +-- .../Library/BaseLib/X64/WriteMsr64.S | 78 ++-- .../Library/EfiCommonLib/X64/EfiCopyMemRep1.S | 132 +++--- .../Library/EfiCommonLib/X64/EfiSetMemRep4.S | 108 ++--- .../Library/EfiCommonLib/X64/EfiZeroMemRep4.S | 90 ++-- .../Library/Pei/PeiLib/Ia32/ProcessorAsms.S | 414 +++++++++--------- .../Library/Pei/PeiLib/Ipf/PioFlush.s | 2 +- .../Library/Pei/PeiLib/X64/ProcessorAsms.S | 270 ++++++------ .../Library/Pei/PeiLib/X64/SupportItpDebug.S | 156 +++---- .../EfiRuntimeLib/Ia32/CpuFlushCache.S | 122 +++--- .../RuntimeDxe/EfiRuntimeLib/Ipf/EsalLib.s | 2 +- .../EfiRuntimeLib/X64/RuntimeLibAsm.S | 74 ++-- .../Foundation/Library/Thunk16/Ia32/Thunk16.S | 2 +- .../Foundation/Library/Thunk16/X64/Fx.S | 94 ++-- 99 files changed, 2216 insertions(+), 2186 deletions(-) diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/SimpleFileSystem/SimpleFileSystem.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/SimpleFileSystem/SimpleFileSystem.h index 04cfaa5fc7..f16ce39875 100644 --- a/EdkCompatibilityPkg/Foundation/Efi/Protocol/SimpleFileSystem/SimpleFileSystem.h +++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/SimpleFileSystem/SimpleFileSystem.h @@ -110,7 +110,7 @@ EFI_STATUS // #define EFI_FILE_MODE_READ 0x0000000000000001 #define EFI_FILE_MODE_WRITE 0x0000000000000002 -#define EFI_FILE_MODE_CREATE 0x8000000000000000 +#define EFI_FILE_MODE_CREATE 0x8000000000000000ULL // // File attributes diff --git a/EdkCompatibilityPkg/Foundation/Include/EfiStdArg.h b/EdkCompatibilityPkg/Foundation/Include/EfiStdArg.h index d125cedac7..989b87326b 100644 --- a/EdkCompatibilityPkg/Foundation/Include/EfiStdArg.h +++ b/EdkCompatibilityPkg/Foundation/Include/EfiStdArg.h @@ -60,6 +60,25 @@ Abstract: #define _EFI_INT_SIZE_OF(n) ((sizeof (n) + sizeof (UINTN) - 1) &~(sizeof (UINTN) - 1)) +#if defined(__GNUC__) +// +// Use GCC built-in macros for variable argument lists. +// + +/// +/// Variable used to traverse the list of arguments. This type can vary by +/// implementation and could be an array or structure. +/// +typedef __builtin_va_list VA_LIST; + +#define VA_START(Marker, Parameter) __builtin_va_start (Marker, Parameter) + +#define VA_ARG(Marker, TYPE) ((sizeof (TYPE) < sizeof (UINTN)) ? (TYPE)(__builtin_va_arg (Marker, UINTN)) : (TYPE)(__builtin_va_arg (Marker, TYPE))) + +#define VA_END(Marker) __builtin_va_end (Marker) + +#else + // // Also support coding convention rules for var arg macros // @@ -70,6 +89,9 @@ typedef CHAR8 *VA_LIST; #define VA_ARG(ap, t) (*(t *) ((ap += _EFI_INT_SIZE_OF (t)) - _EFI_INT_SIZE_OF (t))) #define VA_END(ap) (ap = (VA_LIST) 0) +#endif + + #endif #endif diff --git a/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h b/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h index 5cfbb74131..12d7154d0b 100644 --- a/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h +++ b/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h @@ -83,7 +83,9 @@ Abstract: // // Make sure we are useing the correct packing rules per EFI specification // +#ifndef __GNUC__ #pragma pack() +#endif #if __INTEL_COMPILER // diff --git a/EdkCompatibilityPkg/Foundation/Include/X64/EfiBind.h b/EdkCompatibilityPkg/Foundation/Include/X64/EfiBind.h index a0ab02b838..14eca7a301 100644 --- a/EdkCompatibilityPkg/Foundation/Include/X64/EfiBind.h +++ b/EdkCompatibilityPkg/Foundation/Include/X64/EfiBind.h @@ -35,7 +35,9 @@ Abstract: // // Make sure we are useing the correct packing rules per EFI specification // +#ifndef __GNUC__ #pragma pack() +#endif #if __INTEL_COMPILER // diff --git a/EdkCompatibilityPkg/Foundation/Library/CompilerStub/CompilerStubLib.inf b/EdkCompatibilityPkg/Foundation/Library/CompilerStub/CompilerStubLib.inf index fdfb0af8e1..646c298754 100644 --- a/EdkCompatibilityPkg/Foundation/Library/CompilerStub/CompilerStubLib.inf +++ b/EdkCompatibilityPkg/Foundation/Library/CompilerStub/CompilerStubLib.inf @@ -26,16 +26,20 @@ COMPONENT_TYPE = LIBRARY [sources.common] [sources.ia32] - Ia32\memcpyRep1.asm - Ia32\memsetRep4.asm -# Ia32\memcpy.asm -# Ia32\memset.asm + Ia32/memcpyRep1.asm | MSFT + Ia32/memcpyRep1.asm | INTEL + Ia32/memsetRep4.asm | MSFT + Ia32/memsetRep4.asm | INTEL + memcpy.c | GCC + memset.c | GCC [sources.x64] - x64\memcpyRep1.asm - x64\memsetRep4.asm -# x64\memcpy.asm -# x64\memset.asm + x64/memcpyRep1.asm | MSFT + x64/memcpyRep1.asm | INTEL + x64/memsetRep4.asm | MSFT + x64/memsetRep4.asm | INTEL + memcpy.c | GCC + memset.c | GCC [sources.Ipf] memcpy.c diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuBreakpoint.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuBreakpoint.S index ec9a750e63..4dd033342b 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuBreakpoint.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuBreakpoint.S @@ -1,26 +1,26 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# CpuBreakpoint.S -# -# Abstract: -# -# Implementation of CpuBreakpoint() on x86_64 -# -#------------------------------------------------------------------------------ -#include - -.global ASM_PFX(CpuBreakpoint) -ASM_PFX(CpuBreakpoint): - int $0x3 - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# CpuBreakpoint.S +# +# Abstract: +# +# Implementation of CpuBreakpoint() on x86_64 +# +#------------------------------------------------------------------------------ +#include + +.globl ASM_PFX(CpuBreakpoint) +ASM_PFX(CpuBreakpoint): + int $0x3 + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuId.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuId.S index 8bf4b2b729..df1a4084fb 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuId.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuId.S @@ -1,62 +1,62 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# CpuId.S -# -# Abstract: -# -# AsmCpuid function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmCpuid ( -# IN UINT32 RegisterInEax, -# OUT UINT32 *RegisterOutEax OPTIONAL, -# OUT UINT32 *RegisterOutEbx OPTIONAL, -# OUT UINT32 *RegisterOutEcx OPTIONAL, -# OUT UINT32 *RegisterOutEdx OPTIONAL -# ) -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmCpuid) -ASM_PFX(AsmCpuid): - push %rbx - mov %ecx, %eax - push %rax # save Index on stack - push %rdx - cpuid - test %r9, %r9 - jz L1 - mov %ecx, (%r9) -L1: - pop %rcx - jrcxz L2 - mov %eax, (%rcx) -L2: - mov %r8, %rcx - jrcxz L3 - mov %ebx, (%rcx) -L3: - mov 0x38(%rsp), %rcx - jrcxz L4 - mov %edx, (%rcx) -L4: - pop %rax # restore Index to rax as return value - pop %rbx - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# CpuId.S +# +# Abstract: +# +# AsmCpuid function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmCpuid ( +# IN UINT32 RegisterInEax, +# OUT UINT32 *RegisterOutEax OPTIONAL, +# OUT UINT32 *RegisterOutEbx OPTIONAL, +# OUT UINT32 *RegisterOutEcx OPTIONAL, +# OUT UINT32 *RegisterOutEdx OPTIONAL +# ) +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmCpuid) +ASM_PFX(AsmCpuid): + push %rbx + mov %ecx, %eax + push %rax # save Index on stack + push %rdx + cpuid + test %r9, %r9 + jz L1 + mov %ecx, (%r9) +L1: + pop %rcx + jrcxz L2 + mov %eax, (%rcx) +L2: + mov %r8, %rcx + jrcxz L3 + mov %ebx, (%rcx) +L3: + mov 0x38(%rsp), %rcx + jrcxz L4 + mov %edx, (%rcx) +L4: + pop %rax # restore Index to rax as return value + pop %rbx + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuIdEx.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuIdEx.S index a40be32285..83dd077343 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuIdEx.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuIdEx.S @@ -1,63 +1,63 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# CpuIdEx.Asm -# -# Abstract: -# -# AsmCpuidEx function -# -# Notes: -# -#------------------------------------------------------------------------------ -#include - -#------------------------------------------------------------------------------ -# UINT32 -# EFIAPI -# AsmCpuidEx ( -# IN UINT32 RegisterInEax, -# IN UINT32 RegisterInEcx, -# OUT UINT32 *RegisterOutEax OPTIONAL, -# OUT UINT32 *RegisterOutEbx OPTIONAL, -# OUT UINT32 *RegisterOutEcx OPTIONAL, -# OUT UINT32 *RegisterOutEdx OPTIONAL -# ) -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmCpuidEx) -ASM_PFX(AsmCpuidEx): - push %rbx - movl %ecx,%eax - movl %edx,%ecx - push %rax - cpuid - mov 0x38(%rsp), %r10 - test %r10, %r10 - jz L1 - mov %ecx,(%r10) -L1: - mov %r8, %rcx - jrcxz L2 - movl %eax,(%rcx) -L2: - mov %r9, %rcx - jrcxz L3 - mov %ebx, (%rcx) -L3: - mov 0x40(%rsp), %rcx - jrcxz L4 - mov %edx, (%rcx) -L4: - pop %rax - pop %rbx - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# CpuIdEx.Asm +# +# Abstract: +# +# AsmCpuidEx function +# +# Notes: +# +#------------------------------------------------------------------------------ +#include + +#------------------------------------------------------------------------------ +# UINT32 +# EFIAPI +# AsmCpuidEx ( +# IN UINT32 RegisterInEax, +# IN UINT32 RegisterInEcx, +# OUT UINT32 *RegisterOutEax OPTIONAL, +# OUT UINT32 *RegisterOutEbx OPTIONAL, +# OUT UINT32 *RegisterOutEcx OPTIONAL, +# OUT UINT32 *RegisterOutEdx OPTIONAL +# ) +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmCpuidEx) +ASM_PFX(AsmCpuidEx): + push %rbx + movl %ecx,%eax + movl %edx,%ecx + push %rax + cpuid + mov 0x38(%rsp), %r10 + test %r10, %r10 + jz L1 + mov %ecx,(%r10) +L1: + mov %r8, %rcx + jrcxz L2 + movl %eax,(%rcx) +L2: + mov %r9, %rcx + jrcxz L3 + mov %ebx, (%rcx) +L3: + mov 0x40(%rsp), %rcx + jrcxz L4 + mov %edx, (%rcx) +L4: + pop %rax + pop %rbx + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuPause.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuPause.S index bb988d7e45..3c605f821f 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuPause.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuPause.S @@ -28,7 +28,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(CpuPause) +.globl ASM_PFX(CpuPause) ASM_PFX(CpuPause): pause ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuSleep.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuSleep.S index ce0a4e9d6e..b7e1875af7 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuSleep.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuSleep.S @@ -28,7 +28,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(CpuSleep) +.globl ASM_PFX(CpuSleep) ASM_PFX(CpuSleep): hlt ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisableInterrupts.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisableInterrupts.S index 3b951f8b1b..8a359e568f 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisableInterrupts.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisableInterrupts.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(DisableInterrupts) +.globl ASM_PFX(DisableInterrupts) ASM_PFX(DisableInterrupts): cli ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisablePaging64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisablePaging64.S index e559246c59..5e0b4d5e74 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisablePaging64.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisablePaging64.S @@ -1,66 +1,66 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# DisablePaging64.S -# -# Abstract: -# -# AsmDisablePaging64 function -# -# Notes: -# -#------------------------------------------------------------------------------ - - -#include -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# InternalX86DisablePaging64 ( -# IN UINT16 Cs, %rdi -# IN UINT64 EntryPoint, %rsi -# IN UINT64 Context1, OPTIONAL %rdx -# IN UINT32 Context2, OPTIONAL %rcx -# IN UINT64 NewStack %r8 -# ); -#------------------------------------------------------------------------------ - -.global ASM_PFX(InternalX86DisablePaging64) -ASM_PFX(InternalX86DisablePaging64): - cli - shl $0x20,%rcx - lea (%rip), %eax - mov %eax,%ecx - push %rcx - mov %edx,%ebx - mov %r8d,%esi - mov %r9d,%edi - mov 0x28(%rsp),%eax - lret -L1: - mov %eax,%esp - mov %cr0,%rax - btr $0x1f,%eax - mov %rax,%cr0 - mov $0xc0000080,%ecx - rdmsr - and $0xfe,%ah - wrmsr - mov %cr4,%rax - and $0xdf,%al - mov %rax,%cr4 - push %rdi - push %rsi - callq *%rbx - jmp . - +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# DisablePaging64.S +# +# Abstract: +# +# AsmDisablePaging64 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + +#include +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# InternalX86DisablePaging64 ( +# IN UINT16 Cs, %rdi +# IN UINT64 EntryPoint, %rsi +# IN UINT64 Context1, OPTIONAL %rdx +# IN UINT32 Context2, OPTIONAL %rcx +# IN UINT64 NewStack %r8 +# ); +#------------------------------------------------------------------------------ + +.globl ASM_PFX(InternalX86DisablePaging64) +ASM_PFX(InternalX86DisablePaging64): + cli + shl $0x20,%rcx + lea (%rip), %eax + mov %eax,%ecx + push %rcx + mov %edx,%ebx + mov %r8d,%esi + mov %r9d,%edi + mov 0x28(%rsp),%eax + lret +L1: + mov %eax,%esp + mov %cr0,%rax + btr $0x1f,%eax + mov %rax,%cr0 + mov $0xc0000080,%ecx + rdmsr + and $0xfe,%ah + wrmsr + mov %cr4,%rax + and $0xdf,%al + mov %rax,%cr4 + push %rdi + push %rsi + callq *%rbx + jmp . + diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S index 613ce363de..36e8a0b5a7 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S @@ -1,36 +1,36 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# EnableDisableInterrupts.S -# -# Abstract: -# -# EnableDisableInterrupts function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# EnableDisableInterrupts ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(EnableDisableInterrupts) -ASM_PFX(EnableDisableInterrupts): - sti - cli - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006 - 2009, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# EnableDisableInterrupts.S +# +# Abstract: +# +# EnableDisableInterrupts function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# EnableDisableInterrupts ( +# VOID +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(EnableDisableInterrupts) +ASM_PFX(EnableDisableInterrupts): + sti + cli + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableInterrupts.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableInterrupts.S index a3b6945325..46d25a2ed9 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableInterrupts.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableInterrupts.S @@ -1,35 +1,35 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# EnableInterrupts.S -# -# Abstract: -# -# EnableInterrupts function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# EnableInterrupts ( -# VOID -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(EnableInterrupts) -ASM_PFX(EnableInterrupts): - sti - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# EnableInterrupts.S +# +# Abstract: +# +# EnableInterrupts function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# EnableInterrupts ( +# VOID +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(EnableInterrupts) +ASM_PFX(EnableInterrupts): + sti + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnablePaging64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnablePaging64.S index c59b53bc95..9c78fc9a0a 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnablePaging64.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnablePaging64.S @@ -1,61 +1,61 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# EnablePaging64.S -# -# Abstract: -# -# AsmEnablePaging64 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# InternalX86EnablePaging64 ( -# IN UINT16 Cs, %rdi -# IN UINT64 EntryPoint, %rsi -# IN UINT64 Context1, OPTIONAL %rdx -# IN UINT64 Context2, OPTIONAL %rcx -# IN UINT64 NewStack %r8 -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(InternalX86EnablePaging64) -ASM_PFX(InternalX86EnablePaging64): - cli - pop %rax - callq Base -Base: - addl $(L1-Base),(%rsp) - mov %cr4,%rax - or $0x20,%al - mov %rax,%cr4 - mov $0xc0000080,%ecx - rdmsr - or $0x1,%ah - wrmsr - mov %cr0,%rax - bts $0x1f,%eax - mov %rax,%cr0 - lret -L1: - addr32 mov (%esp),%rbx - addr32 mov 0x8(%esp),%rcx - addr32 mov 0x10(%esp),%rdx - addr32 mov 0x18(%esp),%rsp - add $-0x20,%rsp - callq *%rbx - jmp . +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# EnablePaging64.S +# +# Abstract: +# +# AsmEnablePaging64 function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# InternalX86EnablePaging64 ( +# IN UINT16 Cs, %rdi +# IN UINT64 EntryPoint, %rsi +# IN UINT64 Context1, OPTIONAL %rdx +# IN UINT64 Context2, OPTIONAL %rcx +# IN UINT64 NewStack %r8 +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(InternalX86EnablePaging64) +ASM_PFX(InternalX86EnablePaging64): + cli + pop %rax + callq Base +Base: + addl $(L1-Base),(%rsp) + mov %cr4,%rax + or $0x20,%al + mov %rax,%cr4 + mov $0xc0000080,%ecx + rdmsr + or $0x1,%ah + wrmsr + mov %cr0,%rax + bts $0x1f,%eax + mov %rax,%cr0 + lret +L1: + addr32 mov (%esp),%rbx + addr32 mov 0x8(%esp),%rcx + addr32 mov 0x10(%esp),%rdx + addr32 mov 0x18(%esp),%rsp + add $-0x20,%rsp + callq *%rbx + jmp . diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FlushCacheLine.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FlushCacheLine.S index ee34b60e6a..20294f03d5 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FlushCacheLine.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FlushCacheLine.S @@ -1,36 +1,36 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# FlushCacheLine.S -# -# Abstract: -# -# AsmFlushCacheLine function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# VOID * -# EFIAPI -# AsmFlushCacheLine ( -# IN VOID *LinearAddress -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmFlushCacheLine) -ASM_PFX(AsmFlushCacheLine): - clflush (%rdi) - mov %rdi, %rax - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# FlushCacheLine.S +# +# Abstract: +# +# AsmFlushCacheLine function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# VOID * +# EFIAPI +# AsmFlushCacheLine ( +# IN VOID *LinearAddress +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmFlushCacheLine) +ASM_PFX(AsmFlushCacheLine): + clflush (%rdi) + mov %rdi, %rax + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxRestore.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxRestore.S index 39fe7363c5..e4070ff0c6 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxRestore.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxRestore.S @@ -1,35 +1,35 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# FxRestore.S -# -# Abstract: -# -# AsmFxRestore function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# InternalX86FxRestore ( -# IN CONST IA32_FX_BUFFER *Buffer -# )# -#------------------------------------------------------------------------------ -.global ASM_PFX(InternalX86FxRestore) -ASM_PFX(InternalX86FxRestore): - fxrstor (%rcx) - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# FxRestore.S +# +# Abstract: +# +# AsmFxRestore function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# InternalX86FxRestore ( +# IN CONST IA32_FX_BUFFER *Buffer +# )# +#------------------------------------------------------------------------------ +.globl ASM_PFX(InternalX86FxRestore) +ASM_PFX(InternalX86FxRestore): + fxrstor (%rcx) + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxSave.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxSave.S index dbf5a4666d..e14f323f50 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxSave.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxSave.S @@ -1,35 +1,35 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# FxSave.S -# -# Abstract: -# -# AsmFxSave function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# InternalX86FxSave ( -# OUT IA32_FX_BUFFER *Buffer -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(InternalX86FxSave) -ASM_PFX(InternalX86FxSave): - fxsave (%rcx) - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# FxSave.S +# +# Abstract: +# +# AsmFxSave function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# InternalX86FxSave ( +# OUT IA32_FX_BUFFER *Buffer +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(InternalX86FxSave) +ASM_PFX(InternalX86FxSave): + fxsave (%rcx) + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange32.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange32.S index 8058666a7d..3eabbdcaac 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange32.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange32.S @@ -30,7 +30,7 @@ # IN UINT32 ExchangeValue # ); #------------------------------------------------------------------------------ -.global ASM_PFX(InternalSyncCompareExchange32) +.globl ASM_PFX(InternalSyncCompareExchange32) ASM_PFX(InternalSyncCompareExchange32): mov %edx, %eax lock cmpxchg %r8d, (%rcx) diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.S index 4e64d761a8..2242a2351d 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.S @@ -1,38 +1,38 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# InterlockedCompareExchange64.S -# -# Abstract: -# -# InterlockedCompareExchange64 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# InterlockedCompareExchange64 ( -# IN UINT64 *Value, -# IN UINT64 CompareValue, -# IN UINT64 ExchangeValue -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(InternalSyncCompareExchange64) -ASM_PFX(InternalSyncCompareExchange64): - mov %rsi, %rax - lock cmpxchg %rdx,(%rdi) - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006 - 2009, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# InterlockedCompareExchange64.S +# +# Abstract: +# +# InterlockedCompareExchange64 function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# UINT64 +# EFIAPI +# InterlockedCompareExchange64 ( +# IN UINT64 *Value, +# IN UINT64 CompareValue, +# IN UINT64 ExchangeValue +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(InternalSyncCompareExchange64) +ASM_PFX(InternalSyncCompareExchange64): + mov %rsi, %rax + lock cmpxchg %rdx,(%rdi) + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedDecrement.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedDecrement.S index 36ade07276..14a6bd6836 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedDecrement.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedDecrement.S @@ -1,36 +1,36 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# InterlockedDecrement.S -# -# Abstract: -# -# InterlockedDecrement function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# UINT32 -# EFIAPI -# InterlockedDecrement ( -# IN UINT32 *Value -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(InternalSyncDecrement) -ASM_PFX(InternalSyncDecrement): - lock decl (%rcx) - mov (%rcx), %eax - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# InterlockedDecrement.S +# +# Abstract: +# +# InterlockedDecrement function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# UINT32 +# EFIAPI +# InterlockedDecrement ( +# IN UINT32 *Value +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(InternalSyncDecrement) +ASM_PFX(InternalSyncDecrement): + lock decl (%rcx) + mov (%rcx), %eax + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedIncrement.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedIncrement.S index e77dc17d9d..437a1859a9 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedIncrement.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedIncrement.S @@ -1,36 +1,36 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# InterlockedIncrement.S -# -# Abstract: -# -# InterlockedIncrement function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# UINT32 -# EFIAPI -# InterlockedIncrement ( -# IN UINT32 *Value -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(InternalSyncIncrement) -ASM_PFX(InternalSyncIncrement): - lock incl (%rcx) - mov (%rcx), %eax - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# InterlockedIncrement.S +# +# Abstract: +# +# InterlockedIncrement function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# UINT32 +# EFIAPI +# InterlockedIncrement ( +# IN UINT32 *Value +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(InternalSyncIncrement) +ASM_PFX(InternalSyncIncrement): + lock incl (%rcx) + mov (%rcx), %eax + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Invd.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Invd.S index 406875af3f..1f2ec6e8e7 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Invd.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Invd.S @@ -1,35 +1,35 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# Invd.S -# -# Abstract: -# -# AsmInvd function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmInvd ( -# VOID -# )# -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmInvd) -ASM_PFX(AsmInvd): - invd - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# Invd.S +# +# Abstract: +# +# AsmInvd function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmInvd ( +# VOID +# )# +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmInvd) +ASM_PFX(AsmInvd): + invd + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/LongJump.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/LongJump.S index 71e536d5f7..fd5aa096dc 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/LongJump.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/LongJump.S @@ -27,7 +27,7 @@ # IN UINTN Value # ); #------------------------------------------------------------------------------ -.global ASM_PFX(InternalLongJump) +.globl ASM_PFX(InternalLongJump) ASM_PFX(InternalLongJump): mov (%rcx), %rbx mov 0x8(%rcx), %rsp diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Monitor.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Monitor.S index 0105364b78..65bcb9ff7e 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Monitor.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Monitor.S @@ -31,7 +31,7 @@ # IN UINTN Edx # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmMonitor) +.globl ASM_PFX(AsmMonitor) ASM_PFX(AsmMonitor): mov %ecx,%eax mov %edx,%ecx diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Mwait.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Mwait.S index 9f72ce8e5f..5c490f9ed7 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Mwait.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Mwait.S @@ -30,7 +30,7 @@ # IN UINTN Ecx # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmMwait) +.globl ASM_PFX(AsmMwait) ASM_PFX(AsmMwait): mov %ecx,%eax mov %edx,%ecx diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr0.S index dabf029403..87827b7bc8 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr0.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr0.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadCr0) +.globl ASM_PFX(AsmReadCr0) ASM_PFX(AsmReadCr0): mov %cr0, %rax ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr2.S index 47b39f0c5c..cd3d57cb8a 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr2.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr2.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadCr2) +.globl ASM_PFX(AsmReadCr2) ASM_PFX(AsmReadCr2): mov %cr2, %rax ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr3.S index d54eaf5e95..0e0a16ce8e 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr3.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr3.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadCr3) +.globl ASM_PFX(AsmReadCr3) ASM_PFX(AsmReadCr3): mov %cr3, %rax ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr4.S index 964e2b6b3f..5a3105b8b5 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr4.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr4.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadCr4) +.globl ASM_PFX(AsmReadCr4) ASM_PFX(AsmReadCr4): mov %cr4, %rax ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCs.S index 04b1a1d111..eabf55e76a 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCs.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCs.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadCs) +.globl ASM_PFX(AsmReadCs) ASM_PFX(AsmReadCs): mov %cs, %eax ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr0.S index 64f3311041..15089f0254 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr0.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr0.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadDr0) +.globl ASM_PFX(AsmReadDr0) ASM_PFX(AsmReadDr0): mov %dr0, %rax ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr1.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr1.S index c1b183a776..79b3aa8165 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr1.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr1.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadDr1) +.globl ASM_PFX(AsmReadDr1) ASM_PFX(AsmReadDr1): mov %dr1, %rax ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr2.S index 69cdddece8..d55ab6a38a 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr2.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr2.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadDr2) +.globl ASM_PFX(AsmReadDr2) ASM_PFX(AsmReadDr2): mov %dr2, %rax ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr3.S index 18865c01b1..a7c319844a 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr3.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr3.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadDr3) +.globl ASM_PFX(AsmReadDr3) ASM_PFX(AsmReadDr3): mov %dr3, %rax ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr4.S index cec6e0bff4..99dfb3e3c0 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr4.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr4.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadDr4) +.globl ASM_PFX(AsmReadDr4) ASM_PFX(AsmReadDr4): #DB 0fh, 21h, 0e0h mov %dr4, %rax diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr5.S index c0c4e6a3fa..6b98eb8050 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr5.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr5.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadDr5) +.globl ASM_PFX(AsmReadDr5) ASM_PFX(AsmReadDr5): mov %dr5, %rax ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr6.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr6.S index e819e25144..46e0c90d8d 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr6.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr6.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadDr6) +.globl ASM_PFX(AsmReadDr6) ASM_PFX(AsmReadDr6): mov %dr6, %rax ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr7.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr7.S index 7d3a70f41b..7ababdac6e 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr7.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr7.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadDr7) +.globl ASM_PFX(AsmReadDr7) ASM_PFX(AsmReadDr7): mov %dr7, %rax ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDs.S index 6511e100db..cf631429f7 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDs.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDs.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadDs) +.globl ASM_PFX(AsmReadDs) ASM_PFX(AsmReadDs): movl %ds, %eax ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEflags.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEflags.S index 69744b65a6..8b5ee9adf8 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEflags.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEflags.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadEflags) +.globl ASM_PFX(AsmReadEflags) ASM_PFX(AsmReadEflags): pushfq pop %rax diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEs.S index 2f55a91611..94743870fd 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEs.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEs.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadEs) +.globl ASM_PFX(AsmReadEs) ASM_PFX(AsmReadEs): mov %es, %eax ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadFs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadFs.S index ae406bdf85..0a4cb8a817 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadFs.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadFs.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadFs) +.globl ASM_PFX(AsmReadFs) ASM_PFX(AsmReadFs): mov %fs, %eax ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGdtr.S index 2be2a88761..4c461d9a5f 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGdtr.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGdtr.S @@ -29,7 +29,7 @@ # OUT IA32_DESCRIPTOR *Gdtr # ); #------------------------------------------------------------------------------ -.global ASM_PFX(InternalX86ReadGdtr) +.globl ASM_PFX(InternalX86ReadGdtr) ASM_PFX(InternalX86ReadGdtr): sgdt (%rcx) ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGs.S index 49c07e6bc3..6a04e7b9c1 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGs.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGs.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadGs) +.globl ASM_PFX(AsmReadGs) ASM_PFX(AsmReadGs): mov %gs, %eax ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadIdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadIdtr.S index e1fe9c5057..be8a8d837c 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadIdtr.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadIdtr.S @@ -29,7 +29,7 @@ # OUT IA32_DESCRIPTOR *Idtr # ); #------------------------------------------------------------------------------ -.global ASM_PFX(InternalX86ReadIdtr) +.globl ASM_PFX(InternalX86ReadIdtr) ASM_PFX(InternalX86ReadIdtr): sidt (%rcx) ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadLdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadLdtr.S index aa987b8bde..919886665b 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadLdtr.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadLdtr.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadLdtr) +.globl ASM_PFX(AsmReadLdtr) ASM_PFX(AsmReadLdtr): sldt %eax ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm0.S index 5291e89ca7..0b0042f4c2 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm0.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm0.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadMm0) +.globl ASM_PFX(AsmReadMm0) ASM_PFX(AsmReadMm0): #DB 48h, 0fh, 7eh, 0c0h movd %mm0, %rax diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm1.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm1.S index e5d40805af..7d663298df 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm1.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm1.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadMm1) +.globl ASM_PFX(AsmReadMm1) ASM_PFX(AsmReadMm1): #DB 48h, 0fh, 7eh, 0c8h movd %mm1, %rax diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm2.S index 880f8dd0c3..201c279bb8 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm2.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm2.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadMm2) +.globl ASM_PFX(AsmReadMm2) ASM_PFX(AsmReadMm2): #DB 48h, 0fh, 7eh, 0d0h movd %mm2, %rax diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm3.S index f8b0c24230..7654a75040 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm3.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm3.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadMm3) +.globl ASM_PFX(AsmReadMm3) ASM_PFX(AsmReadMm3): #DB 48h, 0fh, 7eh, 0d8h movd %mm3, %rax diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm4.S index e6ffbbfde6..81fab0b101 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm4.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm4.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadMm4) +.globl ASM_PFX(AsmReadMm4) ASM_PFX(AsmReadMm4): #DB 48h, 0fh, 7eh, 0e0h movd %mm4, %rax diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm5.S index 1b10ad6129..1b2ed10251 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm5.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm5.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadMm5) +.globl ASM_PFX(AsmReadMm5) ASM_PFX(AsmReadMm5): #DB 48h, 0fh, 7eh, 0e8h movd %mm5, %rax diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm6.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm6.S index 596ba914e1..c9175f1cf0 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm6.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm6.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadMm6) +.globl ASM_PFX(AsmReadMm6) ASM_PFX(AsmReadMm6): #DB 48h, 0fh, 7eh, 0f0h movd %mm6, %rax diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm7.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm7.S index 744bb57f67..f8c0fdecbd 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm7.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm7.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadMm7) +.globl ASM_PFX(AsmReadMm7) ASM_PFX(AsmReadMm7): #DB 48h, 0fh, 7eh, 0f8h movd %mm7, %rax diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMsr64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMsr64.S index 290f0e3b65..4b2b9b9339 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMsr64.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMsr64.S @@ -29,7 +29,7 @@ # IN UINT32 Index # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadMsr64) +.globl ASM_PFX(AsmReadMsr64) ASM_PFX(AsmReadMsr64): rdmsr # edx & eax are zero extended shl $0x20, %rdx diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadPmc.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadPmc.S index 71e72c7e8e..48e9e30424 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadPmc.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadPmc.S @@ -29,7 +29,7 @@ # IN UINT32 PmcIndex # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadPmc) +.globl ASM_PFX(AsmReadPmc) ASM_PFX(AsmReadPmc): rdpmc shl $0x20, %rdx diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadSs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadSs.S index 7853f8dce8..9a8a4a4a96 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadSs.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadSs.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadSs); +.globl ASM_PFX(AsmReadSs); ASM_PFX(AsmReadSs): movl %ss, %eax ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTr.S index f11af31885..c699334470 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTr.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTr.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadTr) +.globl ASM_PFX(AsmReadTr) ASM_PFX(AsmReadTr): str %eax ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTsc.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTsc.S index 12cf255a29..3464d2b86b 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTsc.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTsc.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmReadTsc) +.globl ASM_PFX(AsmReadTsc) ASM_PFX(AsmReadTsc): rdtsc shl $0x20, %rdx diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SetJump.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SetJump.S index 805c6a3ed9..55f58f1975 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SetJump.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SetJump.S @@ -1,42 +1,42 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# SetJump.S -# -# Abstract: -# -# Implementation of SetJump() on x86_64 -# -#------------------------------------------------------------------------------ -#include -.extern InternalAssertJumpBuffer; -.global ASM_PFX(SetJump) -ASM_PFX(SetJump): - push %rcx - add $0xffffffffffffffe0,%rsp - call _InternalAssertJumpBuffer - add $0x20,%rsp - pop %rcx - pop %rdx - mov %rbx,(%rcx) - mov %rsp,0x8(%rcx) - mov %rbp,0x10(%rcx) - mov %rdi,0x18(%rcx) - mov %rsi,0x20(%rcx) - mov %r12,0x28(%rcx) - mov %r13,0x30(%rcx) - mov %r14,0x38(%rcx) - mov %r15,0x40(%rcx) - mov %rdx,0x48(%rcx) - xor %rax,%rax - jmpq *%rdx +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# SetJump.S +# +# Abstract: +# +# Implementation of SetJump() on x86_64 +# +#------------------------------------------------------------------------------ +#include +.extern InternalAssertJumpBuffer; +.globl ASM_PFX(SetJump) +ASM_PFX(SetJump): + push %rcx + add $0xffffffffffffffe0,%rsp + call _InternalAssertJumpBuffer + add $0x20,%rsp + pop %rcx + pop %rdx + mov %rbx,(%rcx) + mov %rsp,0x8(%rcx) + mov %rbp,0x10(%rcx) + mov %rdi,0x18(%rcx) + mov %rsi,0x20(%rcx) + mov %r12,0x28(%rcx) + mov %r13,0x30(%rcx) + mov %r14,0x38(%rcx) + mov %r15,0x40(%rcx) + mov %rdx,0x48(%rcx) + xor %rax,%rax + jmpq *%rdx diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SwitchStack.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SwitchStack.S index 1e504918d3..8253e2f53d 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SwitchStack.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SwitchStack.S @@ -1,44 +1,44 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# SwitchStack.S -# -# Abstract: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# Routine Description: -# -# Routine for switching stacks with 1 parameter -# -# Arguments: -# -# (rdi) EntryPoint - Entry point with new stack. -# (rsi) Context1 - Parameter1 for entry point. -# (rdx) Context2 - Parameter2 for entry point. -# (rcx) NewStack - Pointer to new stack. -# -# Returns: -# -# None -# -#------------------------------------------------------------------------------ -.global ASM_PFX(InternalSwitchStack) -ASM_PFX(InternalSwitchStack): - mov %rcx, %rax - mov %rdx, %rcx - mov %r8, %rdx - lea -0x20(%r9), %rsp - call *%rax +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# SwitchStack.S +# +# Abstract: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# Routine Description: +# +# Routine for switching stacks with 1 parameter +# +# Arguments: +# +# (rdi) EntryPoint - Entry point with new stack. +# (rsi) Context1 - Parameter1 for entry point. +# (rdx) Context2 - Parameter2 for entry point. +# (rcx) NewStack - Pointer to new stack. +# +# Returns: +# +# None +# +#------------------------------------------------------------------------------ +.globl ASM_PFX(InternalSwitchStack) +ASM_PFX(InternalSwitchStack): + mov %rcx, %rax + mov %rdx, %rcx + mov %r8, %rdx + lea -0x20(%r9), %rsp + call *%rax diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Wbinvd.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Wbinvd.S index 1c195b3248..c5b80756c9 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Wbinvd.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Wbinvd.S @@ -29,7 +29,7 @@ # VOID # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmWbinvd) +.globl ASM_PFX(AsmWbinvd) ASM_PFX(AsmWbinvd): wbinvd ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr0.S index 53d6f18773..009311f103 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr0.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr0.S @@ -1,36 +1,36 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteCr0.S -# -# Abstract: -# -# AsmWriteCr0 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmWriteCr0 ( -# UINTN Cr0 -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteCr0) -ASM_PFX(AsmWriteCr0): - mov %rcx,%cr0 - mov %rcx,%rax - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteCr0.S +# +# Abstract: +# +# AsmWriteCr0 function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmWriteCr0 ( +# UINTN Cr0 +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmWriteCr0) +ASM_PFX(AsmWriteCr0): + mov %rcx,%cr0 + mov %rcx,%rax + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr2.S index f54201b099..3187341ba0 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr2.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr2.S @@ -1,36 +1,36 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteCr2.S -# -# Abstract: -# -# AsmWriteCr2 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmWriteCr2 ( -# UINTN Cr2 -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteCr2) -ASM_PFX(AsmWriteCr2): - mov %rcx,%cr2 - mov %rcx,%rax - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteCr2.S +# +# Abstract: +# +# AsmWriteCr2 function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmWriteCr2 ( +# UINTN Cr2 +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmWriteCr2) +ASM_PFX(AsmWriteCr2): + mov %rcx,%cr2 + mov %rcx,%rax + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr3.S index 9d7e805ad5..a89cee4f0a 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr3.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr3.S @@ -1,36 +1,36 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteCr3.S -# -# Abstract: -# -# AsmWriteCr3 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmWriteCr3 ( -# UINTN Cr3 -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteCr3) -ASM_PFX(AsmWriteCr3): - mov %rcx,%cr3 - mov %rcx,%rax - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteCr3.S +# +# Abstract: +# +# AsmWriteCr3 function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmWriteCr3 ( +# UINTN Cr3 +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmWriteCr3) +ASM_PFX(AsmWriteCr3): + mov %rcx,%cr3 + mov %rcx,%rax + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr4.S index e5975289a3..9f28591882 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr4.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr4.S @@ -1,36 +1,36 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteCr4.S -# -# Abstract: -# -# AsmWriteCr4 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmWriteCr4 ( -# UINTN Cr4 -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteCr4) -ASM_PFX(AsmWriteCr4): - mov %rcx,%cr4 - mov %rcx,%rax - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteCr4.S +# +# Abstract: +# +# AsmWriteCr4 function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmWriteCr4 ( +# UINTN Cr4 +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmWriteCr4) +ASM_PFX(AsmWriteCr4): + mov %rcx,%cr4 + mov %rcx,%rax + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr0.S index 8d6ae4323f..3b5d9ef894 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr0.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr0.S @@ -29,7 +29,7 @@ # UINTN Value # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteDr0) +.globl ASM_PFX(AsmWriteDr0) ASM_PFX(AsmWriteDr0): mov %rcx, %dr0 mov %rcx, %rax diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr1.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr1.S index 3178667bc8..72c48792ff 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr1.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr1.S @@ -29,7 +29,7 @@ # UINTN Value # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteDr1) +.globl ASM_PFX(AsmWriteDr1) ASM_PFX(AsmWriteDr1): mov %rcx, %dr1 mov %rcx, %rax diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr2.S index d904d11cd3..6468f2fc45 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr2.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr2.S @@ -29,7 +29,7 @@ # UINTN Value # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteDr2) +.globl ASM_PFX(AsmWriteDr2) ASM_PFX(AsmWriteDr2): mov %rcx, %dr2 mov %rcx, %rax diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr3.S index 2138e1ecd6..8cdc4aa537 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr3.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr3.S @@ -29,7 +29,7 @@ # UINTN Value # ); #------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteDr3) +.globl ASM_PFX(AsmWriteDr3) ASM_PFX(AsmWriteDr3): mov %rcx, %dr3 mov %rcx, %rax diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr4.S index f2de21d498..489a1dbaa4 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr4.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr4.S @@ -1,36 +1,36 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteDr4.S -# -# Abstract: -# -# AsmWriteDr4 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmWriteDr4 ( -# IN UINTN Value -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteDr4) -ASM_PFX(AsmWriteDr4): - mov %rcx, %dr4 - mov %rcx, %rax - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteDr4.S +# +# Abstract: +# +# AsmWriteDr4 function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmWriteDr4 ( +# IN UINTN Value +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmWriteDr4) +ASM_PFX(AsmWriteDr4): + mov %rcx, %dr4 + mov %rcx, %rax + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr5.S index b9e56ebdd9..0476f09c88 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr5.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr5.S @@ -1,36 +1,36 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteDr5.S -# -# Abstract: -# -# AsmWriteDr5 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmWriteDr5 ( -# IN UINTN Value -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteDr5) -ASM_PFX(AsmWriteDr5): - mov %rcx, %dr5 - mov %rcx, %rax - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteDr5.S +# +# Abstract: +# +# AsmWriteDr5 function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmWriteDr5 ( +# IN UINTN Value +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmWriteDr5) +ASM_PFX(AsmWriteDr5): + mov %rcx, %dr5 + mov %rcx, %rax + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr6.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr6.S index 83530b63da..8e48f83680 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr6.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr6.S @@ -1,36 +1,36 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteDr6.S -# -# Abstract: -# -# AsmWriteDr6 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmWriteDr6 ( -# IN UINTN Value -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteDr6) -ASM_PFX(AsmWriteDr6): - mov %rcx, %dr6 - mov %rcx, %rax - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteDr6.S +# +# Abstract: +# +# AsmWriteDr6 function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmWriteDr6 ( +# IN UINTN Value +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmWriteDr6) +ASM_PFX(AsmWriteDr6): + mov %rcx, %dr6 + mov %rcx, %rax + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr7.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr7.S index 6cfe8f6189..de10696801 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr7.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr7.S @@ -1,36 +1,36 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteDr7.S -# -# Abstract: -# -# AsmWriteDr7 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# AsmWriteDr7 ( -# IN UINTN Value -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteDr7) -ASM_PFX(AsmWriteDr7): - mov %rcx, %dr7 - mov %rcx, %rax - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteDr7.S +# +# Abstract: +# +# AsmWriteDr7 function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmWriteDr7 ( +# IN UINTN Value +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmWriteDr7) +ASM_PFX(AsmWriteDr7): + mov %rcx, %dr7 + mov %rcx, %rax + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteGdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteGdtr.S index dce9469856..aaf41ef2bf 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteGdtr.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteGdtr.S @@ -1,35 +1,35 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteGdtr.S -# -# Abstract: -# -# AsmWriteGdtr function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# InternalX86WriteGdtr ( -# IN CONST IA32_DESCRIPTOR *Idtr -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(InternalX86WriteGdtr) -ASM_PFX(InternalX86WriteGdtr): - lgdt (%rcx) - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteGdtr.S +# +# Abstract: +# +# AsmWriteGdtr function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# InternalX86WriteGdtr ( +# IN CONST IA32_DESCRIPTOR *Idtr +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(InternalX86WriteGdtr) +ASM_PFX(InternalX86WriteGdtr): + lgdt (%rcx) + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteIdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteIdtr.S index 1d3ca8bac2..2d219326c5 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteIdtr.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteIdtr.S @@ -1,35 +1,35 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteIdtr.S -# -# Abstract: -# -# AsmWriteIdtr function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# InternalX86WriteIdtr ( -# IN CONST IA32_DESCRIPTOR *Idtr -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(InternalX86WriteIdtr) -ASM_PFX(InternalX86WriteIdtr): - lidt (%rcx) - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006 - 2009, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteIdtr.S +# +# Abstract: +# +# AsmWriteIdtr function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# InternalX86WriteIdtr ( +# IN CONST IA32_DESCRIPTOR *Idtr +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(InternalX86WriteIdtr) +ASM_PFX(InternalX86WriteIdtr): + lidt (%rcx) + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteLdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteLdtr.S index 29dcdcede8..ebeb73859f 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteLdtr.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteLdtr.S @@ -1,35 +1,35 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteLdtr.S -# -# Abstract: -# -# AsmWriteLdtr function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmWriteLdtr ( -# IN UINT16 Ldtr -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteLdtr); -ASM_PFX(AsmWriteLdtr): - lldt %cx - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006 - 2009, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteLdtr.S +# +# Abstract: +# +# AsmWriteLdtr function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteLdtr ( +# IN UINT16 Ldtr +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmWriteLdtr); +ASM_PFX(AsmWriteLdtr): + lldt %cx + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm0.S index ac690b2807..012b117233 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm0.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm0.S @@ -1,35 +1,35 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteMm0.S -# -# Abstract: -# -# AsmWriteMm0 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmWriteMm0 ( -# IN UINT64 Value -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteMm0); -ASM_PFX(AsmWriteMm0): - movd %rcx, %xmm0 - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteMm0.S +# +# Abstract: +# +# AsmWriteMm0 function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteMm0 ( +# IN UINT64 Value +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmWriteMm0); +ASM_PFX(AsmWriteMm0): + movd %rcx, %xmm0 + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm1.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm1.S index e21f55d328..994de7e2d6 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm1.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm1.S @@ -1,35 +1,35 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteMm1.S -# -# Abstract: -# -# AsmWriteMm1 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmWriteMm1 ( -# IN UINT64 Value -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteMm1); -ASM_PFX(AsmWriteMm1): - movd %rcx, %mm1 - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteMm1.S +# +# Abstract: +# +# AsmWriteMm1 function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteMm1 ( +# IN UINT64 Value +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmWriteMm1); +ASM_PFX(AsmWriteMm1): + movd %rcx, %mm1 + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm2.S index f8ec39458d..a80269eece 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm2.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm2.S @@ -1,35 +1,35 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteMm2.S -# -# Abstract: -# -# AsmWriteMm2 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmWriteMm2 ( -# IN UINT64 Value -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteMm2) -ASM_PFX(AsmWriteMm2): - movd %rcx, %mm2 - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteMm2.S +# +# Abstract: +# +# AsmWriteMm2 function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteMm2 ( +# IN UINT64 Value +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmWriteMm2) +ASM_PFX(AsmWriteMm2): + movd %rcx, %mm2 + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm3.S index 82d04b829e..b8d4e3db90 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm3.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm3.S @@ -1,35 +1,35 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteMm3.S -# -# Abstract: -# -# AsmWriteMm3 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmWriteMm3 ( -# IN UINT64 Value -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteMm3) -ASM_PFX(AsmWriteMm3): - movd %rcx, %mm3 - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteMm3.S +# +# Abstract: +# +# AsmWriteMm3 function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteMm3 ( +# IN UINT64 Value +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmWriteMm3) +ASM_PFX(AsmWriteMm3): + movd %rcx, %mm3 + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm4.S index 72406e3915..177debbd10 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm4.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm4.S @@ -1,35 +1,35 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteMm4.S -# -# Abstract: -# -# AsmWriteMm4 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmWriteMm4 ( -# IN UINT64 Value -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteMm4) -ASM_PFX(AsmWriteMm4): - movd %rcx, %mm4 - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteMm4.S +# +# Abstract: +# +# AsmWriteMm4 function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteMm4 ( +# IN UINT64 Value +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmWriteMm4) +ASM_PFX(AsmWriteMm4): + movd %rcx, %mm4 + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm5.S index 39a6a33693..8d037804d7 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm5.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm5.S @@ -1,35 +1,35 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteMm5.S -# -# Abstract: -# -# AsmWriteMm5 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmWriteMm5 ( -# IN UINT64 Value -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteMm5) -ASM_PFX(AsmWriteMm5): - movd %rcx, %mm5 - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteMm5.S +# +# Abstract: +# +# AsmWriteMm5 function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteMm5 ( +# IN UINT64 Value +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmWriteMm5) +ASM_PFX(AsmWriteMm5): + movd %rcx, %mm5 + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm6.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm6.S index a4540dc267..0b52b4ab2f 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm6.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm6.S @@ -1,35 +1,35 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteMm6.S -# -# Abstract: -# -# AsmWriteMm6 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmWriteMm6 ( -# IN UINT64 Value -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteMm6) -ASM_PFX(AsmWriteMm6): - movd %rcx, %mm6 - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteMm6.S +# +# Abstract: +# +# AsmWriteMm6 function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteMm6 ( +# IN UINT64 Value +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmWriteMm6) +ASM_PFX(AsmWriteMm6): + movd %rcx, %mm6 + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm7.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm7.S index 865b7162a4..392813b582 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm7.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm7.S @@ -1,35 +1,35 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteMm7.S -# -# Abstract: -# -# AsmWriteMm7 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmWriteMm7 ( -# IN UINT64 Value -# ); -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteMm7) -ASM_PFX(AsmWriteMm7): - movd %rcx, %mm7 - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteMm7.S +# +# Abstract: +# +# AsmWriteMm7 function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteMm7 ( +# IN UINT64 Value +# ); +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmWriteMm7) +ASM_PFX(AsmWriteMm7): + movd %rcx, %mm7 + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.S index b646dac36a..c24ca6f48c 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.S @@ -1,39 +1,39 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# WriteMsr64.S -# -# Abstract: -# -# AsmWriteMsr64 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -#include -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# AsmWriteMsr64 ( -# IN UINT32 Index, -# IN UINT64 Value -# ); -# TODO: -#------------------------------------------------------------------------------ -.global ASM_PFX(AsmWriteMsr64) -ASM_PFX(AsmWriteMsr64): - mov %rdx, %rax - shr $0x20, %rdx - wrmsr - ret +#------------------------------------------------------------------------------ +# +# Copyright (c) 2006 - 2009, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# WriteMsr64.S +# +# Abstract: +# +# AsmWriteMsr64 function +# +# Notes: +# +#------------------------------------------------------------------------------ + +#include +#------------------------------------------------------------------------------ +# UINT64 +# EFIAPI +# AsmWriteMsr64 ( +# IN UINT32 Index, +# IN UINT64 Value +# ); +# TODO: +#------------------------------------------------------------------------------ +.globl ASM_PFX(AsmWriteMsr64) +ASM_PFX(AsmWriteMsr64): + mov %rdx, %rax + shr $0x20, %rdx + wrmsr + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep1.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep1.S index efd184e1f6..91ff872bb5 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep1.S +++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep1.S @@ -1,66 +1,66 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2008, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# EfiCopyMemRep1.S -# -# Abstract: -# -# CopyMem function -# -# Notes: -# -#------------------------------------------------------------------------------ -#include - - .code: - -.global ASM_PFX(EfiCommonLibCopyMem) - -#------------------------------------------------------------------------------ -# VOID -# EfiCommonLibCopyMem ( -# OUT VOID *Destination, -# IN VOID *Source, -# IN UINTN Count -# ); -#------------------------------------------------------------------------------ -ASM_PFX(EfiCommonLibCopyMem): - push %rsi - push %rdi - cmp %rcx,%rdx - je CopyMemDone - cmp $0x0,%r8 - je CopyMemDone - mov %rdx,%rsi - mov %rcx,%rdi - lea -1(%r8,%rsi,1),%r9 - cmp %rdi,%rsi - jae CopyBytes - cmp %rdi,%r9 - jb CopyBytes - mov %r9,%rsi - lea -1(%r8,%rdi,1),%rdi - std - -CopyBytes: - mov %r8,%rcx - rep movsb %ds:(%rsi),%es:(%rdi) - cld - -CopyMemDone: - pop %rdi - pop %rsi - retq - - - +#------------------------------------------------------------------------------ +# +# Copyright (c) 2008, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# EfiCopyMemRep1.S +# +# Abstract: +# +# CopyMem function +# +# Notes: +# +#------------------------------------------------------------------------------ +#include + + .code: + +.globl ASM_PFX(EfiCommonLibCopyMem) + +#------------------------------------------------------------------------------ +# VOID +# EfiCommonLibCopyMem ( +# OUT VOID *Destination, +# IN VOID *Source, +# IN UINTN Count +# ); +#------------------------------------------------------------------------------ +ASM_PFX(EfiCommonLibCopyMem): + push %rsi + push %rdi + cmp %rcx,%rdx + je CopyMemDone + cmp $0x0,%r8 + je CopyMemDone + mov %rdx,%rsi + mov %rcx,%rdi + lea -1(%r8,%rsi,1),%r9 + cmp %rdi,%rsi + jae CopyBytes + cmp %rdi,%r9 + jb CopyBytes + mov %r9,%rsi + lea -1(%r8,%rdi,1),%rdi + std + +CopyBytes: + mov %r8,%rcx + rep movsb %ds:(%rsi),%es:(%rdi) + cld + +CopyMemDone: + pop %rdi + pop %rsi + retq + + + diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep4.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep4.S index b2f1724e8b..56adc46ce9 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep4.S +++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep4.S @@ -1,54 +1,54 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2008, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# EfiSetMemRep4.S -# -# Abstract: -# -# SetMem function -# -# Notes: -# -#------------------------------------------------------------------------------ -#include - - .code: - -.global ASM_PFX(EfiCommonLibCopyMem) - -#------------------------------------------------------------------------------ -# VOID -# EfiCommonLibSetMem ( -# OUT VOID *Buffer, -# IN UINTN Size, -# IN UINT8 Value -# ); -#------------------------------------------------------------------------------ -ASM_PFX(EfiCommonLibSetMem): - push %rdi - cmp $0x0,%rdx - je SetDone - mov %rcx,%rdi - mov %r8b,%al - mov %al,%ah - shrd $0x10,%eax,%ecx - shld $0x10,%ecx,%eax - mov %rdx,%rcx - shr $0x2,%rcx - rep stos %eax,%es:(%rdi) - mov %rdx,%rcx - and $0x3,%rcx - rep stos %al,%es:(%rdi) -SetDone: - pop %rdi - retq +#------------------------------------------------------------------------------ +# +# Copyright (c) 2008, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# EfiSetMemRep4.S +# +# Abstract: +# +# SetMem function +# +# Notes: +# +#------------------------------------------------------------------------------ +#include + + .code: + +.globl ASM_PFX(EfiCommonLibCopyMem) + +#------------------------------------------------------------------------------ +# VOID +# EfiCommonLibSetMem ( +# OUT VOID *Buffer, +# IN UINTN Size, +# IN UINT8 Value +# ); +#------------------------------------------------------------------------------ +ASM_PFX(EfiCommonLibSetMem): + push %rdi + cmp $0x0,%rdx + je SetDone + mov %rcx,%rdi + mov %r8b,%al + mov %al,%ah + shrd $0x10,%eax,%ecx + shld $0x10,%ecx,%eax + mov %rdx,%rcx + shr $0x2,%rcx + rep stos %eax,%es:(%rdi) + mov %rdx,%rcx + and $0x3,%rcx + rep stos %al,%es:(%rdi) +SetDone: + pop %rdi + retq diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep4.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep4.S index f07c3d55cc..5af4252c23 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep4.S +++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep4.S @@ -1,46 +1,46 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2008, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# EfiZeroMemRep4.S -# -# Abstract: -# -# ZeroMem function -# -# Notes: -# -#------------------------------------------------------------------------------ -#include - - .code: - -.global ASM_PFX(EfiCommonLibZeroMem) -#------------------------------------------------------------------------------ -# VOID -# EfiCommonLibZeroMem ( -# IN VOID *Buffer, -# IN UINTN Size -# ); -#------------------------------------------------------------------------------ -ASM_PFX(EfiCommonLibZeroMem): - push %rdi - xor %rax,%rax - mov %rcx,%rdi - mov %rdx,%rcx - shr $0x2,%rcx - and $0x3,%rdx - rep stos %eax,%es:(%rdi) - mov %rdx,%rcx - rep stos %al,%es:(%rdi) - pop %rdi +#------------------------------------------------------------------------------ +# +# Copyright (c) 2008, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# EfiZeroMemRep4.S +# +# Abstract: +# +# ZeroMem function +# +# Notes: +# +#------------------------------------------------------------------------------ +#include + + .code: + +.globl ASM_PFX(EfiCommonLibZeroMem) +#------------------------------------------------------------------------------ +# VOID +# EfiCommonLibZeroMem ( +# IN VOID *Buffer, +# IN UINTN Size +# ); +#------------------------------------------------------------------------------ +ASM_PFX(EfiCommonLibZeroMem): + push %rdi + xor %rax,%rax + mov %rcx,%rdi + mov %rdx,%rcx + shr $0x2,%rcx + and $0x3,%rdx + rep stos %eax,%es:(%rdi) + mov %rdx,%rcx + rep stos %al,%es:(%rdi) + pop %rdi retq \ No newline at end of file diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/ProcessorAsms.S b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/ProcessorAsms.S index 01eec19f39..2766986c6a 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/ProcessorAsms.S +++ b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/ProcessorAsms.S @@ -1,207 +1,207 @@ -# -# Copyright (c) 2004, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# ProcessorAsms.Asm -# -# -# -#include "EfiBind.h" -#------------------------------------------------------------------------------ - - .686P: - .MMX: - #.MODEL SMALL - .CODE: -#------------------------------------------------------------------------------ - -.globl ASM_PFX(TransferControlSetJump) -.globl ASM_PFX(TransferControlLongJump) -.globl ASM_PFX(SwitchStacks) -.globl ASM_PFX(SwitchIplStacks) - -.equ EFI_SUCCESS, 0 -.equ EFI_WARN_RETURN_FROM_LONG_JUMP, 5 - -# -# typedef struct { -# UINT32 ebx; -# UINT32 esi; -# UINT32 edi; -# UINT32 ebp; -# UINT32 esp; -# UINT32 eip; -#} EFI_JUMP_BUFFER; -# - -#typedef -#EFI_STATUS -#(EFIAPI *EFI_PEI_TRANSFER_CONTROL_SET_JUMP) ( -# IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This, -# OUT EFI_JUMP_BUFFER *Context -# ); -# -#Routine Description: -# -# This routine implements the IA32 variant of the SetJump call. Its -# responsibility is to store system state information for a possible -# subsequent LongJump. -# -#Arguments: -# -# Pointer to CPU context save buffer. -# -#Returns: -# -# EFI_SUCCESS -# -ASM_PFX(TransferControlSetJump): - push %ebp - mov %esp,%ebp - mov 0x8(%ebp),%eax - mov 0xc(%ebp),%ecx - mov %ebx,(%ecx) - mov %esi,0x4(%ecx) - mov %edi,0x8(%ecx) - mov 0x0(%ebp),%eax - mov %eax,0xc(%ecx) - lea 0x4(%ebp),%eax - mov %eax,0x10(%ecx) - mov 0x4(%ebp),%eax - mov %eax,0x14(%ecx) - mov $0x0,%eax - leave - ret - -#typedef -#EFI_STATUS -#(EFIAPI *EFI_PEI_TRANSFER_CONTROL_LONG_JUMP) ( -# IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This, -# IN EFI_JUMP_BUFFER *Context -# ); -# -# Routine Description: -# -# This routine implements the IA32 variant of the LongJump call. Its -# responsibility is restore the system state to the Context Buffer and -# pass control back. -# -# Arguments: -# -# Pointer to CPU context save buffer. -# -# Returns: -# -# EFI_WARN_RETURN_FROM_LONG_JUMP -# - -ASM_PFX(TransferControlLongJump): - push %ebp - mov %esp,%ebp - push %ebx - push %esi - push %edi - mov 0x8(%ebp),%eax - mov $0x5,%eax - mov 0xc(%ebp),%ecx - mov (%ecx),%ebx - mov 0x4(%ecx),%esi - mov 0x8(%ecx),%edi - mov 0xc(%ecx),%ebp - mov 0x10(%ecx),%esp - add $0x4,%esp - jmp *0x14(%ecx) - mov $0x5,%eax - pop %edi - pop %esi - pop %ebx - leave - ret - -# -# Routine Description: -# This allows the caller to switch the stack and goes to the new entry point -# -# Arguments: -# EntryPoint - Pointer to the location to enter -# Parameter - Parameter to pass in -# NewStack - New Location of the stack -# NewBsp - New BSP -# -# Returns: -# -# Nothing. Goes to the Entry Point passing in the new parameters -# -#SwitchStacks PROC C \ -# EntryPoint:PTR DWORD, \ -# Parameter:DWORD, \ -# NewStack:PTR DWORD, \ -# NewBsp:PTR DWORD -ASM_PFX(SwitchStacks): - push %ebp - mov %esp,%ebp - push %ebx - mov 0x14(%ebp),%eax - mov 0xc(%ebp),%ebx - mov 0x8(%ebp),%ecx - mov 0x10(%ebp),%eax - mov %eax,%esp - push %ebx - push $0x0 - jmp *%ecx - pop %ebx - leave - ret - - - - -# -# Routine Description: -# This allows the caller to switch the stack and goes to the new entry point -# -# Arguments: -# EntryPoint - Pointer to the location to enter -# Parameter1/Parameter2 - Parameter to pass in -# NewStack - New Location of the stack -# NewBsp - New BSP -# -# Returns: -# -# Nothing. Goes to the Entry Point passing in the new parameters -# -#SwitchIplStacks PROC C \ -# EntryPoint:PTR DWORD, \ -# Parameter1:DWORD, \ -# Parameter2:DWORD, \ -# NewStack:PTR DWORD, \ -# NewBsp:PTR DWORD -ASM_PFX(SwitchIplStacks): - push %ebp - mov %esp,%ebp - push %ebx - mov 0x18(%ebp),%eax - mov 0xc(%ebp),%ebx - mov 0x10(%ebp),%edx - mov 0x8(%ebp),%ecx - mov 0x14(%ebp),%eax - mov %eax,%esp - push %edx - push %ebx - call *%ecx - pop %ebx - leave - ret - -#SwitchIplStacks ENDP - - - +# +# Copyright (c) 2004, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# ProcessorAsms.Asm +# +# +# +#include "EfiBind.h" +#------------------------------------------------------------------------------ + + .686P: + .MMX: + #.MODEL SMALL + .CODE: +#------------------------------------------------------------------------------ + +.globl ASM_PFX(TransferControlSetJump) +.globl ASM_PFX(TransferControlLongJump) +.globl ASM_PFX(SwitchStacks) +.globl ASM_PFX(SwitchIplStacks) + +#define EFI_SUCCESS 0 +#define EFI_WARN_RETURN_FROM_LONG_JUMP 5 + +# +# typedef struct { +# UINT32 ebx; +# UINT32 esi; +# UINT32 edi; +# UINT32 ebp; +# UINT32 esp; +# UINT32 eip; +#} EFI_JUMP_BUFFER; +# + +#typedef +#EFI_STATUS +#(EFIAPI *EFI_PEI_TRANSFER_CONTROL_SET_JUMP) ( +# IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This, +# OUT EFI_JUMP_BUFFER *Context +# ); +# +#Routine Description: +# +# This routine implements the IA32 variant of the SetJump call. Its +# responsibility is to store system state information for a possible +# subsequent LongJump. +# +#Arguments: +# +# Pointer to CPU context save buffer. +# +#Returns: +# +# EFI_SUCCESS +# +ASM_PFX(TransferControlSetJump): + push %ebp + mov %esp,%ebp + mov 0x8(%ebp),%eax + mov 0xc(%ebp),%ecx + mov %ebx,(%ecx) + mov %esi,0x4(%ecx) + mov %edi,0x8(%ecx) + mov 0x0(%ebp),%eax + mov %eax,0xc(%ecx) + lea 0x4(%ebp),%eax + mov %eax,0x10(%ecx) + mov 0x4(%ebp),%eax + mov %eax,0x14(%ecx) + mov $0x0,%eax + leave + ret + +#typedef +#EFI_STATUS +#(EFIAPI *EFI_PEI_TRANSFER_CONTROL_LONG_JUMP) ( +# IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This, +# IN EFI_JUMP_BUFFER *Context +# ); +# +# Routine Description: +# +# This routine implements the IA32 variant of the LongJump call. Its +# responsibility is restore the system state to the Context Buffer and +# pass control back. +# +# Arguments: +# +# Pointer to CPU context save buffer. +# +# Returns: +# +# EFI_WARN_RETURN_FROM_LONG_JUMP +# + +ASM_PFX(TransferControlLongJump): + push %ebp + mov %esp,%ebp + push %ebx + push %esi + push %edi + mov 0x8(%ebp),%eax + mov $0x5,%eax + mov 0xc(%ebp),%ecx + mov (%ecx),%ebx + mov 0x4(%ecx),%esi + mov 0x8(%ecx),%edi + mov 0xc(%ecx),%ebp + mov 0x10(%ecx),%esp + add $0x4,%esp + jmp *0x14(%ecx) + mov $0x5,%eax + pop %edi + pop %esi + pop %ebx + leave + ret + +# +# Routine Description: +# This allows the caller to switch the stack and goes to the new entry point +# +# Arguments: +# EntryPoint - Pointer to the location to enter +# Parameter - Parameter to pass in +# NewStack - New Location of the stack +# NewBsp - New BSP +# +# Returns: +# +# Nothing. Goes to the Entry Point passing in the new parameters +# +#SwitchStacks PROC C \ +# EntryPoint:PTR DWORD, \ +# Parameter:DWORD, \ +# NewStack:PTR DWORD, \ +# NewBsp:PTR DWORD +ASM_PFX(SwitchStacks): + push %ebp + mov %esp,%ebp + push %ebx + mov 0x14(%ebp),%eax + mov 0xc(%ebp),%ebx + mov 0x8(%ebp),%ecx + mov 0x10(%ebp),%eax + mov %eax,%esp + push %ebx + push $0x0 + jmp *%ecx + pop %ebx + leave + ret + + + + +# +# Routine Description: +# This allows the caller to switch the stack and goes to the new entry point +# +# Arguments: +# EntryPoint - Pointer to the location to enter +# Parameter1/Parameter2 - Parameter to pass in +# NewStack - New Location of the stack +# NewBsp - New BSP +# +# Returns: +# +# Nothing. Goes to the Entry Point passing in the new parameters +# +#SwitchIplStacks PROC C \ +# EntryPoint:PTR DWORD, \ +# Parameter1:DWORD, \ +# Parameter2:DWORD, \ +# NewStack:PTR DWORD, \ +# NewBsp:PTR DWORD +ASM_PFX(SwitchIplStacks): + push %ebp + mov %esp,%ebp + push %ebx + mov 0x18(%ebp),%eax + mov 0xc(%ebp),%ebx + mov 0x10(%ebp),%edx + mov 0x8(%ebp),%ecx + mov 0x14(%ebp),%eax + mov %eax,%esp + push %edx + push %ebx + call *%ecx + pop %ebx + leave + ret + +#SwitchIplStacks ENDP + + + diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ipf/PioFlush.s b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ipf/PioFlush.s index 59107f0aee..b2a242bff9 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ipf/PioFlush.s +++ b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ipf/PioFlush.s @@ -46,7 +46,7 @@ .section .rtcode, "ax", "progbits" .align 32 .type RtPioICacheFlush# ,@function - .global RtPioICacheFlush# + .globl RtPioICacheFlush# // Function compile flags: /Ogsy .section .rtcode diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/ProcessorAsms.S b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/ProcessorAsms.S index 48e4b19c88..543bed9fd1 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/ProcessorAsms.S +++ b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/ProcessorAsms.S @@ -1,135 +1,135 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2008, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# ProcessorAsms.S -# -# Abstract: -# This is separated from processor.c to allow this functions to be built with /O1 -# -# -#------------------------------------------------------------------------------ -#include - - .text - -.global ASM_PFX(SwitchStacks) -.global ASM_PFX(TransferControlSetJump) -.global ASM_PFX(TransferControlLongJump) - -# -# Routine Description: -# This allows the caller to switch the stack and goes to the new entry point -# -# Arguments: -# EntryPoint - Pointer to the location to enter // rcx -# Parameter - Parameter to pass in // rdx -# NewStack - New Location of the stack // r8 -# NewBsp - New BSP // r9 - not used -# -# Returns: -# Nothing. Goes to the Entry Point passing in the new parameters -# -ASM_PFX(SwitchStacks): - - # Adjust stack for - # 1) leave 4 registers space - # 2) let it 16 bytes aligned after call - sub $0x20,%r8 - and -0x10,%r8w # do not assume 16 bytes aligned - - mov %r8,%rsp - mov %rcx,%r10 - mov %rdx,%rcx - callq *%r10 - - # - # no ret as we have a new stack and we jumped to the new location - # - ret - -#SwitchStacks ENDP - - -.equ EFI_SUCCESS, 0 -.equ EFI_WARN_RETURN_FROM_LONG_JUMP, 5 - -# -#Routine Description: -# -# This routine implements the x64 variant of the SetJump call. Its -# responsibility is to store system state information for a possible -# subsequent LongJump. -# -#Arguments: -# -# Pointer to CPU context save buffer. -# -#Returns: -# -# EFI_SUCCESS -# -# EFI_STATUS -# EFIAPI -# TransferControlLongJump ( -# IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This, -# IN EFI_JUMP_BUFFER *Jump -# ); -# -# rcx - *This -# rdx - JumpBuffer -# -ASM_PFX(TransferControlSetJump): - mov %rbx,(%rdx) - mov %rsp,0x8(%rdx) - mov %rbp,0x10(%rdx) - mov %rdi,0x18(%rdx) - mov %rsi,0x20(%rdx) - mov %r10,0x28(%rdx) - mov %r11,0x30(%rdx) - mov %r12,0x38(%rdx) - mov %r13,0x40(%rdx) - mov %r14,0x48(%rdx) - mov %r15,0x50(%rdx) - mov (%rsp),%rax - mov %rax,0x58(%rdx) - mov $0x0,%rax - retq - - -# -# EFI_STATUS -# EFIAPI -# TransferControlLongJump ( -# IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This, // rcx -# IN EFI_JUMP_BUFFER *Jump // rdx -# ); -# -# -ASM_PFX(TransferControlLongJump): - # set return from SetJump to EFI_WARN_RETURN_FROM_LONG_JUMP - mov $0x5,%rax - mov (%rdx),%rbx - mov 0x8(%rdx),%rsp - mov 0x10(%rdx),%rbp - mov 0x18(%rdx),%rdi - mov 0x20(%rdx),%rsi - mov 0x28(%rdx),%r10 - mov 0x30(%rdx),%r11 - mov 0x38(%rdx),%r12 - mov 0x40(%rdx),%r13 - mov 0x48(%rdx),%r14 - mov 0x50(%rdx),%r15 - add $0x8,%rsp - jmpq *0x58(%rdx) - mov $0x5,%rax - retq - +#------------------------------------------------------------------------------ +# +# Copyright (c) 2008, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# ProcessorAsms.S +# +# Abstract: +# This is separated from processor.c to allow this functions to be built with /O1 +# +# +#------------------------------------------------------------------------------ +#include + + .text + +.globl ASM_PFX(SwitchStacks) +.globl ASM_PFX(TransferControlSetJump) +.globl ASM_PFX(TransferControlLongJump) + +# +# Routine Description: +# This allows the caller to switch the stack and goes to the new entry point +# +# Arguments: +# EntryPoint - Pointer to the location to enter // rcx +# Parameter - Parameter to pass in // rdx +# NewStack - New Location of the stack // r8 +# NewBsp - New BSP // r9 - not used +# +# Returns: +# Nothing. Goes to the Entry Point passing in the new parameters +# +ASM_PFX(SwitchStacks): + + # Adjust stack for + # 1) leave 4 registers space + # 2) let it 16 bytes aligned after call + sub $0x20,%r8 + and -0x10,%r8w # do not assume 16 bytes aligned + + mov %r8,%rsp + mov %rcx,%r10 + mov %rdx,%rcx + callq *%r10 + + # + # no ret as we have a new stack and we jumped to the new location + # + ret + +#SwitchStacks ENDP + + +.equ EFI_SUCCESS, 0 +.equ EFI_WARN_RETURN_FROM_LONG_JUMP, 5 + +# +#Routine Description: +# +# This routine implements the x64 variant of the SetJump call. Its +# responsibility is to store system state information for a possible +# subsequent LongJump. +# +#Arguments: +# +# Pointer to CPU context save buffer. +# +#Returns: +# +# EFI_SUCCESS +# +# EFI_STATUS +# EFIAPI +# TransferControlLongJump ( +# IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This, +# IN EFI_JUMP_BUFFER *Jump +# ); +# +# rcx - *This +# rdx - JumpBuffer +# +ASM_PFX(TransferControlSetJump): + mov %rbx,(%rdx) + mov %rsp,0x8(%rdx) + mov %rbp,0x10(%rdx) + mov %rdi,0x18(%rdx) + mov %rsi,0x20(%rdx) + mov %r10,0x28(%rdx) + mov %r11,0x30(%rdx) + mov %r12,0x38(%rdx) + mov %r13,0x40(%rdx) + mov %r14,0x48(%rdx) + mov %r15,0x50(%rdx) + mov (%rsp),%rax + mov %rax,0x58(%rdx) + mov $0x0,%rax + retq + + +# +# EFI_STATUS +# EFIAPI +# TransferControlLongJump ( +# IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This, // rcx +# IN EFI_JUMP_BUFFER *Jump // rdx +# ); +# +# +ASM_PFX(TransferControlLongJump): + # set return from SetJump to EFI_WARN_RETURN_FROM_LONG_JUMP + mov $0x5,%rax + mov (%rdx),%rbx + mov 0x8(%rdx),%rsp + mov 0x10(%rdx),%rbp + mov 0x18(%rdx),%rdi + mov 0x20(%rdx),%rsi + mov 0x28(%rdx),%r10 + mov 0x30(%rdx),%r11 + mov 0x38(%rdx),%r12 + mov 0x40(%rdx),%r13 + mov 0x48(%rdx),%r14 + mov 0x50(%rdx),%r15 + add $0x8,%rsp + jmpq *0x58(%rdx) + mov $0x5,%rax + retq + diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/SupportItpDebug.S b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/SupportItpDebug.S index 4a2d63a7fb..fcbf2bacf7 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/SupportItpDebug.S +++ b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/SupportItpDebug.S @@ -1,78 +1,78 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2008, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# SupportItpDebug.S -# -# Abstract: -# -# This is the code for debuging X64, to add a break hook at loading every module -# -#------------------------------------------------------------------------------ -#include - - .text - -.global ASM_PFX(AsmEfiSetBreakSupport) - -#------------------------------------------------------------------------------ -# VOID -# AsmEfiSetBreakSupport ( -# IN UINTN LoadAddr // rcx -# ) -#------------------------------------------------------------------------------ - -ASM_PFX(AsmEfiSetBreakSupport): - - movw $60000, %dx - outl %eax, %dx - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - ret - - - - +#------------------------------------------------------------------------------ +# +# Copyright (c) 2008, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# SupportItpDebug.S +# +# Abstract: +# +# This is the code for debuging X64, to add a break hook at loading every module +# +#------------------------------------------------------------------------------ +#include + + .text + +.globl ASM_PFX(AsmEfiSetBreakSupport) + +#------------------------------------------------------------------------------ +# VOID +# AsmEfiSetBreakSupport ( +# IN UINTN LoadAddr // rcx +# ) +#------------------------------------------------------------------------------ + +ASM_PFX(AsmEfiSetBreakSupport): + + movw $60000, %dx + outl %eax, %dx + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + ret + + + + diff --git a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ia32/CpuFlushCache.S b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ia32/CpuFlushCache.S index 8ed1a50cc0..289dbe591a 100644 --- a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ia32/CpuFlushCache.S +++ b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ia32/CpuFlushCache.S @@ -1,61 +1,61 @@ -#/*++ -# -#Copyright (c) 2008, 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 -#which accompanies this distribution. The full text of the license may be found at -#http://opensource.org/licenses/bsd-license.php - # -#THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -#WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -#Module Name: -# - #CpuFlushCache.c -# -#Abstract: -# - #Cpu Flush Cache Function. -# -#--*/ -#--------------------------------------------------------------------------- -#include - - .586p: - #.MODEL flat,C - .code: - -#--------------------------------------------------------------------------- -.global ASM_PFX(EfiCpuFlushCache) - -# -#// -#// Cache Flush Routine. -#// -#EFI_STATUS -#EfiCpuFlushCache ( - #IN EFI_PHYSICAL_ADDRESS Start, -# IN UINT64 Length - #) -#/*++ -# -#Routine Description: -# - #Flush cache with specified range. -# -#Arguments: -# - #Start - Start address -# Length - Length in bytes -# -#Returns: -# - #Status code -# - #EFI_SUCCESS - success -# -#--*/ -ASM_PFX(EfiCpuFlushCache): - wbinvd - xorl %eax, %eax - ret +#/*++ +# +#Copyright (c) 2008, 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 +#which accompanies this distribution. The full text of the license may be found at +#http://opensource.org/licenses/bsd-license.php + # +#THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +#WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +#Module Name: +# + #CpuFlushCache.c +# +#Abstract: +# + #Cpu Flush Cache Function. +# +#--*/ +#--------------------------------------------------------------------------- +#include + + .586p: + #.MODEL flat,C + .code: + +#--------------------------------------------------------------------------- +.globl ASM_PFX(EfiCpuFlushCache) + +# +#// +#// Cache Flush Routine. +#// +#EFI_STATUS +#EfiCpuFlushCache ( + #IN EFI_PHYSICAL_ADDRESS Start, +# IN UINT64 Length + #) +#/*++ +# +#Routine Description: +# + #Flush cache with specified range. +# +#Arguments: +# + #Start - Start address +# Length - Length in bytes +# +#Returns: +# + #Status code +# + #EFI_SUCCESS - success +# +#--*/ +ASM_PFX(EfiCpuFlushCache): + wbinvd + xorl %eax, %eax + ret diff --git a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ipf/EsalLib.s b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ipf/EsalLib.s index 92f35ccb05..ebbbf16477 100644 --- a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ipf/EsalLib.s +++ b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ipf/EsalLib.s @@ -26,7 +26,7 @@ // // Exports // -.global GetEsalEntryPoint +.globl GetEsalEntryPoint //----------------------------------------------------------------------------- diff --git a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/X64/RuntimeLibAsm.S b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/X64/RuntimeLibAsm.S index 31bc7c5a82..b43c98fd0c 100644 --- a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/X64/RuntimeLibAsm.S +++ b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/X64/RuntimeLibAsm.S @@ -1,37 +1,37 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2008, 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 -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# RuntimeLibAsm.S -# -# Abstract: -# -# -#------------------------------------------------------------------------------ -#include - -.text - -.global ASM_PFX(EfiCpuFlushCache) -#------------------------------------------------------------------------------ -#EFI_STATUS -#EfiCpuFlushCache ( -# IN EFI_PHYSICAL_ADDRESS Start, -# IN UINT64 Length -# ); -#------------------------------------------------------------------------------ - -ASM_PFX(EfiCpuFlushCache): - wbinvd - mov $0, %rax - ret - +#------------------------------------------------------------------------------ +# +# Copyright (c) 2008, 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 +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +# Module Name: +# +# RuntimeLibAsm.S +# +# Abstract: +# +# +#------------------------------------------------------------------------------ +#include + +.text + +.globl ASM_PFX(EfiCpuFlushCache) +#------------------------------------------------------------------------------ +#EFI_STATUS +#EfiCpuFlushCache ( +# IN EFI_PHYSICAL_ADDRESS Start, +# IN UINT64 Length +# ); +#------------------------------------------------------------------------------ + +ASM_PFX(EfiCpuFlushCache): + wbinvd + mov $0, %rax + ret + diff --git a/EdkCompatibilityPkg/Foundation/Library/Thunk16/Ia32/Thunk16.S b/EdkCompatibilityPkg/Foundation/Library/Thunk16/Ia32/Thunk16.S index 640f07a1af..704bbef387 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Thunk16/Ia32/Thunk16.S +++ b/EdkCompatibilityPkg/Foundation/Library/Thunk16/Ia32/Thunk16.S @@ -73,7 +73,7 @@ ASM_PFX(Thunk16): pop %ecx rep movsl %ds:(%esi),%es:(%edi) #; copy context to 16-bit stack pop %ebx #; ebx <- 16-bit stack offset - mov $L_Label1,%eax + mov $L_Lable1,%eax stos %eax,%es:(%edi) movl %cs,%eax stos %ax,%es:(%edi) diff --git a/EdkCompatibilityPkg/Foundation/Library/Thunk16/X64/Fx.S b/EdkCompatibilityPkg/Foundation/Library/Thunk16/X64/Fx.S index 60ecdb7d25..032a98b7d4 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Thunk16/X64/Fx.S +++ b/EdkCompatibilityPkg/Foundation/Library/Thunk16/X64/Fx.S @@ -1,48 +1,48 @@ -#***************************************************************************** -#* -#* Copyright (c) 2008, 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 -#* which accompanies this distribution. The full text of the license may be found at -#* http://opensource.org/licenses/bsd-license.php -#* -#* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -#* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -#* -#* Module Name: -#* -#* Fx.S -#* -#* Abstract: -#* -#* AsmFxRestore and AsmFxSave function -#* -#***************************************************************************** -#include - -.global ASM_PFX(AsmFxSave) -.global ASM_PFX(AsmFxRestore) - - .text - -#------------------------------------------------------------------------------ -# VOID -# AsmFxSave ( -# OUT IA32_FX_BUFFER *Buffer -# ); -#------------------------------------------------------------------------------ -ASM_PFX(AsmFxSave): - fxsave (%rcx) - retq - -#------------------------------------------------------------------------------ -# VOID -# AsmFxRestore ( -# IN CONST IA32_FX_BUFFER *Buffer -# ); -#------------------------------------------------------------------------------ - -ASM_PFX(AsmFxRestore): - fxrstor (%rcx) - retq +#***************************************************************************** +#* +#* Copyright (c) 2008, 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 +#* which accompanies this distribution. The full text of the license may be found at +#* http://opensource.org/licenses/bsd-license.php +#* +#* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +#* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +#* +#* Module Name: +#* +#* Fx.S +#* +#* Abstract: +#* +#* AsmFxRestore and AsmFxSave function +#* +#***************************************************************************** +#include + +.globl ASM_PFX(AsmFxSave) +.globl ASM_PFX(AsmFxRestore) + + .text + +#------------------------------------------------------------------------------ +# VOID +# AsmFxSave ( +# OUT IA32_FX_BUFFER *Buffer +# ); +#------------------------------------------------------------------------------ +ASM_PFX(AsmFxSave): + fxsave (%rcx) + retq + +#------------------------------------------------------------------------------ +# VOID +# AsmFxRestore ( +# IN CONST IA32_FX_BUFFER *Buffer +# ); +#------------------------------------------------------------------------------ + +ASM_PFX(AsmFxRestore): + fxrstor (%rcx) + retq \ No newline at end of file