summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-08-20 08:19:39 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-08-20 08:19:39 +0000
commitb341712e314a6161120c30d41e6308bc6aeb2213 (patch)
tree4c3b6b6bd98ab567340b2ff1b690a058301e8594
parentec25b43fbdb33e26320a49cd1033125bd057c131 (diff)
downloadedk2-platforms-b341712e314a6161120c30d41e6308bc6aeb2213.tar.xz
Update to make end-of-line consistent for all source files in MdePkg. There are no other updates besides that change.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9160 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/X64/Cpu.S322
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuIdEx.S138
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32.S86
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LShiftU64.S86
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LongJump.S86
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x32.S86
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RShiftU64.S92
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SwapBytes64.S80
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuBreakpoint.S52
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuId.S124
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuIdEx.S126
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisablePaging64.S132
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S74
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableInterrupts.S70
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnablePaging64.S122
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FlushCacheLine.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxRestore.S70
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxSave.S70
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.S78
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedDecrement.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedIncrement.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Invd.S70
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Monitor.S82
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Mwait.S78
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr0.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr2.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr3.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr4.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCs.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr0.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr1.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr2.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr3.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr4.S74
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr5.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr6.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr7.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDs.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEflags.S74
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEs.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadFs.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGdtr.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGs.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadIdtr.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadLdtr.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm0.S74
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm1.S74
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm2.S74
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm3.S74
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm4.S74
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm5.S74
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm6.S74
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm7.S74
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMsr64.S76
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadPmc.S76
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadSs.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTr.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTsc.S76
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SetJump.S84
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SwitchStack.S88
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Thunk16.S616
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Wbinvd.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr0.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr2.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr3.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr4.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr0.S74
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr1.S74
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr2.S74
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr3.S74
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr4.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr5.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr6.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr7.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteGdtr.S70
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteIdtr.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteLdtr.S72
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm0.S70
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm1.S70
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm2.S70
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm3.S70
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm4.S70
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm5.S70
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm6.S70
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm7.S70
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.S80
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CompareMem.S106
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CopyMem.S130
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem16.S100
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem32.S100
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem64.S118
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem8.S100
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem.S92
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem16.S86
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem32.S86
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem64.S92
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ZeroMem.S98
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CompareMem.S116
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CopyMem.S134
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem16.S110
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem32.S110
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem64.S110
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem8.S110
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem.S96
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem16.S96
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem32.S96
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem64.S94
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ZeroMem.S102
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/DivU64x32.S182
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.S404
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiSetMem.S316
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiZeroMem.S278
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/GetPowerOfTwo.S136
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/LShiftU64.S164
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Log2.S156
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/MultU64x32.S142
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.S164
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/RShiftU64.S160
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep1.S132
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep4.S108
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep4.S90
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/ProcessorAsms.S414
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/ReadIdt.S138
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/SupportItpDebug.S142
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/WriteIdt.S100
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/ProcessorAsms.S270
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/SupportItpDebug.S156
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ia32/CpuFlushCache.S122
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/X64/RuntimeLibAsm.S74
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Thunk16/Ia32/Fx.S108
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Thunk16/Ia32/Thunk16.S366
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Thunk16/X64/Fx.S94
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Thunk16/X64/Thunk16.S402
133 files changed, 7253 insertions, 7253 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/X64/Cpu.S b/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/X64/Cpu.S
index 3920804828..8ba36775ff 100644
--- a/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/X64/Cpu.S
+++ b/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/X64/Cpu.S
@@ -1,79 +1,79 @@
-#------------------------------------------------------------------------------
-#*
-#* 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:
-#*
-#* Cpu.asm
-#*
-#* Abstract:
-#*
-#------------------------------------------------------------------------------
-#include <EfiBind.h>
-
-.globl ASM_PFX(EfiHalt)
-.globl ASM_PFX(EfiWbinvd)
-.globl ASM_PFX(EfiInvd)
-.globl ASM_PFX(EfiCpuid)
-.globl ASM_PFX(EfiReadTsc)
-.globl ASM_PFX(EfiDisableCache)
-.globl ASM_PFX(EfiEnableCache)
-.globl ASM_PFX(EfiReadMsr)
-.globl ASM_PFX(EfiGetEflags)
-.globl ASM_PFX(EfiDisableInterrupts)
-.globl ASM_PFX(EfiEnableInterrupts)
-.globl ASM_PFX(EfiCpuidExt)
-
-.text
-
-
-#------------------------------------------------------------------------------
-# VOID
-# EfiHalt (
-# VOID
-# )
-#------------------------------------------------------------------------------
-ASM_PFX(EfiHalt):
- hlt
- retq
-
-
-#------------------------------------------------------------------------------
-# VOID
-# EfiWbinvd (
-# VOID
-# )
-#------------------------------------------------------------------------------
-ASM_PFX(EfiWbinvd):
- wbinvd
- retq
-
-
-#------------------------------------------------------------------------------
-# VOID
-# EfiInvd (
-# VOID
-# )
-#------------------------------------------------------------------------------
-ASM_PFX(EfiInvd):
- invd
- retq
-
-#------------------------------------------------------------------------------
-# VOID
-# EfiCpuid (
-# IN UINT32 RegisterInEax, // rcx
-# OUT EFI_CPUID_REGISTER *Reg OPTIONAL // rdx
-# )
-#------------------------------------------------------------------------------
-ASM_PFX(EfiCpuid):
+#------------------------------------------------------------------------------
+#*
+#* 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:
+#*
+#* Cpu.asm
+#*
+#* Abstract:
+#*
+#------------------------------------------------------------------------------
+#include <EfiBind.h>
+
+.globl ASM_PFX(EfiHalt)
+.globl ASM_PFX(EfiWbinvd)
+.globl ASM_PFX(EfiInvd)
+.globl ASM_PFX(EfiCpuid)
+.globl ASM_PFX(EfiReadTsc)
+.globl ASM_PFX(EfiDisableCache)
+.globl ASM_PFX(EfiEnableCache)
+.globl ASM_PFX(EfiReadMsr)
+.globl ASM_PFX(EfiGetEflags)
+.globl ASM_PFX(EfiDisableInterrupts)
+.globl ASM_PFX(EfiEnableInterrupts)
+.globl ASM_PFX(EfiCpuidExt)
+
+.text
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EfiHalt (
+# VOID
+# )
+#------------------------------------------------------------------------------
+ASM_PFX(EfiHalt):
+ hlt
+ retq
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EfiWbinvd (
+# VOID
+# )
+#------------------------------------------------------------------------------
+ASM_PFX(EfiWbinvd):
+ wbinvd
+ retq
+
+
+#------------------------------------------------------------------------------
+# VOID
+# EfiInvd (
+# VOID
+# )
+#------------------------------------------------------------------------------
+ASM_PFX(EfiInvd):
+ invd
+ retq
+
+#------------------------------------------------------------------------------
+# VOID
+# EfiCpuid (
+# IN UINT32 RegisterInEax, // rcx
+# OUT EFI_CPUID_REGISTER *Reg OPTIONAL // rdx
+# )
+#------------------------------------------------------------------------------
+ASM_PFX(EfiCpuid):
push %rbx
mov %rdx,%r8
mov %rcx,%rax
@@ -83,56 +83,56 @@ ASM_PFX(EfiCpuid):
mov %eax,(%r8)
mov %ebx,0x4(%r8)
mov %ecx,0x8(%r8)
- mov %edx,0xc(%r8)
-_Exit:
- pop %rbx
- retq
-
-#------------------------------------------------------------------------------
-# UINT64
-# EfiReadMsr (
-# IN UINT32 Index, // rcx
-# )
-#------------------------------------------------------------------------------
-ASM_PFX(EfiReadMsr):
+ mov %edx,0xc(%r8)
+_Exit:
+ pop %rbx
+ retq
+
+#------------------------------------------------------------------------------
+# UINT64
+# EfiReadMsr (
+# IN UINT32 Index, // rcx
+# )
+#------------------------------------------------------------------------------
+ASM_PFX(EfiReadMsr):
rdmsr
shl $0x20,%rdx
or %rdx,%rax
retq
-
-#------------------------------------------------------------------------------
-# VOID
-# EfiWriteMsr (
-# IN UINT32 Index, // rcx
-# IN UINT64 Value // rdx
-# )
-#------------------------------------------------------------------------------
-ASM_PFX(EfiWriteMsr):
+
+#------------------------------------------------------------------------------
+# VOID
+# EfiWriteMsr (
+# IN UINT32 Index, // rcx
+# IN UINT64 Value // rdx
+# )
+#------------------------------------------------------------------------------
+ASM_PFX(EfiWriteMsr):
mov %rdx,%rax
sar $0x20,%rdx
wrmsr
- retq
-
-#------------------------------------------------------------------------------
-# UINT64
-# EfiReadTsc (
-# VOID
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(EfiReadTsc):
+ retq
+
+#------------------------------------------------------------------------------
+# UINT64
+# EfiReadTsc (
+# VOID
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(EfiReadTsc):
rdtsc
shl $0x20,%rax
shrd $0x20,%rdx,%rax
retq
-
-#------------------------------------------------------------------------------
-# VOID
-# EfiDisableCache (
-# VOID
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(EfiDisableCache):
-# added a check to see if cache is already disabled. If it is, then skip.
+
+#------------------------------------------------------------------------------
+# VOID
+# EfiDisableCache (
+# VOID
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(EfiDisableCache):
+# added a check to see if cache is already disabled. If it is, then skip.
mov %cr0,%rax
and $0x60000000,%rax
cmp $0x0,%rax
@@ -141,61 +141,61 @@ ASM_PFX(EfiDisableCache):
or $0x60000000,%rax
mov %rax,%cr0
wbinvd
-1:
+1:
retq
-
-#------------------------------------------------------------------------------
-# VOID
-# EfiEnableCache (
-# VOID
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(EfiEnableCache):
+
+#------------------------------------------------------------------------------
+# VOID
+# EfiEnableCache (
+# VOID
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(EfiEnableCache):
invd
mov %cr0,%rax
and $0xffffffff9fffffff,%rax
mov %rax,%cr0
retq
-
-#------------------------------------------------------------------------------
-# UINTN
-# EfiGetEflags (
-# VOID
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(EfiGetEflags):
+
+#------------------------------------------------------------------------------
+# UINTN
+# EfiGetEflags (
+# VOID
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(EfiGetEflags):
pushfq
pop %rax
retq
-
-#------------------------------------------------------------------------------
-# VOID
-# EfiDisableInterrupts (
-# VOID
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(EfiDisableInterrupts):
- cli
- ret
-
-#------------------------------------------------------------------------------
-# VOID
-# EfiEnableInterrupts (
-# VOID
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(EfiEnableInterrupts):
- sti
- ret
-#------------------------------------------------------------------------------
-# VOID
-# EfiCpuidExt (
-# IN UINT32 RegisterInEax,
-# IN UINT32 CacheLevel,
-# OUT EFI_CPUID_REGISTER *Regs
-# )
-#------------------------------------------------------------------------------
-ASM_PFX(EfiCpuidExt):
+
+#------------------------------------------------------------------------------
+# VOID
+# EfiDisableInterrupts (
+# VOID
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(EfiDisableInterrupts):
+ cli
+ ret
+
+#------------------------------------------------------------------------------
+# VOID
+# EfiEnableInterrupts (
+# VOID
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(EfiEnableInterrupts):
+ sti
+ ret
+#------------------------------------------------------------------------------
+# VOID
+# EfiCpuidExt (
+# IN UINT32 RegisterInEax,
+# IN UINT32 CacheLevel,
+# OUT EFI_CPUID_REGISTER *Regs
+# )
+#------------------------------------------------------------------------------
+ASM_PFX(EfiCpuidExt):
push %rbx
mov %rcx,%rax
mov %rdx,%rcx
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuIdEx.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuIdEx.S
index 8d3887f56c..a6e8e2dd3c 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuIdEx.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuIdEx.S
@@ -1,69 +1,69 @@
-#------------------------------------------------------------------------------
-#
-# 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 <EdkIIGlueBase.h>
-
- .686:
- .code:
-
-#------------------------------------------------------------------------------
-# 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 %ebx
- push %ebp
- movl %esp, %ebp
- movl 12(%ebp), %eax
- movl 16(%ebp), %ecx
- cpuid
- push %ecx
- movl 20(%ebp), %ecx
- jecxz L1
- movl %eax, (%ecx)
-L1:
- movl 24(%ebp), %ecx
- jecxz L2
- movl %ebx, (%ecx)
-L2:
- movl 28(%ebp), %ecx
- jecxz L3
- popl (%ecx)
-L3:
- movl 32(%ebp), %edx
- jecxz L4
- movl %edx, (%ecx)
-L4:
- movl 12(%ebp), %eax
- leave
- pop %ebx
- 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 <EdkIIGlueBase.h>
+
+ .686:
+ .code:
+
+#------------------------------------------------------------------------------
+# 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 %ebx
+ push %ebp
+ movl %esp, %ebp
+ movl 12(%ebp), %eax
+ movl 16(%ebp), %ecx
+ cpuid
+ push %ecx
+ movl 20(%ebp), %ecx
+ jecxz L1
+ movl %eax, (%ecx)
+L1:
+ movl 24(%ebp), %ecx
+ jecxz L2
+ movl %ebx, (%ecx)
+L2:
+ movl 28(%ebp), %ecx
+ jecxz L3
+ popl (%ecx)
+L3:
+ movl 32(%ebp), %edx
+ jecxz L4
+ movl %edx, (%ecx)
+L4:
+ movl 12(%ebp), %eax
+ leave
+ pop %ebx
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32.S
index 44dc92e5bb..0aaef5ae3b 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/DivU64x32.S
@@ -1,43 +1,43 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# DivU64x32.asm
-#
-# Abstract:
-#
-# Calculate the quotient of a 64-bit integer by a 32-bit integer
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-
-.globl ASM_PFX(InternalMathDivU64x32)
-
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# InternalMathDivU64x32 (
-# IN UINT64 Dividend,
-# IN UINT32 Divisor
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMathDivU64x32):
- movl 8(%esp), %eax
- movl 12(%esp), %ecx
- xorl %edx, %edx
- divl %ecx
- push %eax
- movl 8(%esp), %eax
- divl %ecx
- pop %edx
- 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:
+#
+# DivU64x32.asm
+#
+# Abstract:
+#
+# Calculate the quotient of a 64-bit integer by a 32-bit integer
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+
+.globl ASM_PFX(InternalMathDivU64x32)
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# InternalMathDivU64x32 (
+# IN UINT64 Dividend,
+# IN UINT32 Divisor
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMathDivU64x32):
+ movl 8(%esp), %eax
+ movl 12(%esp), %ecx
+ xorl %edx, %edx
+ divl %ecx
+ push %eax
+ movl 8(%esp), %eax
+ divl %ecx
+ pop %edx
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LShiftU64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LShiftU64.S
index f574841b8e..3c9ac12cd0 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LShiftU64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LShiftU64.S
@@ -1,43 +1,43 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# LShiftU64.asm
-#
-# Abstract:
-#
-# 64-bit left shift function for IA-32
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-
-.globl ASM_PFX(InternalMathLShiftU64)
-
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# InternalMathLShiftU64 (
-# IN UINT64 Operand,
-# IN UINTN Count
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMathLShiftU64):
- movb 12(%esp), %cl
- xorl %eax, %eax
- movl 4(%esp), %edx
- testb $32, %cl
- cmovz %edx, %eax
- cmovz 0x8(%esp), %edx
- shld %cl, %eax, %edx
- shl %cl, %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:
+#
+# LShiftU64.asm
+#
+# Abstract:
+#
+# 64-bit left shift function for IA-32
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+
+.globl ASM_PFX(InternalMathLShiftU64)
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# InternalMathLShiftU64 (
+# IN UINT64 Operand,
+# IN UINTN Count
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMathLShiftU64):
+ movb 12(%esp), %cl
+ xorl %eax, %eax
+ movl 4(%esp), %edx
+ testb $32, %cl
+ cmovz %edx, %eax
+ cmovz 0x8(%esp), %edx
+ shld %cl, %eax, %edx
+ shl %cl, %eax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LongJump.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LongJump.S
index 424d6f02a7..131d174c7e 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LongJump.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/LongJump.S
@@ -1,43 +1,43 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# LongJump.Asm
-#
-# Abstract:
-#
-# Implementation of _LongJump() on IA-32.
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-
-.globl ASM_PFX(InternalLongJump)
-
-#------------------------------------------------------------------------------
-# VOID
-# EFIAPI
-# InternalLongJump (
-# IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer,
-# IN UINTN Value
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalLongJump):
- pop %eax
- pop %edx
- pop %eax
- movl (%edx), %ebx
- movl 4(%edx), %esi
- movl 8(%edx), %edi
- movl 12(%edx), %ebp
- movl 16(%edx), %esp
- jmp *20(%edx)
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# LongJump.Asm
+#
+# Abstract:
+#
+# Implementation of _LongJump() on IA-32.
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+
+.globl ASM_PFX(InternalLongJump)
+
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# InternalLongJump (
+# IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer,
+# IN UINTN Value
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(InternalLongJump):
+ pop %eax
+ pop %edx
+ pop %eax
+ movl (%edx), %ebx
+ movl 4(%edx), %esi
+ movl 8(%edx), %edi
+ movl 12(%edx), %ebp
+ movl 16(%edx), %esp
+ jmp *20(%edx)
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x32.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x32.S
index e1203ccc11..6476686f66 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x32.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/MultU64x32.S
@@ -1,43 +1,43 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# MultU64x32.asm
-#
-# Abstract:
-#
-# Calculate the product of a 64-bit integer and a 32-bit integer
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-
- .386:
- .code:
-
-.globl ASM_PFX(InternalMathMultU64x32)
-
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# InternalMathMultU64x32 (
-# IN UINT64 Multiplicand,
-# IN UINT32 Multiplier
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMathMultU64x32):
- movl 12(%esp), %ecx
- movl %ecx, %eax
- imull 8(%esp), %ecx
- mull 0x4(%esp)
- addl %ecx, %edx
- 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:
+#
+# MultU64x32.asm
+#
+# Abstract:
+#
+# Calculate the product of a 64-bit integer and a 32-bit integer
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+
+ .386:
+ .code:
+
+.globl ASM_PFX(InternalMathMultU64x32)
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# InternalMathMultU64x32 (
+# IN UINT64 Multiplicand,
+# IN UINT32 Multiplier
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMathMultU64x32):
+ movl 12(%esp), %ecx
+ movl %ecx, %eax
+ imull 8(%esp), %ecx
+ mull 0x4(%esp)
+ addl %ecx, %edx
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RShiftU64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RShiftU64.S
index dd8c5615bd..e8110121a9 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RShiftU64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/RShiftU64.S
@@ -1,46 +1,46 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# RShiftU64.asm
-#
-# Abstract:
-#
-# 64-bit logical right shift function for IA-32
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-
- .686:
- .code:
-
-.globl ASM_PFX(InternalMathRShiftU64)
-
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# InternalMathRShiftU64 (
-# IN UINT64 Operand,
-# IN UINTN Count
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMathRShiftU64):
- movb 12(%esp), %cl
- xorl %edx, %edx
- movl 8(%esp), %eax
- testb $32, %cl
- cmovz %eax, %edx
- cmovz 0x4(%esp), %eax
- shrdl %cl, %edx, %eax
- shr %cl, %edx
- 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:
+#
+# RShiftU64.asm
+#
+# Abstract:
+#
+# 64-bit logical right shift function for IA-32
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+
+ .686:
+ .code:
+
+.globl ASM_PFX(InternalMathRShiftU64)
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# InternalMathRShiftU64 (
+# IN UINT64 Operand,
+# IN UINTN Count
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMathRShiftU64):
+ movb 12(%esp), %cl
+ xorl %edx, %edx
+ movl 8(%esp), %eax
+ testb $32, %cl
+ cmovz %eax, %edx
+ cmovz 0x4(%esp), %eax
+ shrdl %cl, %edx, %eax
+ shr %cl, %edx
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SwapBytes64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SwapBytes64.S
index d1e48dcfd0..4416c4956d 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SwapBytes64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SwapBytes64.S
@@ -1,40 +1,40 @@
-#------------------------------------------------------------------------------
-#
-# 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.Asm
-#
-# Abstract:
-#
-# AsmCpuid function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-
-
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# InternalMathSwapBytes64 (
-# IN UINT64 Operand
-# );
-#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMathSwapBytes64)
-ASM_PFX(InternalMathSwapBytes64):
- movl 8(%esp), %eax
- movl 4(%esp), %edx
- bswapl %eax
- bswapl %edx
- 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.Asm
+#
+# Abstract:
+#
+# AsmCpuid function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+
+
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# InternalMathSwapBytes64 (
+# IN UINT64 Operand
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(InternalMathSwapBytes64)
+ASM_PFX(InternalMathSwapBytes64):
+ movl 8(%esp), %eax
+ movl 4(%esp), %edx
+ bswapl %eax
+ bswapl %edx
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuBreakpoint.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuBreakpoint.S
index 3f5bd791dd..ec9a750e63 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 <EdkIIGlueBase.h>
-
-.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 <EdkIIGlueBase.h>
+
+.global 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 4e431b0482..8bf4b2b729 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 <EdkIIGlueBase.h>
-
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+
+#------------------------------------------------------------------------------
+# 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
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuIdEx.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuIdEx.S
index 1bddc51ad5..a40be32285 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 <EdkIIGlueBase.h>
-
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+
+#------------------------------------------------------------------------------
+# 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
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisablePaging64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisablePaging64.S
index 89f71e6192..e559246c59 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# 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 .
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S
index 189316763c..18444e7a2e 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S
@@ -1,37 +1,37 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# EnableDisableInterrupts.S
-#
-# Abstract:
-#
-# EnableDisableInterrupts function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# VOID
-# EFIAPI
-# EnableDisableInterrupts (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(EnableDisableInterrupts)
-.align 16
-ASM_PFX(EnableDisableInterrupts):
- sti
- cli
- 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:
+#
+# EnableDisableInterrupts.S
+#
+# Abstract:
+#
+# EnableDisableInterrupts function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# EnableDisableInterrupts (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(EnableDisableInterrupts)
+.align 16
+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 d0c6eab36d..a3b6945325 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# EnableInterrupts (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global 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 883c011543..c59b53bc95 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# 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 .
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FlushCacheLine.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FlushCacheLine.S
index 3e6bc73d63..ee34b60e6a 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID *
+# EFIAPI
+# AsmFlushCacheLine (
+# IN VOID *LinearAddress
+# );
+#------------------------------------------------------------------------------
+.global 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 2223c71a1e..39fe7363c5 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# InternalX86FxRestore (
+# IN CONST IA32_FX_BUFFER *Buffer
+# )#
+#------------------------------------------------------------------------------
+.global 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 8a1d32ee78..dbf5a4666d 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# InternalX86FxSave (
+# OUT IA32_FX_BUFFER *Buffer
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(InternalX86FxSave)
+ASM_PFX(InternalX86FxSave):
+ fxsave (%rcx)
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.S
index 72877e7fe4..40c34db615 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.S
@@ -1,39 +1,39 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# InterlockedCompareExchange64.S
-#
-# Abstract:
-#
-# InterlockedCompareExchange64 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# InterlockedCompareExchange64 (
-# IN UINT64 *Value,
-# IN UINT64 CompareValue,
-# IN UINT64 ExchangeValue
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(InternalSyncCompareExchange64)
-.align 16
-ASM_PFX(InternalSyncCompareExchange64):
- mov %rsi, %rax
- lock cmpxchg %rdx,(%rdi)
- 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:
+#
+# InterlockedCompareExchange64.S
+#
+# Abstract:
+#
+# InterlockedCompareExchange64 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# InterlockedCompareExchange64 (
+# IN UINT64 *Value,
+# IN UINT64 CompareValue,
+# IN UINT64 ExchangeValue
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(InternalSyncCompareExchange64)
+.align 16
+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 022d797dcc..36ade07276 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT32
+# EFIAPI
+# InterlockedDecrement (
+# IN UINT32 *Value
+# );
+#------------------------------------------------------------------------------
+.global 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 04f75f58f2..e77dc17d9d 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT32
+# EFIAPI
+# InterlockedIncrement (
+# IN UINT32 *Value
+# );
+#------------------------------------------------------------------------------
+.global 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 df8d68cd8d..406875af3f 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmInvd (
+# VOID
+# )#
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmInvd)
+ASM_PFX(AsmInvd):
+ invd
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Monitor.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Monitor.S
index 64197b8b2b..87b5fb9be9 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Monitor.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Monitor.S
@@ -1,41 +1,41 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# Monitor.S
-#
-# Abstract:
-#
-# AsmMonitor function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# AsmMonitor (
-# IN UINTN Eax,
-# IN UINTN Ecx,
-# IN UINTN Edx
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmMonitor)
-.align 16
-ASM_PFX(AsmMonitor):
- mov %ecx,%eax
- mov %edx,%ecx
- mov %r8d,%edx
- monitor
- 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:
+#
+# Monitor.S
+#
+# Abstract:
+#
+# AsmMonitor function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmMonitor (
+# IN UINTN Eax,
+# IN UINTN Ecx,
+# IN UINTN Edx
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmMonitor)
+.align 16
+ASM_PFX(AsmMonitor):
+ mov %ecx,%eax
+ mov %edx,%ecx
+ mov %r8d,%edx
+ monitor
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Mwait.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Mwait.S
index 606e0d49a4..adcb546033 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Mwait.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Mwait.S
@@ -1,39 +1,39 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# Mwait.S
-#
-# Abstract:
-#
-# AsmMwait function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# AsmMwait (
-# IN UINTN Eax,
-# IN UINTN Ecx
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmMwait)
-.align 16
-ASM_PFX(AsmMwait):
- mov %ecx,%eax
- mov %edx,%ecx
- mwait %rax,%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:
+#
+# Mwait.S
+#
+# Abstract:
+#
+# AsmMwait function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmMwait (
+# IN UINTN Eax,
+# IN UINTN Ecx
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmMwait)
+.align 16
+ASM_PFX(AsmMwait):
+ mov %ecx,%eax
+ mov %edx,%ecx
+ mwait %rax,%rcx
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr0.S
index 61b3dc6711..1a41677ac7 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr0.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr0.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:
-#
-# ReadCr0.S
-#
-# Abstract:
-#
-# AsmReadCr0 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINTN
-# EFIAPI
-# AsmReadCr0 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadCr0)
-.align 16
-ASM_PFX(AsmReadCr0):
- mov %cr0, %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:
+#
+# ReadCr0.S
+#
+# Abstract:
+#
+# AsmReadCr0 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadCr0 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadCr0)
+.align 16
+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 0d46851a6b..77332ca449 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr2.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr2.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:
-#
-# ReadCr2.S
-#
-# Abstract:
-#
-# AsmReadCr2 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINTN
-# EFIAPI
-# AsmReadCr2 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadCr2)
-.align 16
-ASM_PFX(AsmReadCr2):
- mov %cr2, %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:
+#
+# ReadCr2.S
+#
+# Abstract:
+#
+# AsmReadCr2 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadCr2 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadCr2)
+.align 16
+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 335a26a5c4..702d2aa66c 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr3.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr3.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:
-#
-# ReadCr3.S
-#
-# Abstract:
-#
-# AsmReadCr3 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINTN
-# EFIAPI
-# AsmReadCr3 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadCr3)
-.align 16
-ASM_PFX(AsmReadCr3):
- mov %cr3, %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:
+#
+# ReadCr3.S
+#
+# Abstract:
+#
+# AsmReadCr3 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadCr3 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadCr3)
+.align 16
+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 c421c4c111..a43b5c1770 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr4.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr4.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:
-#
-# ReadCr4.S
-#
-# Abstract:
-#
-# AsmReadCr4 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINTN
-# EFIAPI
-# AsmReadCr4 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadCr4)
-.align 16
-ASM_PFX(AsmReadCr4):
- mov %cr4, %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:
+#
+# ReadCr4.S
+#
+# Abstract:
+#
+# AsmReadCr4 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadCr4 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadCr4)
+.align 16
+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 d90cb59a0a..2e2069d6a4 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCs.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCs.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:
-#
-# ReadCs.S
-#
-# Abstract:
-#
-# AsmReadCs function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT16
-# EFIAPI
-# AsmReadCs (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadCs)
-.align 16
-ASM_PFX(AsmReadCs):
- mov %cs, %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:
+#
+# ReadCs.S
+#
+# Abstract:
+#
+# AsmReadCs function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT16
+# EFIAPI
+# AsmReadCs (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadCs)
+.align 16
+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 354088f6bd..34e12db80a 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr0.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr0.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:
-#
-# ReadDr0.S
-#
-# Abstract:
-#
-# AsmReadDr0 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINTN
-# EFIAPI
-# AsmReadDr0 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadDr0)
-.align 16
-ASM_PFX(AsmReadDr0):
- mov %dr0, %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:
+#
+# ReadDr0.S
+#
+# Abstract:
+#
+# AsmReadDr0 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadDr0 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadDr0)
+.align 16
+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 285adccf98..289d144829 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr1.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr1.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:
-#
-# ReadDr1.S
-#
-# Abstract:
-#
-# AsmReadDr1 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINTN
-# EFIAPI
-# AsmReadDr1 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadDr1)
-.align 16
-ASM_PFX(AsmReadDr1):
- mov %dr1, %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:
+#
+# ReadDr1.S
+#
+# Abstract:
+#
+# AsmReadDr1 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadDr1 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadDr1)
+.align 16
+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 bfb50c29d5..63b4a2eab3 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr2.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr2.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:
-#
-# ReadDr2.S
-#
-# Abstract:
-#
-# AsmReadDr2 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINTN
-# EFIAPI
-# AsmReadDr2 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadDr2)
-.align 16
-ASM_PFX(AsmReadDr2):
- mov %dr2, %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:
+#
+# ReadDr2.S
+#
+# Abstract:
+#
+# AsmReadDr2 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadDr2 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadDr2)
+.align 16
+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 9b412a526d..cdf831148a 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr3.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr3.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:
-#
-# ReadDr3.S
-#
-# Abstract:
-#
-# AsmReadDr3 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINTN
-# EFIAPI
-# AsmReadDr3 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadDr3)
-.align 16
-ASM_PFX(AsmReadDr3):
- mov %dr3, %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:
+#
+# ReadDr3.S
+#
+# Abstract:
+#
+# AsmReadDr3 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadDr3 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadDr3)
+.align 16
+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 d1bbc6c099..ad1482ed4d 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr4.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr4.S
@@ -1,37 +1,37 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ReadDr4.S
-#
-# Abstract:
-#
-# AsmReadDr4 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINTN
-# EFIAPI
-# AsmReadDr4 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadDr4)
-.align 16
-ASM_PFX(AsmReadDr4):
- #DB 0fh, 21h, 0e0h
- mov %dr4, %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:
+#
+# ReadDr4.S
+#
+# Abstract:
+#
+# AsmReadDr4 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadDr4 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadDr4)
+.align 16
+ASM_PFX(AsmReadDr4):
+ #DB 0fh, 21h, 0e0h
+ mov %dr4, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr5.S
index 4d981033e9..90a28b0f2d 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr5.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr5.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:
-#
-# ReadDr5.S
-#
-# Abstract:
-#
-# AsmReadDr5 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINTN
-# EFIAPI
-# AsmReadDr5 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadDr5)
-.align 16
-ASM_PFX(AsmReadDr5):
- mov %dr5, %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:
+#
+# ReadDr5.S
+#
+# Abstract:
+#
+# AsmReadDr5 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadDr5 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadDr5)
+.align 16
+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 ddb2aef212..d2ce23035e 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr6.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr6.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:
-#
-# ReadDr6.S
-#
-# Abstract:
-#
-# AsmReadDr6 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINTN
-# EFIAPI
-# AsmReadDr6 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadDr6)
-.align 16
-ASM_PFX(AsmReadDr6):
- mov %dr6, %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:
+#
+# ReadDr6.S
+#
+# Abstract:
+#
+# AsmReadDr6 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadDr6 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadDr6)
+.align 16
+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 ddf8219b0e..ac71334334 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr7.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr7.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:
-#
-# ReadDr7.S
-#
-# Abstract:
-#
-# AsmReadDr7 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINTN
-# EFIAPI
-# AsmReadDr7 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadDr7)
-.align 16
-ASM_PFX(AsmReadDr7):
- mov %dr7, %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:
+#
+# ReadDr7.S
+#
+# Abstract:
+#
+# AsmReadDr7 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadDr7 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadDr7)
+.align 16
+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 a87d78ee90..864028c49e 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDs.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDs.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:
-#
-# ReadDs.S
-#
-# Abstract:
-#
-# AsmReadDs function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT16
-# EFIAPI
-# AsmReadDs (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadDs)
-.align 16
-ASM_PFX(AsmReadDs):
- movl %ds, %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:
+#
+# ReadDs.S
+#
+# Abstract:
+#
+# AsmReadDs function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT16
+# EFIAPI
+# AsmReadDs (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadDs)
+.align 16
+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 00d9a2f90f..6ac608f386 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEflags.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEflags.S
@@ -1,37 +1,37 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ReadEflags.S
-#
-# Abstract:
-#
-# AsmReadEflags function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINTN
-# EFIAPI
-# AsmReadEflags (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadEflags)
-.align 16
-ASM_PFX(AsmReadEflags):
- pushfq
- pop %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:
+#
+# ReadEflags.S
+#
+# Abstract:
+#
+# AsmReadEflags function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmReadEflags (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadEflags)
+.align 16
+ASM_PFX(AsmReadEflags):
+ pushfq
+ pop %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEs.S
index 6895344728..38dd9ea198 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEs.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEs.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:
-#
-# ReadEs.S
-#
-# Abstract:
-#
-# AsmReadEs function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT16
-# EFIAPI
-# AsmReadEs (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadEs)
-.align 16
-ASM_PFX(AsmReadEs):
- mov %es, %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:
+#
+# ReadEs.S
+#
+# Abstract:
+#
+# AsmReadEs function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT16
+# EFIAPI
+# AsmReadEs (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadEs)
+.align 16
+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 5e7ff0b201..473bb5c04d 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadFs.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadFs.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:
-#
-# ReadFs.S
-#
-# Abstract:
-#
-# AsmReadFs function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT16
-# EFIAPI
-# AsmReadFs (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadFs)
-.align 16
-ASM_PFX(AsmReadFs):
- mov %fs, %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:
+#
+# ReadFs.S
+#
+# Abstract:
+#
+# AsmReadFs function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT16
+# EFIAPI
+# AsmReadFs (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadFs)
+.align 16
+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 6f9a030464..44e14aa4e6 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGdtr.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGdtr.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:
-#
-# ReadGdtr.S
-#
-# Abstract:
-#
-# AsmReadGdtr function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# VOID
-# EFIAPI
-# InternalX86ReadGdtr (
-# OUT IA32_DESCRIPTOR *Gdtr
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(InternalX86ReadGdtr)
-.align 16
-ASM_PFX(InternalX86ReadGdtr):
- sgdt (%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:
+#
+# ReadGdtr.S
+#
+# Abstract:
+#
+# AsmReadGdtr function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# InternalX86ReadGdtr (
+# OUT IA32_DESCRIPTOR *Gdtr
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(InternalX86ReadGdtr)
+.align 16
+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 2abe648a04..ddd8c9a1fb 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGs.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGs.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:
-#
-# ReadGs.S
-#
-# Abstract:
-#
-# AsmReadGs function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT16
-# EFIAPI
-# AsmReadGs (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadGs)
-.align 16
-ASM_PFX(AsmReadGs):
- mov %gs, %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:
+#
+# ReadGs.S
+#
+# Abstract:
+#
+# AsmReadGs function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT16
+# EFIAPI
+# AsmReadGs (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadGs)
+.align 16
+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 3940e98ec9..fa2c762878 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadIdtr.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadIdtr.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:
-#
-# ReadIdtr.AS
-#
-# Abstract:
-#
-# AsmReadIdtr function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# VOID
-# EFIAPI
-# InternalX86ReadIdtr (
-# OUT IA32_DESCRIPTOR *Idtr
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(InternalX86ReadIdtr)
-.align 16
-ASM_PFX(InternalX86ReadIdtr):
- sidt (%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:
+#
+# ReadIdtr.AS
+#
+# Abstract:
+#
+# AsmReadIdtr function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# InternalX86ReadIdtr (
+# OUT IA32_DESCRIPTOR *Idtr
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(InternalX86ReadIdtr)
+.align 16
+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 f5b04a15cb..2aad2a2dfd 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadLdtr.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadLdtr.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:
-#
-# ReadLdtr.AS
-#
-# Abstract:
-#
-# AsmReadLdtr function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT16
-# EFIAPI
-# AsmReadLdtr (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadLdtr)
-.align 16
-ASM_PFX(AsmReadLdtr):
- sldt %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:
+#
+# ReadLdtr.AS
+#
+# Abstract:
+#
+# AsmReadLdtr function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT16
+# EFIAPI
+# AsmReadLdtr (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadLdtr)
+.align 16
+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 27c6a35b7a..5c18be5340 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm0.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm0.S
@@ -1,37 +1,37 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ReadMm0.S
-#
-# Abstract:
-#
-# AsmReadMm0 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# AsmReadMm0 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadMm0)
-.align 16
-ASM_PFX(AsmReadMm0):
- #DB 48h, 0fh, 7eh, 0c0h
- movd %mm0, %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:
+#
+# ReadMm0.S
+#
+# Abstract:
+#
+# AsmReadMm0 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadMm0 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadMm0)
+.align 16
+ASM_PFX(AsmReadMm0):
+ #DB 48h, 0fh, 7eh, 0c0h
+ movd %mm0, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm1.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm1.S
index 745f8f65cb..72d3c04a67 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm1.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm1.S
@@ -1,37 +1,37 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ReadMm1.S
-#
-# Abstract:
-#
-# AsmReadMm1 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# AsmReadMm1 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadMm1)
-.align 16
-ASM_PFX(AsmReadMm1):
- #DB 48h, 0fh, 7eh, 0c8h
- movd %mm1, %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:
+#
+# ReadMm1.S
+#
+# Abstract:
+#
+# AsmReadMm1 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadMm1 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadMm1)
+.align 16
+ASM_PFX(AsmReadMm1):
+ #DB 48h, 0fh, 7eh, 0c8h
+ movd %mm1, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm2.S
index d97671da30..05fc9e3e5e 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm2.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm2.S
@@ -1,37 +1,37 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ReadMm2.S
-#
-# Abstract:
-#
-# AsmReadMm2 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# AsmReadMm2 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadMm2)
-.align 16
-ASM_PFX(AsmReadMm2):
- #DB 48h, 0fh, 7eh, 0d0h
- movd %mm2, %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:
+#
+# ReadMm2.S
+#
+# Abstract:
+#
+# AsmReadMm2 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadMm2 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadMm2)
+.align 16
+ASM_PFX(AsmReadMm2):
+ #DB 48h, 0fh, 7eh, 0d0h
+ movd %mm2, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm3.S
index cd0d5a96b8..4f14ba0be8 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm3.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm3.S
@@ -1,37 +1,37 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ReadMm3.S
-#
-# Abstract:
-#
-# AsmReadMm3 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# AsmReadMm3 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadMm3)
-.align 16
-ASM_PFX(AsmReadMm3):
- #DB 48h, 0fh, 7eh, 0d8h
- movd %mm3, %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:
+#
+# ReadMm3.S
+#
+# Abstract:
+#
+# AsmReadMm3 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadMm3 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadMm3)
+.align 16
+ASM_PFX(AsmReadMm3):
+ #DB 48h, 0fh, 7eh, 0d8h
+ movd %mm3, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm4.S
index 65f80abb0c..63f00b1919 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm4.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm4.S
@@ -1,37 +1,37 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ReadMm4.AS
-#
-# Abstract:
-#
-# AsmReadMm4 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# AsmReadMm4 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadMm4)
-.align 16
-ASM_PFX(AsmReadMm4):
- #DB 48h, 0fh, 7eh, 0e0h
- movd %mm4, %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:
+#
+# ReadMm4.AS
+#
+# Abstract:
+#
+# AsmReadMm4 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadMm4 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadMm4)
+.align 16
+ASM_PFX(AsmReadMm4):
+ #DB 48h, 0fh, 7eh, 0e0h
+ movd %mm4, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm5.S
index 65ac50ca4a..9ba972fc7f 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm5.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm5.S
@@ -1,37 +1,37 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ReadMm5.S
-#
-# Abstract:
-#
-# AsmReadMm5 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# AsmReadMm5 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadMm5)
-.align 16
-ASM_PFX(AsmReadMm5):
- #DB 48h, 0fh, 7eh, 0e8h
- movd %mm5, %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:
+#
+# ReadMm5.S
+#
+# Abstract:
+#
+# AsmReadMm5 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadMm5 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadMm5)
+.align 16
+ASM_PFX(AsmReadMm5):
+ #DB 48h, 0fh, 7eh, 0e8h
+ movd %mm5, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm6.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm6.S
index aee3d24052..5fa959f0cc 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm6.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm6.S
@@ -1,37 +1,37 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ReadMm6.S
-#
-# Abstract:
-#
-# AsmReadMm6 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# AsmReadMm6 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadMm6)
-.align 16
-ASM_PFX(AsmReadMm6):
- #DB 48h, 0fh, 7eh, 0f0h
- movd %mm6, %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:
+#
+# ReadMm6.S
+#
+# Abstract:
+#
+# AsmReadMm6 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadMm6 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadMm6)
+.align 16
+ASM_PFX(AsmReadMm6):
+ #DB 48h, 0fh, 7eh, 0f0h
+ movd %mm6, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm7.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm7.S
index 74c5b418e2..939b0877eb 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm7.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm7.S
@@ -1,37 +1,37 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ReadMm7.S
-#
-# Abstract:
-#
-# AsmReadMm7 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# AsmReadMm7 (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadMm7)
-.align 16
-ASM_PFX(AsmReadMm7):
- #DB 48h, 0fh, 7eh, 0f8h
- movd %mm7, %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:
+#
+# ReadMm7.S
+#
+# Abstract:
+#
+# AsmReadMm7 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadMm7 (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadMm7)
+.align 16
+ASM_PFX(AsmReadMm7):
+ #DB 48h, 0fh, 7eh, 0f8h
+ movd %mm7, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMsr64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMsr64.S
index b1f6086040..15ab4c91c7 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMsr64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMsr64.S
@@ -1,38 +1,38 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ReadMsr64.S
-#
-# Abstract:
-#
-# AsmReadMsr64 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# AsmReadMsr64 (
-# IN UINT32 Index
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadMsr64)
-.align 16
-ASM_PFX(AsmReadMsr64):
- rdmsr # edx & eax are zero extended
- shl $0x20, %rdx
- or %rdx, %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:
+#
+# ReadMsr64.S
+#
+# Abstract:
+#
+# AsmReadMsr64 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadMsr64 (
+# IN UINT32 Index
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadMsr64)
+.align 16
+ASM_PFX(AsmReadMsr64):
+ rdmsr # edx & eax are zero extended
+ shl $0x20, %rdx
+ or %rdx, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadPmc.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadPmc.S
index c71fab49f4..429b9bf0db 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadPmc.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadPmc.S
@@ -1,38 +1,38 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ReadPmc.S
-#
-# Abstract:
-#
-# AsmReadPmc function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# AsmReadPmc (
-# IN UINT32 PmcIndex
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadPmc)
-.align 16
-ASM_PFX(AsmReadPmc):
- rdpmc
- shl $0x20, %rdx
- or %rdx, %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:
+#
+# ReadPmc.S
+#
+# Abstract:
+#
+# AsmReadPmc function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadPmc (
+# IN UINT32 PmcIndex
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadPmc)
+.align 16
+ASM_PFX(AsmReadPmc):
+ rdpmc
+ shl $0x20, %rdx
+ or %rdx, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadSs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadSs.S
index f02c50de21..941e47ba7d 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadSs.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadSs.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:
-#
-# ReadSs.S
-#
-# Abstract:
-#
-# AsmReadSs function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT16
-# EFIAPI
-# AsmReadSs (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadSs);
-.align 16
-ASM_PFX(AsmReadSs):
- movl %ss, %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:
+#
+# ReadSs.S
+#
+# Abstract:
+#
+# AsmReadSs function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT16
+# EFIAPI
+# AsmReadSs (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadSs);
+.align 16
+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 7d60a50830..6f88b67dd5 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTr.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTr.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:
-#
-# ReadTr.S
-#
-# Abstract:
-#
-# AsmReadTr function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT16
-# EFIAPI
-# AsmReadTr (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadTr)
-.align 16
-ASM_PFX(AsmReadTr):
- str %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:
+#
+# ReadTr.S
+#
+# Abstract:
+#
+# AsmReadTr function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT16
+# EFIAPI
+# AsmReadTr (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadTr)
+.align 16
+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 a83982ebe2..f929443e2c 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTsc.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTsc.S
@@ -1,38 +1,38 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ReadTsc.S
-#
-# Abstract:
-#
-# AsmReadTsc function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# AsmReadTsc (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadTsc)
-.align 16
-ASM_PFX(AsmReadTsc):
- rdtsc
- shl $0x20, %rdx
- or %rdx, %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:
+#
+# ReadTsc.S
+#
+# Abstract:
+#
+# AsmReadTsc function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmReadTsc (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmReadTsc)
+.align 16
+ASM_PFX(AsmReadTsc):
+ rdtsc
+ shl $0x20, %rdx
+ or %rdx, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SetJump.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SetJump.S
index dbffd2fafd..805c6a3ed9 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 <EdkIIGlueBase.h>
-.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 <EdkIIGlueBase.h>
+.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
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SwitchStack.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SwitchStack.S
index 07e171f32b..1e504918d3 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# 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
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Thunk16.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Thunk16.S
index ad2775f71d..37c32787a7 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Thunk16.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Thunk16.S
@@ -1,308 +1,308 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# Thunk16.S
-#
-# Abstract:
-#
-# Real mode thunk
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-
-.globl ASM_PFX(m16Start)
-.globl ASM_PFX(m16Size)
-.globl ASM_PFX(mThunk16Attr)
-.globl ASM_PFX(m16Gdt)
-.globl ASM_PFX(m16GdtrBase)
-.globl ASM_PFX(mTransition)
-.globl ASM_PFX(InternalAsmThunk16)
-
-# define the structure of IA32_REGS
-.equ _EDI, 0 #size 4
-.equ _ESI, 4 #size 4
-.equ _EBP, 8 #size 4
-.equ _ESP, 12 #size 4
-.equ _EBX, 16 #size 4
-.equ _EDX, 20 #size 4
-.equ _ECX, 24 #size 4
-.equ _EAX, 28 #size 4
-.equ _DS, 32 #size 2
-.equ _ES, 34 #size 2
-.equ _FS, 36 #size 2
-.equ _GS, 38 #size 2
-.equ _EFLAGS, 40 #size 8
-.equ _EIP, 48 #size 4
-.equ _CS, 52 #size 2
-.equ _SS, 54 #size 2
-.equ IA32_REGS_SIZE, 56
-
- .data
-
-ASM_PFX(m16Size): .word ASM_PFX(InternalAsmThunk16) - ASM_PFX(m16Start)
-ASM_PFX(mThunk16Attr): .word _ThunkAttr - ASM_PFX(m16Start)
-ASM_PFX(m16Gdt): .word ASM_PFX(NullSeg) - ASM_PFX(m16Start)
-ASM_PFX(m16GdtrBase): .word _16GdtrBase - ASM_PFX(m16Start)
-ASM_PFX(mTransition): .word _EntryPoint - ASM_PFX(m16Start)
-
- .text
-
-ASM_PFX(m16Start):
-
-SavedGdt: .space 10
-
-#------------------------------------------------------------------------------
-# _BackFromUserCode() takes control in real mode after 'retf' has been executed
-# by user code. It will be shadowed to somewhere in memory below 1MB.
-#------------------------------------------------------------------------------
-.globl ASM_PFX(BackFromUserCode)
-ASM_PFX(BackFromUserCode):
- #
- # The order of saved registers on the stack matches the order they appears
- # in IA32_REGS structure. This facilitates wrapper function to extract them
- # into that structure.
- #
- # Some instructions for manipulation of segment registers have to be written
- # in opcode since 64-bit MASM prevents accesses to those registers.
- #
- .byte 0x16 # push ss
- .byte 0xe # push cs
- .byte 0x66
- call L_Base # push eip
-L_Base:
- .byte 0x66
- pushq $0 # reserved high order 32 bits of EFlags
- .byte 0x66, 0x9c # pushfd actually
- cli # disable interrupts
- push %gs
- push %fs
- .byte 6 # push es
- .byte 0x1e # push ds
- .byte 0x66,0x60 # pushad
- .byte 0x66,0xba # mov edx, imm32
-_ThunkAttr: .space 4
- testb $THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15, %dl
- jz L_1
- movl $0x15cd2401,%eax # mov ax, 2401h & int 15h
- cli # disable interrupts
- jnc L_2
-L_1:
- testb $THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL, %dl
- jz L_2
- inb $0x92,%al
- orb $2,%al
- outb %al, $0x92 # deactivate A20M#
-L_2:
- movl %ss,%eax
- lea IA32_REGS_SIZE(%esp), %bp
- #
- # rsi in the following 2 instructions is indeed bp in 16-bit code
- #
- movw %bp, (_ESP - IA32_REGS_SIZE)(%rsi)
- .byte 0x66
- movl (_EIP - IA32_REGS_SIZE)(%rsi), %ebx
- shlw $4,%ax # shl eax, 4
- addw %ax,%bp # add ebp, eax
- movw %cs,%ax
- shlw $4,%ax
- lea (L_64BitCode - L_Base)(%ebx, %eax), %ax
- .byte 0x66,0x2e,0x89,0x87 # mov cs:[bx + (L_64Eip - L_Base)], eax
- .word L_64Eip - L_Base
- .byte 0x66,0xb8 # mov eax, imm32
-SavedCr4: .space 4
- movq %rax, %cr4
- #
- # rdi in the instruction below is indeed bx in 16-bit code
- #
- .byte 0x66,0x2e # 2eh is "cs:" segment override
- lgdt (SavedGdt - L_Base)(%rdi)
- .byte 0x66
- movl $0xc0000080,%ecx
- rdmsr
- orb $1,%ah
- wrmsr
- .byte 0x66,0xb8 # mov eax, imm32
-SavedCr0: .space 4
- movq %rax, %cr0
- .byte 0x66,0xea # jmp far cs:L_64Bit
-L_64Eip: .space 4
-SavedCs: .space 2
-L_64BitCode:
- .byte 0x90
- .byte 0x67,0xbc # mov esp, imm32
-SavedSp: .space 4 # restore stack
- nop
- ret
-
-_EntryPoint: .long ASM_PFX(ToUserCode) - ASM_PFX(m16Start)
- .word CODE16
-_16Gdtr: .word GDT_SIZE - 1
-_16GdtrBase: .quad ASM_PFX(NullSeg)
-_16Idtr: .word 0x3ff
- .long 0
-
-#------------------------------------------------------------------------------
-# _ToUserCode() takes control in real mode before passing control to user code.
-# It will be shadowed to somewhere in memory below 1MB.
-#------------------------------------------------------------------------------
-.globl ASM_PFX(ToUserCode)
-ASM_PFX(ToUserCode):
- movl %edx,%ss # set new segment selectors
- movl %edx,%ds
- movl %edx,%es
- movl %edx,%fs
- movl %edx,%gs
- .byte 0x66
- movl $0xc0000080,%ecx
- movq %rax, %cr0
- rdmsr
- andb $0b11111110, %ah
- wrmsr
- movq %rbp, %cr4
- movl %esi,%ss # set up 16-bit stack segment
- movw %bx,%sp # set up 16-bit stack pointer
- .byte 0x66 # make the following call 32-bit
- call L_Base1 # push eip
-L_Base1:
- popw %bp # ebp <- address of L_Base1
- pushq (IA32_REGS_SIZE + 2)(%esp)
- lea 0x0c(%rsi), %eax
- pushq %rax
- lret # execution begins at next instruction
-L_RealMode:
- .byte 0x66,0x2e # CS and operand size override
- lidt (_16Idtr - L_Base1)(%rsi)
- .byte 0x66,0x61 # popad
- .byte 0x1f # pop ds
- .byte 0x7 # pop es
- .byte 0x0f, 0xa1 # pop fs
- .byte 0x0f, 0xa9 # pop gs
- .byte 0x66, 0x9d # popfd
- leaw 4(%esp),%sp # skip high order 32 bits of EFlags
- .byte 0x66 # make the following retf 32-bit
- lret # transfer control to user code
-
-.equ CODE16, ASM_PFX(_16Code) - .
-.equ DATA16, ASM_PFX(_16Data) - .
-.equ DATA32, ASM_PFX(_32Data) - .
-
-ASM_PFX(NullSeg): .quad 0
-ASM_PFX(_16Code):
- .word -1
- .word 0
- .byte 0
- .byte 0x9b
- .byte 0x8f # 16-bit segment, 4GB limit
- .byte 0
-ASM_PFX(_16Data):
- .word -1
- .word 0
- .byte 0
- .byte 0x93
- .byte 0x8f # 16-bit segment, 4GB limit
- .byte 0
-ASM_PFX(_32Data):
- .word -1
- .word 0
- .byte 0
- .byte 0x93
- .byte 0xcf # 16-bit segment, 4GB limit
- .byte 0
-
-.equ GDT_SIZE, . - ASM_PFX(NullSeg)
-
-#------------------------------------------------------------------------------
-# IA32_REGISTER_SET *
-# EFIAPI
-# InternalAsmThunk16 (
-# IN IA32_REGISTER_SET *RegisterSet,
-# IN OUT VOID *Transition
-# );
-#------------------------------------------------------------------------------
-
-.globl ASM_PFX(InternalAsmThunk16)
-ASM_PFX(InternalAsmThunk16):
- pushq %rbp
- pushq %rbx
- pushq %rsi
- pushq %rdi
-
- movq %ds, %rbx
- pushq %rbx # Save ds segment register on the stack
- movq %es, %rbx
- pushq %rbx # Save es segment register on the stack
- movq %ss, %rbx
- pushq %rbx # Save ss segment register on the stack
-
- .byte 0x0f, 0xa0 #push fs
- .byte 0x0f, 0xa8 #push gs
- movq %rcx, %rsi
- movzwl _SS(%rsi), %r8d
- movl _ESP(%rsi), %edi
- lea -(IA32_REGS_SIZE + 4)(%edi), %rdi
- imul $16, %r8d, %eax
- movl %edi,%ebx # ebx <- stack for 16-bit code
- pushq $(IA32_REGS_SIZE / 4)
- addl %eax,%edi # edi <- linear address of 16-bit stack
- popq %rcx
- rep
- movsl # copy RegSet
- lea (SavedCr4 - ASM_PFX(m16Start))(%rdx), %ecx
- movl %edx,%eax # eax <- transition code address
- andl $0xf,%edx
- shll $12,%eax # segment address in high order 16 bits
- lea (_BackFromUserCode - ASM_PFX(m16Start))(%rdx), %ax
- stosl # [edi] <- return address of user code
- sgdt (SavedGdt - SavedCr4)(%rcx)
- sidt 0x50(%rsp)
- movq %cr0, %rax
- movl %eax, (SavedCr0 - SavedCr4)(%rcx)
- andl $0x7ffffffe,%eax # clear PE, PG bits
- movq %cr4, %rbp
- movl %ebp, (%rcx) # save CR4 in SavedCr4
- andl $0x300,%ebp # clear all but PCE and OSFXSR bits
- movl %r8d, %esi # esi <- 16-bit stack segment
- .byte 0x6a, DATA32
- popq %rdx
- lgdt (_16Gdtr - SavedCr4)(%rcx)
- movl %edx,%ss
- pushfq
- lea -8(%rdx), %edx
- lea L_RetFromRealMode, %r8
- pushq %r8
- movl %cs, %r8d
- movw %r8w, (SavedCs - SavedCr4)(%rcx)
- movl %esp, (SavedSp - SavedCr4)(%rcx)
- .byte 0xff, 0x69 # jmp (_EntryPoint - SavedCr4)(%rcx)
- .byte _EntryPoint - SavedCr4
-L_RetFromRealMode:
- popfq
- lidt 0x50(%rsp)
- lea -IA32_REGS_SIZE(%rbp), %eax
- .byte 0x0f, 0xa9 # pop gs
- .byte 0x0f, 0xa1 # pop fs
-
- popq %rbx
- movq %rbx, %ss
- popq %rbx
- movq %rbx, %es
- popq %rbx
- movq %rbx, %ds
-
- popq %rdi
- popq %rsi
- popq %rbx
- popq %rbp
-
- 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:
+#
+# Thunk16.S
+#
+# Abstract:
+#
+# Real mode thunk
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+
+.globl ASM_PFX(m16Start)
+.globl ASM_PFX(m16Size)
+.globl ASM_PFX(mThunk16Attr)
+.globl ASM_PFX(m16Gdt)
+.globl ASM_PFX(m16GdtrBase)
+.globl ASM_PFX(mTransition)
+.globl ASM_PFX(InternalAsmThunk16)
+
+# define the structure of IA32_REGS
+.equ _EDI, 0 #size 4
+.equ _ESI, 4 #size 4
+.equ _EBP, 8 #size 4
+.equ _ESP, 12 #size 4
+.equ _EBX, 16 #size 4
+.equ _EDX, 20 #size 4
+.equ _ECX, 24 #size 4
+.equ _EAX, 28 #size 4
+.equ _DS, 32 #size 2
+.equ _ES, 34 #size 2
+.equ _FS, 36 #size 2
+.equ _GS, 38 #size 2
+.equ _EFLAGS, 40 #size 8
+.equ _EIP, 48 #size 4
+.equ _CS, 52 #size 2
+.equ _SS, 54 #size 2
+.equ IA32_REGS_SIZE, 56
+
+ .data
+
+ASM_PFX(m16Size): .word ASM_PFX(InternalAsmThunk16) - ASM_PFX(m16Start)
+ASM_PFX(mThunk16Attr): .word _ThunkAttr - ASM_PFX(m16Start)
+ASM_PFX(m16Gdt): .word ASM_PFX(NullSeg) - ASM_PFX(m16Start)
+ASM_PFX(m16GdtrBase): .word _16GdtrBase - ASM_PFX(m16Start)
+ASM_PFX(mTransition): .word _EntryPoint - ASM_PFX(m16Start)
+
+ .text
+
+ASM_PFX(m16Start):
+
+SavedGdt: .space 10
+
+#------------------------------------------------------------------------------
+# _BackFromUserCode() takes control in real mode after 'retf' has been executed
+# by user code. It will be shadowed to somewhere in memory below 1MB.
+#------------------------------------------------------------------------------
+.globl ASM_PFX(BackFromUserCode)
+ASM_PFX(BackFromUserCode):
+ #
+ # The order of saved registers on the stack matches the order they appears
+ # in IA32_REGS structure. This facilitates wrapper function to extract them
+ # into that structure.
+ #
+ # Some instructions for manipulation of segment registers have to be written
+ # in opcode since 64-bit MASM prevents accesses to those registers.
+ #
+ .byte 0x16 # push ss
+ .byte 0xe # push cs
+ .byte 0x66
+ call L_Base # push eip
+L_Base:
+ .byte 0x66
+ pushq $0 # reserved high order 32 bits of EFlags
+ .byte 0x66, 0x9c # pushfd actually
+ cli # disable interrupts
+ push %gs
+ push %fs
+ .byte 6 # push es
+ .byte 0x1e # push ds
+ .byte 0x66,0x60 # pushad
+ .byte 0x66,0xba # mov edx, imm32
+_ThunkAttr: .space 4
+ testb $THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15, %dl
+ jz L_1
+ movl $0x15cd2401,%eax # mov ax, 2401h & int 15h
+ cli # disable interrupts
+ jnc L_2
+L_1:
+ testb $THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL, %dl
+ jz L_2
+ inb $0x92,%al
+ orb $2,%al
+ outb %al, $0x92 # deactivate A20M#
+L_2:
+ movl %ss,%eax
+ lea IA32_REGS_SIZE(%esp), %bp
+ #
+ # rsi in the following 2 instructions is indeed bp in 16-bit code
+ #
+ movw %bp, (_ESP - IA32_REGS_SIZE)(%rsi)
+ .byte 0x66
+ movl (_EIP - IA32_REGS_SIZE)(%rsi), %ebx
+ shlw $4,%ax # shl eax, 4
+ addw %ax,%bp # add ebp, eax
+ movw %cs,%ax
+ shlw $4,%ax
+ lea (L_64BitCode - L_Base)(%ebx, %eax), %ax
+ .byte 0x66,0x2e,0x89,0x87 # mov cs:[bx + (L_64Eip - L_Base)], eax
+ .word L_64Eip - L_Base
+ .byte 0x66,0xb8 # mov eax, imm32
+SavedCr4: .space 4
+ movq %rax, %cr4
+ #
+ # rdi in the instruction below is indeed bx in 16-bit code
+ #
+ .byte 0x66,0x2e # 2eh is "cs:" segment override
+ lgdt (SavedGdt - L_Base)(%rdi)
+ .byte 0x66
+ movl $0xc0000080,%ecx
+ rdmsr
+ orb $1,%ah
+ wrmsr
+ .byte 0x66,0xb8 # mov eax, imm32
+SavedCr0: .space 4
+ movq %rax, %cr0
+ .byte 0x66,0xea # jmp far cs:L_64Bit
+L_64Eip: .space 4
+SavedCs: .space 2
+L_64BitCode:
+ .byte 0x90
+ .byte 0x67,0xbc # mov esp, imm32
+SavedSp: .space 4 # restore stack
+ nop
+ ret
+
+_EntryPoint: .long ASM_PFX(ToUserCode) - ASM_PFX(m16Start)
+ .word CODE16
+_16Gdtr: .word GDT_SIZE - 1
+_16GdtrBase: .quad ASM_PFX(NullSeg)
+_16Idtr: .word 0x3ff
+ .long 0
+
+#------------------------------------------------------------------------------
+# _ToUserCode() takes control in real mode before passing control to user code.
+# It will be shadowed to somewhere in memory below 1MB.
+#------------------------------------------------------------------------------
+.globl ASM_PFX(ToUserCode)
+ASM_PFX(ToUserCode):
+ movl %edx,%ss # set new segment selectors
+ movl %edx,%ds
+ movl %edx,%es
+ movl %edx,%fs
+ movl %edx,%gs
+ .byte 0x66
+ movl $0xc0000080,%ecx
+ movq %rax, %cr0
+ rdmsr
+ andb $0b11111110, %ah
+ wrmsr
+ movq %rbp, %cr4
+ movl %esi,%ss # set up 16-bit stack segment
+ movw %bx,%sp # set up 16-bit stack pointer
+ .byte 0x66 # make the following call 32-bit
+ call L_Base1 # push eip
+L_Base1:
+ popw %bp # ebp <- address of L_Base1
+ pushq (IA32_REGS_SIZE + 2)(%esp)
+ lea 0x0c(%rsi), %eax
+ pushq %rax
+ lret # execution begins at next instruction
+L_RealMode:
+ .byte 0x66,0x2e # CS and operand size override
+ lidt (_16Idtr - L_Base1)(%rsi)
+ .byte 0x66,0x61 # popad
+ .byte 0x1f # pop ds
+ .byte 0x7 # pop es
+ .byte 0x0f, 0xa1 # pop fs
+ .byte 0x0f, 0xa9 # pop gs
+ .byte 0x66, 0x9d # popfd
+ leaw 4(%esp),%sp # skip high order 32 bits of EFlags
+ .byte 0x66 # make the following retf 32-bit
+ lret # transfer control to user code
+
+.equ CODE16, ASM_PFX(_16Code) - .
+.equ DATA16, ASM_PFX(_16Data) - .
+.equ DATA32, ASM_PFX(_32Data) - .
+
+ASM_PFX(NullSeg): .quad 0
+ASM_PFX(_16Code):
+ .word -1
+ .word 0
+ .byte 0
+ .byte 0x9b
+ .byte 0x8f # 16-bit segment, 4GB limit
+ .byte 0
+ASM_PFX(_16Data):
+ .word -1
+ .word 0
+ .byte 0
+ .byte 0x93
+ .byte 0x8f # 16-bit segment, 4GB limit
+ .byte 0
+ASM_PFX(_32Data):
+ .word -1
+ .word 0
+ .byte 0
+ .byte 0x93
+ .byte 0xcf # 16-bit segment, 4GB limit
+ .byte 0
+
+.equ GDT_SIZE, . - ASM_PFX(NullSeg)
+
+#------------------------------------------------------------------------------
+# IA32_REGISTER_SET *
+# EFIAPI
+# InternalAsmThunk16 (
+# IN IA32_REGISTER_SET *RegisterSet,
+# IN OUT VOID *Transition
+# );
+#------------------------------------------------------------------------------
+
+.globl ASM_PFX(InternalAsmThunk16)
+ASM_PFX(InternalAsmThunk16):
+ pushq %rbp
+ pushq %rbx
+ pushq %rsi
+ pushq %rdi
+
+ movq %ds, %rbx
+ pushq %rbx # Save ds segment register on the stack
+ movq %es, %rbx
+ pushq %rbx # Save es segment register on the stack
+ movq %ss, %rbx
+ pushq %rbx # Save ss segment register on the stack
+
+ .byte 0x0f, 0xa0 #push fs
+ .byte 0x0f, 0xa8 #push gs
+ movq %rcx, %rsi
+ movzwl _SS(%rsi), %r8d
+ movl _ESP(%rsi), %edi
+ lea -(IA32_REGS_SIZE + 4)(%edi), %rdi
+ imul $16, %r8d, %eax
+ movl %edi,%ebx # ebx <- stack for 16-bit code
+ pushq $(IA32_REGS_SIZE / 4)
+ addl %eax,%edi # edi <- linear address of 16-bit stack
+ popq %rcx
+ rep
+ movsl # copy RegSet
+ lea (SavedCr4 - ASM_PFX(m16Start))(%rdx), %ecx
+ movl %edx,%eax # eax <- transition code address
+ andl $0xf,%edx
+ shll $12,%eax # segment address in high order 16 bits
+ lea (_BackFromUserCode - ASM_PFX(m16Start))(%rdx), %ax
+ stosl # [edi] <- return address of user code
+ sgdt (SavedGdt - SavedCr4)(%rcx)
+ sidt 0x50(%rsp)
+ movq %cr0, %rax
+ movl %eax, (SavedCr0 - SavedCr4)(%rcx)
+ andl $0x7ffffffe,%eax # clear PE, PG bits
+ movq %cr4, %rbp
+ movl %ebp, (%rcx) # save CR4 in SavedCr4
+ andl $0x300,%ebp # clear all but PCE and OSFXSR bits
+ movl %r8d, %esi # esi <- 16-bit stack segment
+ .byte 0x6a, DATA32
+ popq %rdx
+ lgdt (_16Gdtr - SavedCr4)(%rcx)
+ movl %edx,%ss
+ pushfq
+ lea -8(%rdx), %edx
+ lea L_RetFromRealMode, %r8
+ pushq %r8
+ movl %cs, %r8d
+ movw %r8w, (SavedCs - SavedCr4)(%rcx)
+ movl %esp, (SavedSp - SavedCr4)(%rcx)
+ .byte 0xff, 0x69 # jmp (_EntryPoint - SavedCr4)(%rcx)
+ .byte _EntryPoint - SavedCr4
+L_RetFromRealMode:
+ popfq
+ lidt 0x50(%rsp)
+ lea -IA32_REGS_SIZE(%rbp), %eax
+ .byte 0x0f, 0xa9 # pop gs
+ .byte 0x0f, 0xa1 # pop fs
+
+ popq %rbx
+ movq %rbx, %ss
+ popq %rbx
+ movq %rbx, %es
+ popq %rbx
+ movq %rbx, %ds
+
+ popq %rdi
+ popq %rsi
+ popq %rbx
+ popq %rbp
+
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Wbinvd.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Wbinvd.S
index 17465bb59a..0ffb15542e 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Wbinvd.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Wbinvd.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:
-#
-# Wbinvd.S
-#
-# Abstract:
-#
-# AsmWbinvd function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# VOID
-# EFIAPI
-# AsmWbinvd (
-# VOID
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWbinvd)
-.align 16
-ASM_PFX(AsmWbinvd):
- wbinvd
- 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:
+#
+# Wbinvd.S
+#
+# Abstract:
+#
+# AsmWbinvd function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWbinvd (
+# VOID
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmWbinvd)
+.align 16
+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 c79fe8c892..53d6f18773 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteCr0 (
+# UINTN Cr0
+# );
+#------------------------------------------------------------------------------
+.global 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 a3cc56412d..f54201b099 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteCr2 (
+# UINTN Cr2
+# );
+#------------------------------------------------------------------------------
+.global 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 257d3e716a..9d7e805ad5 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteCr3 (
+# UINTN Cr3
+# );
+#------------------------------------------------------------------------------
+.global 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 9984ee2d38..e5975289a3 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteCr4 (
+# UINTN Cr4
+# );
+#------------------------------------------------------------------------------
+.global 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 41d470df42..d76bce27c5 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr0.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr0.S
@@ -1,37 +1,37 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# WriteDr0.S
-#
-# Abstract:
-#
-# AsmWriteDr0 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINTN
-# EFIAPI
-# AsmWriteDr0 (
-# UINTN Value
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteDr0)
-.align 16
-ASM_PFX(AsmWriteDr0):
- mov %rcx, %dr0
- 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:
+#
+# WriteDr0.S
+#
+# Abstract:
+#
+# AsmWriteDr0 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteDr0 (
+# UINTN Value
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmWriteDr0)
+.align 16
+ASM_PFX(AsmWriteDr0):
+ mov %rcx, %dr0
+ mov %rcx, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr1.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr1.S
index d6b3c79dc7..58d11e69fc 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr1.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr1.S
@@ -1,37 +1,37 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# WriteDr1.S
-#
-# Abstract:
-#
-# AsmWriteDr1 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINTN
-# EFIAPI
-# AsmWriteDr1 (
-# UINTN Value
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteDr1)
-.align 16
-ASM_PFX(AsmWriteDr1):
- mov %rcx, %dr1
- 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:
+#
+# WriteDr1.S
+#
+# Abstract:
+#
+# AsmWriteDr1 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteDr1 (
+# UINTN Value
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmWriteDr1)
+.align 16
+ASM_PFX(AsmWriteDr1):
+ mov %rcx, %dr1
+ mov %rcx, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr2.S
index f43b121f72..32d3e068b9 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr2.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr2.S
@@ -1,37 +1,37 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# WriteDr2.S
-#
-# Abstract:
-#
-# AsmWriteDr2 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINTN
-# EFIAPI
-# AsmWriteDr2 (
-# UINTN Value
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteDr2)
-.align 16
-ASM_PFX(AsmWriteDr2):
- mov %rcx, %dr2
- 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:
+#
+# WriteDr2.S
+#
+# Abstract:
+#
+# AsmWriteDr2 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteDr2 (
+# UINTN Value
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmWriteDr2)
+.align 16
+ASM_PFX(AsmWriteDr2):
+ mov %rcx, %dr2
+ mov %rcx, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr3.S
index 4d197bd4c5..72326c2b0e 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr3.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr3.S
@@ -1,37 +1,37 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# WriteDr3.S
-#
-# Abstract:
-#
-# AsmWriteDr3 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINTN
-# EFIAPI
-# AsmWriteDr3 (
-# UINTN Value
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteDr3)
-.align 16
-ASM_PFX(AsmWriteDr3):
- mov %rcx, %dr3
- 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:
+#
+# WriteDr3.S
+#
+# Abstract:
+#
+# AsmWriteDr3 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteDr3 (
+# UINTN Value
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmWriteDr3)
+.align 16
+ASM_PFX(AsmWriteDr3):
+ mov %rcx, %dr3
+ mov %rcx, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr4.S
index 35c5a7f96a..f2de21d498 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteDr4 (
+# IN UINTN Value
+# );
+#------------------------------------------------------------------------------
+.global 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 4a446aa7a0..b9e56ebdd9 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteDr5 (
+# IN UINTN Value
+# );
+#------------------------------------------------------------------------------
+.global 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 22b95ef1d2..83530b63da 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteDr6 (
+# IN UINTN Value
+# );
+#------------------------------------------------------------------------------
+.global 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 98a7ed2887..6cfe8f6189 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINTN
+# EFIAPI
+# AsmWriteDr7 (
+# IN UINTN Value
+# );
+#------------------------------------------------------------------------------
+.global 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 4c69bcbfd7..dce9469856 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# InternalX86WriteGdtr (
+# IN CONST IA32_DESCRIPTOR *Idtr
+# );
+#------------------------------------------------------------------------------
+.global 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 79c48ea8ca..30836979f5 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteIdtr.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteIdtr.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:
-#
-# WriteIdtr.S
-#
-# Abstract:
-#
-# AsmWriteIdtr function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# VOID
-# EFIAPI
-# InternalX86WriteIdtr (
-# IN CONST IA32_DESCRIPTOR *Idtr
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(InternalX86WriteIdtr)
-.align 16
-ASM_PFX(InternalX86WriteIdtr):
- lidt (%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:
+#
+# WriteIdtr.S
+#
+# Abstract:
+#
+# AsmWriteIdtr function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# InternalX86WriteIdtr (
+# IN CONST IA32_DESCRIPTOR *Idtr
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(InternalX86WriteIdtr)
+.align 16
+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 bc74b8a997..73db6532dc 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteLdtr.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteLdtr.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:
-#
-# WriteLdtr.S
-#
-# Abstract:
-#
-# AsmWriteLdtr function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# VOID
-# EFIAPI
-# AsmWriteLdtr (
-# IN UINT16 Ldtr
-# );
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteLdtr);
-.align 16
-ASM_PFX(AsmWriteLdtr):
- lldt %cx
- 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:
+#
+# WriteLdtr.S
+#
+# Abstract:
+#
+# AsmWriteLdtr function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWriteLdtr (
+# IN UINT16 Ldtr
+# );
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmWriteLdtr);
+.align 16
+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 4bbda73976..ac690b2807 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWriteMm0 (
+# IN UINT64 Value
+# );
+#------------------------------------------------------------------------------
+.global 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 fdb853161d..e21f55d328 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWriteMm1 (
+# IN UINT64 Value
+# );
+#------------------------------------------------------------------------------
+.global 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 8499e5ccf3..f8ec39458d 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWriteMm2 (
+# IN UINT64 Value
+# );
+#------------------------------------------------------------------------------
+.global 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 36d4963ead..82d04b829e 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWriteMm3 (
+# IN UINT64 Value
+# );
+#------------------------------------------------------------------------------
+.global 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 89ae41325a..72406e3915 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWriteMm4 (
+# IN UINT64 Value
+# );
+#------------------------------------------------------------------------------
+.global 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 7ff9d5246a..39a6a33693 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWriteMm5 (
+# IN UINT64 Value
+# );
+#------------------------------------------------------------------------------
+.global 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 fcfba8e3ca..a4540dc267 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWriteMm6 (
+# IN UINT64 Value
+# );
+#------------------------------------------------------------------------------
+.global 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 5df193827a..865b7162a4 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 <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# 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 <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID
+# EFIAPI
+# AsmWriteMm7 (
+# IN UINT64 Value
+# );
+#------------------------------------------------------------------------------
+.global 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 bf0271745e..b4907fe7f9 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.S
@@ -1,40 +1,40 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# WriteMsr64.S
-#
-# Abstract:
-#
-# AsmWriteMsr64 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# AsmWriteMsr64 (
-# IN UINT32 Index,
-# IN UINT64 Value
-# );
-# TODO:
-#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteMsr64)
-.align 16
-ASM_PFX(AsmWriteMsr64):
- mov %rdx, %rax
- shr $0x20, %rdx
- wrmsr
- 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:
+#
+# WriteMsr64.S
+#
+# Abstract:
+#
+# AsmWriteMsr64 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# UINT64
+# EFIAPI
+# AsmWriteMsr64 (
+# IN UINT32 Index,
+# IN UINT64 Value
+# );
+# TODO:
+#------------------------------------------------------------------------------
+.global ASM_PFX(AsmWriteMsr64)
+.align 16
+ASM_PFX(AsmWriteMsr64):
+ mov %rdx, %rax
+ shr $0x20, %rdx
+ wrmsr
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CompareMem.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CompareMem.S
index fe2afce728..0bb598f659 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CompareMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CompareMem.S
@@ -1,53 +1,53 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# CompareMem.Asm
-#
-# Abstract:
-#
-# CompareMem function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-#include <EdkIIGlueBase.h>
-.globl ASM_PFX(InternalMemCompareMem)
-
-#------------------------------------------------------------------------------
-# INTN
-# EFIAPI
-# InternalMemCompareMem (
-# IN CONST VOID *DestinationBuffer,
-# IN CONST VOID *SourceBuffer,
-# IN UINTN Length
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemCompareMem):
- push %esi
- push %edi
- movl 12(%esp), %esi
- movl 16(%esp), %edi
- movl 20(%esp), %ecx
- repe cmpsb
- movzbl -1(%esi), %eax
- movzbl -1(%edi), %edx
- subl %edx, %eax
- pop %edi
- pop %esi
- 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:
+#
+# CompareMem.Asm
+#
+# Abstract:
+#
+# CompareMem function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+#include <EdkIIGlueBase.h>
+.globl ASM_PFX(InternalMemCompareMem)
+
+#------------------------------------------------------------------------------
+# INTN
+# EFIAPI
+# InternalMemCompareMem (
+# IN CONST VOID *DestinationBuffer,
+# IN CONST VOID *SourceBuffer,
+# IN UINTN Length
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMemCompareMem):
+ push %esi
+ push %edi
+ movl 12(%esp), %esi
+ movl 16(%esp), %edi
+ movl 20(%esp), %ecx
+ repe cmpsb
+ movzbl -1(%esi), %eax
+ movzbl -1(%edi), %edx
+ subl %edx, %eax
+ pop %edi
+ pop %esi
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CopyMem.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CopyMem.S
index 9800e6844e..484484dd27 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CopyMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CopyMem.S
@@ -1,65 +1,65 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# CopyMem.Asm
-#
-# Abstract:
-#
-# CopyMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-#include <EdkIIGlueBase.h>
-.globl ASM_PFX(InternalMemCopyMem)
-
-#------------------------------------------------------------------------------
-# VOID *
-# EFIAPI
-# InternalMemCopyMem (
-# IN VOID *Destination,
-# IN VOID *Source,
-# IN UINTN Count
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemCopyMem):
- push %esi
- push %edi
- movl 16(%esp), %esi # esi <- Source
- movl 12(%esp), %edi # edi <- Destination
- movl 20(%esp), %edx # edx <- Count
- leal -1(%esi, %edx), %eax # eax <- End of Source
- cmpl %edi, %esi
- jae L0
- cmpl %edi, %eax
- jae L_CopyBackward # Copy backward if overlapped
-L0:
- movl %edx, %ecx
- andl $3, %edx
- shrl $2, %ecx
- rep
- movsl # Copy as many Dwords as possible
- jmp L_CopyBytes
-L_CopyBackward:
- movl %eax, %esi # esi <- End of Source
- leal -1(%edi, %edx), %edi # edi <- End of Destination
- std
-L_CopyBytes:
- movl %edx, %ecx
- rep
- movsb # Copy bytes backward
- cld
- movl 12(%esp), %eax # eax <- Destination as return value
- pop %edi
- pop %esi
- 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:
+#
+# CopyMem.Asm
+#
+# Abstract:
+#
+# CopyMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+#include <EdkIIGlueBase.h>
+.globl ASM_PFX(InternalMemCopyMem)
+
+#------------------------------------------------------------------------------
+# VOID *
+# EFIAPI
+# InternalMemCopyMem (
+# IN VOID *Destination,
+# IN VOID *Source,
+# IN UINTN Count
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMemCopyMem):
+ push %esi
+ push %edi
+ movl 16(%esp), %esi # esi <- Source
+ movl 12(%esp), %edi # edi <- Destination
+ movl 20(%esp), %edx # edx <- Count
+ leal -1(%esi, %edx), %eax # eax <- End of Source
+ cmpl %edi, %esi
+ jae L0
+ cmpl %edi, %eax
+ jae L_CopyBackward # Copy backward if overlapped
+L0:
+ movl %edx, %ecx
+ andl $3, %edx
+ shrl $2, %ecx
+ rep
+ movsl # Copy as many Dwords as possible
+ jmp L_CopyBytes
+L_CopyBackward:
+ movl %eax, %esi # esi <- End of Source
+ leal -1(%edi, %edx), %edi # edi <- End of Destination
+ std
+L_CopyBytes:
+ movl %edx, %ecx
+ rep
+ movsb # Copy bytes backward
+ cld
+ movl 12(%esp), %eax # eax <- Destination as return value
+ pop %edi
+ pop %esi
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem16.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem16.S
index 681506d2a7..ec60d21172 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem16.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem16.S
@@ -1,50 +1,50 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem16.Asm
-#
-# Abstract:
-#
-# ScanMem16 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-#include <EdkIIGlueBase.h>
-.globl ASM_PFX(InternalMemScanMem16)
-
-#------------------------------------------------------------------------------
-# CONST VOID *
-# EFIAPI
-# InternalMemScanMem16 (
-# IN CONST VOID *Buffer,
-# IN UINTN Length,
-# IN UINT16 Value
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemScanMem16):
- push %edi
- movl 12(%esp), %ecx
- movl 8(%esp), %edi
- movl 16(%esp), %eax
- repne scasw
- leal -2(%edi), %eax
- cmovnz %ecx, %eax
- pop %edi
- 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:
+#
+# ScanMem16.Asm
+#
+# Abstract:
+#
+# ScanMem16 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+#include <EdkIIGlueBase.h>
+.globl ASM_PFX(InternalMemScanMem16)
+
+#------------------------------------------------------------------------------
+# CONST VOID *
+# EFIAPI
+# InternalMemScanMem16 (
+# IN CONST VOID *Buffer,
+# IN UINTN Length,
+# IN UINT16 Value
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMemScanMem16):
+ push %edi
+ movl 12(%esp), %ecx
+ movl 8(%esp), %edi
+ movl 16(%esp), %eax
+ repne scasw
+ leal -2(%edi), %eax
+ cmovnz %ecx, %eax
+ pop %edi
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem32.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem32.S
index 727c0bdc9c..b73c9ad6be 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem32.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem32.S
@@ -1,50 +1,50 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem32.Asm
-#
-# Abstract:
-#
-# ScanMem32 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-#include <EdkIIGlueBase.h>
-.globl ASM_PFX(InternalMemScanMem32)
-
-#------------------------------------------------------------------------------
-# CONST VOID *
-# EFIAPI
-# InternalMemScanMem32 (
-# IN CONST VOID *Buffer,
-# IN UINTN Length,
-# IN UINT32 Value
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemScanMem32):
- push %edi
- movl 12(%esp), %ecx
- movl 8(%esp), %edi
- movl 16(%esp), %eax
- repne scasl
- leal -4(%edi), %eax
- cmovnz %ecx, %eax
- pop %edi
- 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:
+#
+# ScanMem32.Asm
+#
+# Abstract:
+#
+# ScanMem32 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+#include <EdkIIGlueBase.h>
+.globl ASM_PFX(InternalMemScanMem32)
+
+#------------------------------------------------------------------------------
+# CONST VOID *
+# EFIAPI
+# InternalMemScanMem32 (
+# IN CONST VOID *Buffer,
+# IN UINTN Length,
+# IN UINT32 Value
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMemScanMem32):
+ push %edi
+ movl 12(%esp), %ecx
+ movl 8(%esp), %edi
+ movl 16(%esp), %eax
+ repne scasl
+ leal -4(%edi), %eax
+ cmovnz %ecx, %eax
+ pop %edi
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem64.S
index 7400b520b4..1a3ed036cd 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem64.S
@@ -1,59 +1,59 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem64.Asm
-#
-# Abstract:
-#
-# ScanMem64 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-#include <EdkIIGlueBase.h>
-.globl ASM_PFX(InternalMemScanMem64)
-
-#------------------------------------------------------------------------------
-# CONST VOID *
-# EFIAPI
-# InternalMemScanMem64 (
-# IN CONST VOID *Buffer,
-# IN UINTN Length,
-# IN UINT64 Value
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemScanMem64):
- push %edi
- movl 12(%esp), %ecx
- movl 16(%esp), %eax
- movl 20(%esp), %edx
- movl 8(%esp), %edi
-L0:
- cmpl (%edi), %eax
- leal 8(%edi), %edi
- loopne L0
- jne L1
- cmpl -4(%edi), %edx
- jecxz L1
- jne L0
-L1:
- leal -8(%edi), %eax
- cmovne %ecx, %eax
- pop %edi
- 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:
+#
+# ScanMem64.Asm
+#
+# Abstract:
+#
+# ScanMem64 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+#include <EdkIIGlueBase.h>
+.globl ASM_PFX(InternalMemScanMem64)
+
+#------------------------------------------------------------------------------
+# CONST VOID *
+# EFIAPI
+# InternalMemScanMem64 (
+# IN CONST VOID *Buffer,
+# IN UINTN Length,
+# IN UINT64 Value
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMemScanMem64):
+ push %edi
+ movl 12(%esp), %ecx
+ movl 16(%esp), %eax
+ movl 20(%esp), %edx
+ movl 8(%esp), %edi
+L0:
+ cmpl (%edi), %eax
+ leal 8(%edi), %edi
+ loopne L0
+ jne L1
+ cmpl -4(%edi), %edx
+ jecxz L1
+ jne L0
+L1:
+ leal -8(%edi), %eax
+ cmovne %ecx, %eax
+ pop %edi
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem8.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem8.S
index e01ebf08ed..aef7530b90 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem8.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem8.S
@@ -1,50 +1,50 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem8.Asm
-#
-# Abstract:
-#
-# ScanMem8 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-#include <EdkIIGlueBase.h>
-.globl ASM_PFX(InternalMemScanMem8)
-
-#------------------------------------------------------------------------------
-# CONST VOID *
-# EFIAPI
-# InternalMemScanMem8 (
-# IN CONST VOID *Buffer,
-# IN UINTN Length,
-# IN UINT8 Value
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemScanMem8):
- push %edi
- movl 12(%esp), %ecx
- movl 8(%esp), %edi
- movb 16(%esp), %al
- repne scasb
- leal -1(%edi), %eax
- cmovnz %ecx, %eax
- pop %edi
- 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:
+#
+# ScanMem8.Asm
+#
+# Abstract:
+#
+# ScanMem8 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+#include <EdkIIGlueBase.h>
+.globl ASM_PFX(InternalMemScanMem8)
+
+#------------------------------------------------------------------------------
+# CONST VOID *
+# EFIAPI
+# InternalMemScanMem8 (
+# IN CONST VOID *Buffer,
+# IN UINTN Length,
+# IN UINT8 Value
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMemScanMem8):
+ push %edi
+ movl 12(%esp), %ecx
+ movl 8(%esp), %edi
+ movb 16(%esp), %al
+ repne scasb
+ leal -1(%edi), %eax
+ cmovnz %ecx, %eax
+ pop %edi
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem.S
index 434d537c78..59a7e4b0f1 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem.S
@@ -1,46 +1,46 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem.Asm
-#
-# Abstract:
-#
-# SetMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-#include <EdkIIGlueBase.h>
- .386:
- .code:
-
-.globl ASM_PFX(InternalMemSetMem)
-
-#------------------------------------------------------------------------------
-# VOID *
-# InternalMemSetMem (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT8 Value
-# )
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemSetMem):
- push %edi
- movl 16(%esp),%eax
- movl 8(%esp),%edi
- movl 12(%esp),%ecx
- rep
- stosb
- movl 8(%esp),%eax
- pop %edi
- 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:
+#
+# SetMem.Asm
+#
+# Abstract:
+#
+# SetMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+#include <EdkIIGlueBase.h>
+ .386:
+ .code:
+
+.globl ASM_PFX(InternalMemSetMem)
+
+#------------------------------------------------------------------------------
+# VOID *
+# InternalMemSetMem (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT8 Value
+# )
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMemSetMem):
+ push %edi
+ movl 16(%esp),%eax
+ movl 8(%esp),%edi
+ movl 12(%esp),%ecx
+ rep
+ stosb
+ movl 8(%esp),%eax
+ pop %edi
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem16.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem16.S
index 66a45b6b3c..053454969a 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem16.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem16.S
@@ -1,43 +1,43 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem16.Asm
-#
-# Abstract:
-#
-# SetMem16 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-#include <EdkIIGlueBase.h>
-.globl ASM_PFX(InternalMemSetMem16)
-
-#------------------------------------------------------------------------------
-# VOID *
-# InternalMemSetMem16 (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT16 Value
-# )
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemSetMem16):
- push %edi
- movl 16(%esp), %eax
- movl 8(%esp), %edi
- movl 12(%esp), %ecx
- rep
- stosw
- movl 8(%esp), %eax
- pop %edi
- 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:
+#
+# SetMem16.Asm
+#
+# Abstract:
+#
+# SetMem16 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+#include <EdkIIGlueBase.h>
+.globl ASM_PFX(InternalMemSetMem16)
+
+#------------------------------------------------------------------------------
+# VOID *
+# InternalMemSetMem16 (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT16 Value
+# )
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMemSetMem16):
+ push %edi
+ movl 16(%esp), %eax
+ movl 8(%esp), %edi
+ movl 12(%esp), %ecx
+ rep
+ stosw
+ movl 8(%esp), %eax
+ pop %edi
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem32.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem32.S
index 193f00659f..541b26d261 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem32.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem32.S
@@ -1,43 +1,43 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem32.Asm
-#
-# Abstract:
-#
-# SetMem32 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-#include <EdkIIGlueBase.h>
-.globl ASM_PFX(InternalMemSetMem32)
-
-#------------------------------------------------------------------------------
-# VOID *
-# InternalMemSetMem32 (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT32 Value
-# )
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemSetMem32):
- push %edi
- movl 16(%esp),%eax
- movl 8(%esp),%edi
- movl 12(%esp),%ecx
- rep
- stosl
- movl 8(%esp),%eax
- pop %edi
- 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:
+#
+# SetMem32.Asm
+#
+# Abstract:
+#
+# SetMem32 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+#include <EdkIIGlueBase.h>
+.globl ASM_PFX(InternalMemSetMem32)
+
+#------------------------------------------------------------------------------
+# VOID *
+# InternalMemSetMem32 (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT32 Value
+# )
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMemSetMem32):
+ push %edi
+ movl 16(%esp),%eax
+ movl 8(%esp),%edi
+ movl 12(%esp),%ecx
+ rep
+ stosl
+ movl 8(%esp),%eax
+ pop %edi
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem64.S
index 2c8a68bcda..2f20783b6b 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem64.S
@@ -1,46 +1,46 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem64.Asm
-#
-# Abstract:
-#
-# SetMem64 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-#include <EdkIIGlueBase.h>
-.globl ASM_PFX(InternalMemSetMem64)
-
-#------------------------------------------------------------------------------
-# VOID *
-# InternalMemSetMem64 (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT64 Value
-# )
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemSetMem64):
- push %edi
- movl 12(%esp), %ecx
- movl 16(%esp), %eax
- movl 20(%esp), %edx
- movl 8(%esp), %edi
-L0:
- mov %eax, -8(%edi, %ecx, 8)
- mov %edx, -4(%edi, %ecx, 8)
- loop L0
- movl %edi, %eax
- pop %edi
- 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:
+#
+# SetMem64.Asm
+#
+# Abstract:
+#
+# SetMem64 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+#include <EdkIIGlueBase.h>
+.globl ASM_PFX(InternalMemSetMem64)
+
+#------------------------------------------------------------------------------
+# VOID *
+# InternalMemSetMem64 (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT64 Value
+# )
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMemSetMem64):
+ push %edi
+ movl 12(%esp), %ecx
+ movl 16(%esp), %eax
+ movl 20(%esp), %edx
+ movl 8(%esp), %edi
+L0:
+ mov %eax, -8(%edi, %ecx, 8)
+ mov %edx, -4(%edi, %ecx, 8)
+ loop L0
+ movl %edi, %eax
+ pop %edi
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ZeroMem.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ZeroMem.S
index b3c8853230..8d2bd812b8 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ZeroMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ZeroMem.S
@@ -1,49 +1,49 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ZeroMem.Asm
-#
-# Abstract:
-#
-# ZeroMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-#include <EdkIIGlueBase.h>
-.globl ASM_PFX(InternalMemZeroMem)
-
-#------------------------------------------------------------------------------
-# VOID *
-# InternalMemZeroMem (
-# IN VOID *Buffer,
-# IN UINTN Count
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalMemZeroMem):
- push %edi
- xorl %eax,%eax
- movl 8(%esp),%edi
- movl 12(%esp),%ecx
- movl %ecx,%edx
- shrl $2,%ecx
- andl $3,%edx
- pushl %edi
- rep
- stosl
- movl %edx,%ecx
- rep
- stosb
- popl %eax
- pop %edi
- 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:
+#
+# ZeroMem.Asm
+#
+# Abstract:
+#
+# ZeroMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+#include <EdkIIGlueBase.h>
+.globl ASM_PFX(InternalMemZeroMem)
+
+#------------------------------------------------------------------------------
+# VOID *
+# InternalMemZeroMem (
+# IN VOID *Buffer,
+# IN UINTN Count
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(InternalMemZeroMem):
+ push %edi
+ xorl %eax,%eax
+ movl 8(%esp),%edi
+ movl 12(%esp),%ecx
+ movl %ecx,%edx
+ shrl $2,%ecx
+ andl $3,%edx
+ pushl %edi
+ rep
+ stosl
+ movl %edx,%ecx
+ rep
+ stosb
+ popl %eax
+ pop %edi
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CompareMem.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CompareMem.S
index 33bb6f97e4..011d2b00c1 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CompareMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CompareMem.S
@@ -1,58 +1,58 @@
-#
-# ConvertAsm.py: Automatically generated from CompareMem.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# CompareMem.S
-#
-# Abstract:
-#
-# CompareMem function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# INTN
-# EFIAPI
-# InternalMemCompareMem (
-# IN CONST VOID *DestinationBuffer,
-# IN CONST VOID *SourceBuffer,
-# IN UINTN Length
-# );
-#------------------------------------------------------------------------------
-.intel_syntax
-.globl ASM_PFX(InternalMemCompareMem)
-ASM_PFX(InternalMemCompareMem):
- push rsi
- push rdi
- mov rsi, rcx
- mov rdi, rdx
- mov rcx, r8
- repe cmpsb
- movzx rax, byte ptr [rsi - 1]
- movzx rdx, byte ptr [rdi - 1]
- sub rax, rdx
- pop rdi
- pop rsi
- ret
-
+#
+# ConvertAsm.py: Automatically generated from CompareMem.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# CompareMem.S
+#
+# Abstract:
+#
+# CompareMem function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# INTN
+# EFIAPI
+# InternalMemCompareMem (
+# IN CONST VOID *DestinationBuffer,
+# IN CONST VOID *SourceBuffer,
+# IN UINTN Length
+# );
+#------------------------------------------------------------------------------
+.intel_syntax
+.globl ASM_PFX(InternalMemCompareMem)
+ASM_PFX(InternalMemCompareMem):
+ push rsi
+ push rdi
+ mov rsi, rcx
+ mov rdi, rdx
+ mov rcx, r8
+ repe cmpsb
+ movzx rax, byte ptr [rsi - 1]
+ movzx rdx, byte ptr [rdi - 1]
+ sub rax, rdx
+ pop rdi
+ pop rsi
+ ret
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CopyMem.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CopyMem.S
index 69fd8dbd95..97a55206ec 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CopyMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CopyMem.S
@@ -1,67 +1,67 @@
-#
-# ConvertAsm.py: Automatically generated from CopyMem.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# CopyMem.S
-#
-# Abstract:
-#
-# CopyMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# VOID *
-# EFIAPI
-# InternalMemCopyMem (
-# IN VOID *Destination,
-# IN VOID *Source,
-# IN UINTN Count
-# )
-#------------------------------------------------------------------------------
-.intel_syntax
-.globl ASM_PFX(InternalMemCopyMem)
-ASM_PFX(InternalMemCopyMem):
- push rsi
- push rdi
- mov rsi, rdx # rsi <- Source
- mov rdi, rcx # rdi <- Destination
- lea r9, [rsi + r8 - 1] # r9 <- End of Source
- cmp rsi, rdi
- mov rax, rdi # rax <- Destination as return value
- jae _InternalMemCopyMem_al_0000
- cmp r9, rdi
- jae _atSym_CopyBackward # Copy backward if overlapped
-_InternalMemCopyMem_al_0000:
- mov rcx, r8
- and r8, 7
- shr rcx, 3
- rep movsq # Copy as many Qwords as possible
- jmp _atSym_CopyBytes
-_atSym_CopyBackward:
- mov rsi, r9 # rsi <- End of Source
- lea rdi, [rdi + r8 - 1] # esi <- End of Destination
- std # set direction flag
-_atSym_CopyBytes:
- mov rcx, r8
- rep movsb # Copy bytes backward
- cld
- pop rdi
- pop rsi
- ret
-
+#
+# ConvertAsm.py: Automatically generated from CopyMem.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# CopyMem.S
+#
+# Abstract:
+#
+# CopyMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID *
+# EFIAPI
+# InternalMemCopyMem (
+# IN VOID *Destination,
+# IN VOID *Source,
+# IN UINTN Count
+# )
+#------------------------------------------------------------------------------
+.intel_syntax
+.globl ASM_PFX(InternalMemCopyMem)
+ASM_PFX(InternalMemCopyMem):
+ push rsi
+ push rdi
+ mov rsi, rdx # rsi <- Source
+ mov rdi, rcx # rdi <- Destination
+ lea r9, [rsi + r8 - 1] # r9 <- End of Source
+ cmp rsi, rdi
+ mov rax, rdi # rax <- Destination as return value
+ jae _InternalMemCopyMem_al_0000
+ cmp r9, rdi
+ jae _atSym_CopyBackward # Copy backward if overlapped
+_InternalMemCopyMem_al_0000:
+ mov rcx, r8
+ and r8, 7
+ shr rcx, 3
+ rep movsq # Copy as many Qwords as possible
+ jmp _atSym_CopyBytes
+_atSym_CopyBackward:
+ mov rsi, r9 # rsi <- End of Source
+ lea rdi, [rdi + r8 - 1] # esi <- End of Destination
+ std # set direction flag
+_atSym_CopyBytes:
+ mov rcx, r8
+ rep movsb # Copy bytes backward
+ cld
+ pop rdi
+ pop rsi
+ ret
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem16.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem16.S
index c8deb92648..2c049b588f 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem16.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem16.S
@@ -1,55 +1,55 @@
-#
-# ConvertAsm.py: Automatically generated from ScanMem16.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem16.S
-#
-# Abstract:
-#
-# ScanMem16 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# CONST VOID *
-# EFIAPI
-# InternalMemScanMem16 (
-# IN CONST VOID *Buffer,
-# IN UINTN Length,
-# IN UINT16 Value
-# );
-#------------------------------------------------------------------------------
-.intel_syntax
-.globl ASM_PFX(InternalMemScanMem16)
-ASM_PFX(InternalMemScanMem16):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
- repne scasw
- lea rax, [rdi - 2]
- cmovnz rax, rcx
- pop rdi
- ret
-
+#
+# ConvertAsm.py: Automatically generated from ScanMem16.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem16.S
+#
+# Abstract:
+#
+# ScanMem16 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# CONST VOID *
+# EFIAPI
+# InternalMemScanMem16 (
+# IN CONST VOID *Buffer,
+# IN UINTN Length,
+# IN UINT16 Value
+# );
+#------------------------------------------------------------------------------
+.intel_syntax
+.globl ASM_PFX(InternalMemScanMem16)
+ASM_PFX(InternalMemScanMem16):
+ push rdi
+ mov rdi, rcx
+ mov rax, r8
+ mov rcx, rdx
+ repne scasw
+ lea rax, [rdi - 2]
+ cmovnz rax, rcx
+ pop rdi
+ ret
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem32.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem32.S
index 6c21453956..c16ef8d4f8 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem32.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem32.S
@@ -1,55 +1,55 @@
-#
-# ConvertAsm.py: Automatically generated from ScanMem32.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem32.S
-#
-# Abstract:
-#
-# ScanMem32 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# CONST VOID *
-# EFIAPI
-# InternalMemScanMem32 (
-# IN CONST VOID *Buffer,
-# IN UINTN Length,
-# IN UINT32 Value
-# );
-#------------------------------------------------------------------------------
-.intel_syntax
-.globl ASM_PFX(InternalMemScanMem32)
-ASM_PFX(InternalMemScanMem32):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
- repne scasd
- lea rax, [rdi - 4]
- cmovnz rax, rcx
- pop rdi
- ret
-
+#
+# ConvertAsm.py: Automatically generated from ScanMem32.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem32.S
+#
+# Abstract:
+#
+# ScanMem32 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# CONST VOID *
+# EFIAPI
+# InternalMemScanMem32 (
+# IN CONST VOID *Buffer,
+# IN UINTN Length,
+# IN UINT32 Value
+# );
+#------------------------------------------------------------------------------
+.intel_syntax
+.globl ASM_PFX(InternalMemScanMem32)
+ASM_PFX(InternalMemScanMem32):
+ push rdi
+ mov rdi, rcx
+ mov rax, r8
+ mov rcx, rdx
+ repne scasd
+ lea rax, [rdi - 4]
+ cmovnz rax, rcx
+ pop rdi
+ ret
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem64.S
index a5b36fb47a..4916520ed7 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem64.S
@@ -1,55 +1,55 @@
-#
-# ConvertAsm.py: Automatically generated from ScanMem64.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem64.S
-#
-# Abstract:
-#
-# ScanMem64 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# CONST VOID *
-# EFIAPI
-# InternalMemScanMem64 (
-# IN CONST VOID *Buffer,
-# IN UINTN Length,
-# IN UINT64 Value
-# );
-#------------------------------------------------------------------------------
-.intel_syntax
-.globl ASM_PFX(InternalMemScanMem64)
-ASM_PFX(InternalMemScanMem64):
- push rdi
- mov rdi, rcx
- mov rax, r8
- mov rcx, rdx
- repne scasq
- lea rax, [rdi - 8]
- cmovnz rax, rcx
- pop rdi
- ret
-
+#
+# ConvertAsm.py: Automatically generated from ScanMem64.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem64.S
+#
+# Abstract:
+#
+# ScanMem64 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# CONST VOID *
+# EFIAPI
+# InternalMemScanMem64 (
+# IN CONST VOID *Buffer,
+# IN UINTN Length,
+# IN UINT64 Value
+# );
+#------------------------------------------------------------------------------
+.intel_syntax
+.globl ASM_PFX(InternalMemScanMem64)
+ASM_PFX(InternalMemScanMem64):
+ push rdi
+ mov rdi, rcx
+ mov rax, r8
+ mov rcx, rdx
+ repne scasq
+ lea rax, [rdi - 8]
+ cmovnz rax, rcx
+ pop rdi
+ ret
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem8.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem8.S
index 548de0d73a..90a6b388c4 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem8.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem8.S
@@ -1,55 +1,55 @@
-#
-# ConvertAsm.py: Automatically generated from ScanMem8.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem8.S
-#
-# Abstract:
-#
-# ScanMem8 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# CONST VOID *
-# EFIAPI
-# InternalMemScanMem8 (
-# IN CONST VOID *Buffer,
-# IN UINTN Length,
-# IN UINT8 Value
-# );
-#------------------------------------------------------------------------------
-.intel_syntax
-.globl ASM_PFX(InternalMemScanMem8)
-ASM_PFX(InternalMemScanMem8):
- push rdi
- mov rdi, rcx
- mov rcx, rdx
- mov rax, r8
- repne scasb
- lea rax, [rdi - 1]
- cmovnz rax, rcx # set rax to 0 if not found
- pop rdi
- ret
-
+#
+# ConvertAsm.py: Automatically generated from ScanMem8.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem8.S
+#
+# Abstract:
+#
+# ScanMem8 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# CONST VOID *
+# EFIAPI
+# InternalMemScanMem8 (
+# IN CONST VOID *Buffer,
+# IN UINTN Length,
+# IN UINT8 Value
+# );
+#------------------------------------------------------------------------------
+.intel_syntax
+.globl ASM_PFX(InternalMemScanMem8)
+ASM_PFX(InternalMemScanMem8):
+ push rdi
+ mov rdi, rcx
+ mov rcx, rdx
+ mov rax, r8
+ repne scasb
+ lea rax, [rdi - 1]
+ cmovnz rax, rcx # set rax to 0 if not found
+ pop rdi
+ ret
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem.S
index ca53eb9fa2..6316d073e4 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem.S
@@ -1,48 +1,48 @@
-#
-# ConvertAsm.py: Automatically generated from SetMem.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem.S
-#
-# Abstract:
-#
-# SetMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# VOID *
-# EFIAPI
-# InternalMemSetMem (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT8 Value
-# )
-#------------------------------------------------------------------------------
-.intel_syntax
-.globl ASM_PFX(InternalMemSetMem)
-ASM_PFX(InternalMemSetMem):
- push rdi
- mov rax, r8 # rax = Value
- mov rdi, rcx # rdi = Buffer
- xchg rcx, rdx # rcx = Count, rdx = Buffer
- rep stosb
- mov rax, rdx # rax = Buffer
- pop rdi
- ret
-
+#
+# ConvertAsm.py: Automatically generated from SetMem.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem.S
+#
+# Abstract:
+#
+# SetMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID *
+# EFIAPI
+# InternalMemSetMem (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT8 Value
+# )
+#------------------------------------------------------------------------------
+.intel_syntax
+.globl ASM_PFX(InternalMemSetMem)
+ASM_PFX(InternalMemSetMem):
+ push rdi
+ mov rax, r8 # rax = Value
+ mov rdi, rcx # rdi = Buffer
+ xchg rcx, rdx # rcx = Count, rdx = Buffer
+ rep stosb
+ mov rax, rdx # rax = Buffer
+ pop rdi
+ ret
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem16.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem16.S
index 311ed1bc0f..35551b78d3 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem16.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem16.S
@@ -1,48 +1,48 @@
-#
-# ConvertAsm.py: Automatically generated from SetMem16.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem16.S
-#
-# Abstract:
-#
-# SetMem16 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# VOID *
-# EFIAPI
-# InternalMemSetMem16 (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT16 Value
-# )
-#------------------------------------------------------------------------------
-.intel_syntax
-.globl ASM_PFX(InternalMemSetMem16)
-ASM_PFX(InternalMemSetMem16):
- push rdi
- mov rdi, rcx
- mov rax, r8
- xchg rcx, rdx
- rep stosw
- mov rax, rdx
- pop rdi
- ret
-
+#
+# ConvertAsm.py: Automatically generated from SetMem16.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem16.S
+#
+# Abstract:
+#
+# SetMem16 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID *
+# EFIAPI
+# InternalMemSetMem16 (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT16 Value
+# )
+#------------------------------------------------------------------------------
+.intel_syntax
+.globl ASM_PFX(InternalMemSetMem16)
+ASM_PFX(InternalMemSetMem16):
+ push rdi
+ mov rdi, rcx
+ mov rax, r8
+ xchg rcx, rdx
+ rep stosw
+ mov rax, rdx
+ pop rdi
+ ret
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem32.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem32.S
index 3cc0c5f435..86ae715b51 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem32.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem32.S
@@ -1,48 +1,48 @@
-#
-# ConvertAsm.py: Automatically generated from SetMem32.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem32.S
-#
-# Abstract:
-#
-# SetMem32 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# VOID *
-# EFIAPI
-# InternalMemSetMem32 (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT32 Value
-# );
-#------------------------------------------------------------------------------
-.intel_syntax
-.globl ASM_PFX(InternalMemSetMem32)
-ASM_PFX(InternalMemSetMem32):
- push rdi
- mov rdi, rcx
- mov rax, r8
- xchg rcx, rdx
- rep stosd
- mov rax, rdx
- pop rdi
- ret
-
+#
+# ConvertAsm.py: Automatically generated from SetMem32.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem32.S
+#
+# Abstract:
+#
+# SetMem32 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID *
+# EFIAPI
+# InternalMemSetMem32 (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT32 Value
+# );
+#------------------------------------------------------------------------------
+.intel_syntax
+.globl ASM_PFX(InternalMemSetMem32)
+ASM_PFX(InternalMemSetMem32):
+ push rdi
+ mov rdi, rcx
+ mov rax, r8
+ xchg rcx, rdx
+ rep stosd
+ mov rax, rdx
+ pop rdi
+ ret
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem64.S
index 16b1f13843..929a9e738f 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem64.S
@@ -1,47 +1,47 @@
-#
-# ConvertAsm.py: Automatically generated from SetMem64.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem64.S
-#
-# Abstract:
-#
-# SetMem64 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# VOID *
-# InternalMemSetMem64 (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT64 Value
-# )
-#------------------------------------------------------------------------------
-.intel_syntax
-.globl ASM_PFX(InternalMemSetMem64)
-ASM_PFX(InternalMemSetMem64):
- push rdi
- mov rdi, rcx
- mov rax, r8
- xchg rcx, rdx
- rep stosq
- mov rax, rdx
- pop rdi
- ret
-
+#
+# ConvertAsm.py: Automatically generated from SetMem64.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem64.S
+#
+# Abstract:
+#
+# SetMem64 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID *
+# InternalMemSetMem64 (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT64 Value
+# )
+#------------------------------------------------------------------------------
+.intel_syntax
+.globl ASM_PFX(InternalMemSetMem64)
+ASM_PFX(InternalMemSetMem64):
+ push rdi
+ mov rdi, rcx
+ mov rax, r8
+ xchg rcx, rdx
+ rep stosq
+ mov rax, rdx
+ pop rdi
+ ret
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ZeroMem.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ZeroMem.S
index 475d6a6731..b2b08502c4 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ZeroMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ZeroMem.S
@@ -1,51 +1,51 @@
-#
-# ConvertAsm.py: Automatically generated from ZeroMem.asm
-#
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ZeroMem.S
-#
-# Abstract:
-#
-# ZeroMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-#include <EdkIIGlueBase.h>
-#------------------------------------------------------------------------------
-# VOID *
-# InternalMemZeroMem (
-# IN VOID *Buffer,
-# IN UINTN Count
-# );
-#------------------------------------------------------------------------------
-.intel_syntax
-.globl ASM_PFX(InternalMemZeroMem)
-ASM_PFX(InternalMemZeroMem):
- push rdi
- push rcx
- xor rax, rax
- mov rdi, rcx
- mov rcx, rdx
- shr rcx, 3
- and rdx, 7
- rep stosq
- mov ecx, edx
- rep stosb
- pop rax
- pop rdi
- ret
-
+#
+# ConvertAsm.py: Automatically generated from ZeroMem.asm
+#
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ZeroMem.S
+#
+# Abstract:
+#
+# ZeroMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+#include <EdkIIGlueBase.h>
+#------------------------------------------------------------------------------
+# VOID *
+# InternalMemZeroMem (
+# IN VOID *Buffer,
+# IN UINTN Count
+# );
+#------------------------------------------------------------------------------
+.intel_syntax
+.globl ASM_PFX(InternalMemZeroMem)
+ASM_PFX(InternalMemZeroMem):
+ push rdi
+ push rcx
+ xor rax, rax
+ mov rdi, rcx
+ mov rcx, rdx
+ shr rcx, 3
+ and rdx, 7
+ rep stosq
+ mov ecx, edx
+ rep stosb
+ pop rax
+ pop rdi
+ ret
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/DivU64x32.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/DivU64x32.S
index edf0dd7042..614bf2e6d0 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/DivU64x32.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/DivU64x32.S
@@ -1,91 +1,91 @@
-#---------------------------------------------------------------------------
-#/*++
-#
-#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:
-#
-# DivU64x32.c
-#
-#Abstract:
-#
-# 64-bit division function for IA-32
-#
-#--*/
-
-#---------------------------------------------------------------------------
-#include "EfiBind.h" //For ASM_PFX
-#---------------------------------------------------------------------------
-
-#---------------------------------------------------------------------------
- .386:
- .code:
-
-#---------------------------------------------------------------------------
-
-.globl ASM_PFX(DivU64x32)
-
-#UINT64
-#DivU64x32 (
-# IN UINT64 Dividend,
-# IN UINTN Divisor,
-# OUT UINTN *Remainder OPTIONAL
-# )
-#/*++
-
-#Routine Description:
-
-# This routine allows a 64 bit value to be divided with a 32 bit value returns
-# 64bit result and the Remainder.
-#
-#Arguments:
-
-# Dividend - dividend
-# Divisor - divisor
-# Remainder - buffer for remainder
-#
-#Returns:
-
-# Dividend / Divisor
-# Remainder = Dividend mod Divisor
-#
-#N.B. only works for 31bit divisors!!
-#
-#--*/
-#---------------------------------------------------------------------------
-
-ASM_PFX(DivU64x32):
- pushl %ebp
- movl %esp, %ebp
- xorl %edx, %edx # Clear EDX
-
- movl 0xC(%ebp), %eax # Put high 32 bits of 64-bit dividend in EAX
- movl 0x10(%ebp), %ecx # Put 32 bits divisor in ECX
- divl %ecx # Dividend Divisor Quoitent...Remainder
- # 0:EAX / ECX = EAX EDX
-
- pushl %eax # Push quoitent in stack
-
- movl 8(%ebp), %eax # Put low 32 bits of 64-bit dividend in EAX
- divl %ecx # Leave the REMAINDER in EDX as High 32-bit of new dividend
- # Dividend Divisor Quoitent...Remainder
- # EDX:EAX / ECX = EAX EDX
-
- movl 0x14(%ebp), %ecx # Put &REMAINDER to ecx
-
- jecxz Label1 # If ecx == 0, no remainder exist, return with quoitent in EDX directly
- movl %edx, (%ecx) # Put EDX through REMAINDER pointer in ECX
-
-Label1:
- popl %edx # Pop High 32-bit QUOITENT to EDX
- popl %ebp
-
- 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:
+#
+# DivU64x32.c
+#
+#Abstract:
+#
+# 64-bit division function for IA-32
+#
+#--*/
+
+#---------------------------------------------------------------------------
+#include "EfiBind.h" //For ASM_PFX
+#---------------------------------------------------------------------------
+
+#---------------------------------------------------------------------------
+ .386:
+ .code:
+
+#---------------------------------------------------------------------------
+
+.globl ASM_PFX(DivU64x32)
+
+#UINT64
+#DivU64x32 (
+# IN UINT64 Dividend,
+# IN UINTN Divisor,
+# OUT UINTN *Remainder OPTIONAL
+# )
+#/*++
+
+#Routine Description:
+
+# This routine allows a 64 bit value to be divided with a 32 bit value returns
+# 64bit result and the Remainder.
+#
+#Arguments:
+
+# Dividend - dividend
+# Divisor - divisor
+# Remainder - buffer for remainder
+#
+#Returns:
+
+# Dividend / Divisor
+# Remainder = Dividend mod Divisor
+#
+#N.B. only works for 31bit divisors!!
+#
+#--*/
+#---------------------------------------------------------------------------
+
+ASM_PFX(DivU64x32):
+ pushl %ebp
+ movl %esp, %ebp
+ xorl %edx, %edx # Clear EDX
+
+ movl 0xC(%ebp), %eax # Put high 32 bits of 64-bit dividend in EAX
+ movl 0x10(%ebp), %ecx # Put 32 bits divisor in ECX
+ divl %ecx # Dividend Divisor Quoitent...Remainder
+ # 0:EAX / ECX = EAX EDX
+
+ pushl %eax # Push quoitent in stack
+
+ movl 8(%ebp), %eax # Put low 32 bits of 64-bit dividend in EAX
+ divl %ecx # Leave the REMAINDER in EDX as High 32-bit of new dividend
+ # Dividend Divisor Quoitent...Remainder
+ # EDX:EAX / ECX = EAX EDX
+
+ movl 0x14(%ebp), %ecx # Put &REMAINDER to ecx
+
+ jecxz Label1 # If ecx == 0, no remainder exist, return with quoitent in EDX directly
+ movl %edx, (%ecx) # Put EDX through REMAINDER pointer in ECX
+
+Label1:
+ popl %edx # Pop High 32-bit QUOITENT to EDX
+ popl %ebp
+
+ ret
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.S
index f71e498929..34487a3719 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiCopyMem.S
@@ -1,202 +1,202 @@
-#/*++
-#
-#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:
-#
-# EfiCopyMem.c
-#
-#Abstract:
-#
-# This is the code that supports IA32-optimized CopyMem service
-#
-#--*/
-#include "EfiBind.h"
-#---------------------------------------------------------------------------
- .686:
- #.MODEL flat,C
- .mmx:
- .code:
-
-#---------------------------------------------------------------------------
-
-.globl ASM_PFX(EfiCommonLibCopyMem)
-
-#VOID
-#EfiCommonLibCopyMem (
-# IN VOID *Destination,
-# IN VOID *Source,
-# IN UINTN Count
-# )
-#/*++
-#
-#Routine Description:
-#
-# Copy Length bytes from Source to Destination.
-#
-#Arguments:
-#
-# Destination - Target of copy
-#
-# Source - Place to copy from
-#
-# Length - Number of bytes to copy
-#
-#Returns:
-#
-# None
-#
-#--*/
-ASM_PFX(EfiCommonLibCopyMem):
-
- pushl %ebp
- movl %esp, %ebp
- pushl %ecx # reserve space for Scratch Local variable UINT64 MmxSave
- pushl %ecx
- pushl %esi
- pushl %edi
-
- movl 0x10(%ebp), %ecx # Count
- movl 0xC(%ebp), %esi # Source
- movl 8(%ebp), %edi # Destination
-
-##First off, make sure we have no overlap. That is to say,
-## if (Source == Destination) => do nothing
-## if (Source + Count <= Destination) => regular copy
-## if (Destination + Count <= Source) => regular copy
-## otherwise, do a reverse copy
- movl %esi, %eax
- addl %ecx, %eax # Source + Count
- cmpl %edi, %eax
- jle _StartByteCopy
-
- movl %edi, %eax
- addl %ecx, %eax # Dest + Count
- cmpl %esi, %eax
- jle _StartByteCopy
-
- cmpl %edi, %esi
- je _CopyMemDone
- jl _CopyOverlapped # too bad -- overlaps
-
- # Pick up misaligned start bytes to get destination pointer 4-byte aligned
-_StartByteCopy:
- cmpl $0, %ecx
- je _CopyMemDone # Count == 0, all done
- movl %edi, %edx
- andb $3, %dl # check lower 2 bits of address
- testb %dl, %dl
- je _CopyBlocks # already aligned?
-
- # Copy a byte
- movb (%esi), %al # get byte from Source
- movb %al, (%edi) # write byte to Destination
- decl %ecx
- incl %edi
- incl %esi
- jmp _StartByteCopy # back to top of loop
-
-_CopyBlocks:
- # Compute how many 64-byte blocks we can clear
- movl %ecx, %eax # get Count in eax
- shrl $6, %eax # convert to 64-byte count
- shll $6, %eax # convert back to bytes
- subl %eax, %ecx # subtract from the original count
- shrl $6, %eax # and this is how many 64-byte blocks
-
- # If no 64-byte blocks, then skip
- cmpl $0, %eax
- je _CopyRemainingDWords
-
- # Save mm0 to UINT64 MmxSave
- movq %mm0, -8(%ebp)
-
-copymmx:
-
- movq %ds:(%esi), %mm0
- movq %mm0, %ds:(%edi)
- movq %ds:8(%esi), %mm0
- movq %mm0, %ds:8(%edi)
- movq %ds:16(%esi), %mm0
- movq %mm0, %ds:16(%edi)
- movq %ds:24(%esi), %mm0
- movq %mm0, %ds:24(%edi)
- movq %ds:32(%esi), %mm0
- movq %mm0, %ds:32(%edi)
- movq %ds:40(%esi), %mm0
- movq %mm0, %ds:40(%edi)
- movq %ds:48(%esi), %mm0
- movq %mm0, %ds:48(%edi)
- movq %ds:56(%esi), %mm0
- movq %mm0, %ds:56(%edi)
-
- addl $64, %edi
- addl $64, %esi
- decl %eax
- jnz copymmx
-
-# Restore mm0 from MmxSave
- movq -8(%ebp), %mm0
- emms # Exit MMX Instruction
-
- # Copy as many DWORDS as possible
-_CopyRemainingDWords:
- cmpl $4, %ecx
- jb _CopyRemainingBytes
-
- movl (%esi), %eax # get data from Source
- movl %eax, (%edi) # write byte to Destination
- subl $4, %ecx # decrement Count
- addl $4, %esi # advance Source pointer
- addl $4, %edi # advance Destination pointer
- jmp _CopyRemainingDWords # back to top
-
-_CopyRemainingBytes:
- cmpl $0, %ecx
- je _CopyMemDone
- movb (%esi), %al # get byte from Source
- movb %al, (%edi) # write byte to Destination
- decl %ecx
- incl %esi
- incl %edi # advance Destination pointer
- jmp _CopyRemainingBytes # back to top of loop
-
- #
- # We do this block if the source and destination buffers overlap. To
- # handle it, copy starting at the end of the source buffer and work
- # your way back. Since this is the atypical case, this code has not
- # been optimized, and thus simply copies bytes.
- #
-_CopyOverlapped:
-
- # Move the source and destination pointers to the end of the range
- addl %ecx, %esi # Source + Count
- decl %esi
- addl %ecx, %edi # Dest + Count
- decl %edi
-
-_CopyOverlappedLoop:
- cmpl $0, %ecx
- je _CopyMemDone
- movb (%esi), %al # get byte from Source
- movb %al, (%edi) # write byte to Destination
- decl %ecx
- decl %esi
- decl %edi
- jmp _CopyOverlappedLoop # back to top of loop
-
-_CopyMemDone:
-
- popl %edi
- popl %esi
- leave
- ret
-#EfiCommonLibCopyMem ENDP
-
+#/*++
+#
+#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:
+#
+# EfiCopyMem.c
+#
+#Abstract:
+#
+# This is the code that supports IA32-optimized CopyMem service
+#
+#--*/
+#include "EfiBind.h"
+#---------------------------------------------------------------------------
+ .686:
+ #.MODEL flat,C
+ .mmx:
+ .code:
+
+#---------------------------------------------------------------------------
+
+.globl ASM_PFX(EfiCommonLibCopyMem)
+
+#VOID
+#EfiCommonLibCopyMem (
+# IN VOID *Destination,
+# IN VOID *Source,
+# IN UINTN Count
+# )
+#/*++
+#
+#Routine Description:
+#
+# Copy Length bytes from Source to Destination.
+#
+#Arguments:
+#
+# Destination - Target of copy
+#
+# Source - Place to copy from
+#
+# Length - Number of bytes to copy
+#
+#Returns:
+#
+# None
+#
+#--*/
+ASM_PFX(EfiCommonLibCopyMem):
+
+ pushl %ebp
+ movl %esp, %ebp
+ pushl %ecx # reserve space for Scratch Local variable UINT64 MmxSave
+ pushl %ecx
+ pushl %esi
+ pushl %edi
+
+ movl 0x10(%ebp), %ecx # Count
+ movl 0xC(%ebp), %esi # Source
+ movl 8(%ebp), %edi # Destination
+
+##First off, make sure we have no overlap. That is to say,
+## if (Source == Destination) => do nothing
+## if (Source + Count <= Destination) => regular copy
+## if (Destination + Count <= Source) => regular copy
+## otherwise, do a reverse copy
+ movl %esi, %eax
+ addl %ecx, %eax # Source + Count
+ cmpl %edi, %eax
+ jle _StartByteCopy
+
+ movl %edi, %eax
+ addl %ecx, %eax # Dest + Count
+ cmpl %esi, %eax
+ jle _StartByteCopy
+
+ cmpl %edi, %esi
+ je _CopyMemDone
+ jl _CopyOverlapped # too bad -- overlaps
+
+ # Pick up misaligned start bytes to get destination pointer 4-byte aligned
+_StartByteCopy:
+ cmpl $0, %ecx
+ je _CopyMemDone # Count == 0, all done
+ movl %edi, %edx
+ andb $3, %dl # check lower 2 bits of address
+ testb %dl, %dl
+ je _CopyBlocks # already aligned?
+
+ # Copy a byte
+ movb (%esi), %al # get byte from Source
+ movb %al, (%edi) # write byte to Destination
+ decl %ecx
+ incl %edi
+ incl %esi
+ jmp _StartByteCopy # back to top of loop
+
+_CopyBlocks:
+ # Compute how many 64-byte blocks we can clear
+ movl %ecx, %eax # get Count in eax
+ shrl $6, %eax # convert to 64-byte count
+ shll $6, %eax # convert back to bytes
+ subl %eax, %ecx # subtract from the original count
+ shrl $6, %eax # and this is how many 64-byte blocks
+
+ # If no 64-byte blocks, then skip
+ cmpl $0, %eax
+ je _CopyRemainingDWords
+
+ # Save mm0 to UINT64 MmxSave
+ movq %mm0, -8(%ebp)
+
+copymmx:
+
+ movq %ds:(%esi), %mm0
+ movq %mm0, %ds:(%edi)
+ movq %ds:8(%esi), %mm0
+ movq %mm0, %ds:8(%edi)
+ movq %ds:16(%esi), %mm0
+ movq %mm0, %ds:16(%edi)
+ movq %ds:24(%esi), %mm0
+ movq %mm0, %ds:24(%edi)
+ movq %ds:32(%esi), %mm0
+ movq %mm0, %ds:32(%edi)
+ movq %ds:40(%esi), %mm0
+ movq %mm0, %ds:40(%edi)
+ movq %ds:48(%esi), %mm0
+ movq %mm0, %ds:48(%edi)
+ movq %ds:56(%esi), %mm0
+ movq %mm0, %ds:56(%edi)
+
+ addl $64, %edi
+ addl $64, %esi
+ decl %eax
+ jnz copymmx
+
+# Restore mm0 from MmxSave
+ movq -8(%ebp), %mm0
+ emms # Exit MMX Instruction
+
+ # Copy as many DWORDS as possible
+_CopyRemainingDWords:
+ cmpl $4, %ecx
+ jb _CopyRemainingBytes
+
+ movl (%esi), %eax # get data from Source
+ movl %eax, (%edi) # write byte to Destination
+ subl $4, %ecx # decrement Count
+ addl $4, %esi # advance Source pointer
+ addl $4, %edi # advance Destination pointer
+ jmp _CopyRemainingDWords # back to top
+
+_CopyRemainingBytes:
+ cmpl $0, %ecx
+ je _CopyMemDone
+ movb (%esi), %al # get byte from Source
+ movb %al, (%edi) # write byte to Destination
+ decl %ecx
+ incl %esi
+ incl %edi # advance Destination pointer
+ jmp _CopyRemainingBytes # back to top of loop
+
+ #
+ # We do this block if the source and destination buffers overlap. To
+ # handle it, copy starting at the end of the source buffer and work
+ # your way back. Since this is the atypical case, this code has not
+ # been optimized, and thus simply copies bytes.
+ #
+_CopyOverlapped:
+
+ # Move the source and destination pointers to the end of the range
+ addl %ecx, %esi # Source + Count
+ decl %esi
+ addl %ecx, %edi # Dest + Count
+ decl %edi
+
+_CopyOverlappedLoop:
+ cmpl $0, %ecx
+ je _CopyMemDone
+ movb (%esi), %al # get byte from Source
+ movb %al, (%edi) # write byte to Destination
+ decl %ecx
+ decl %esi
+ decl %edi
+ jmp _CopyOverlappedLoop # back to top of loop
+
+_CopyMemDone:
+
+ popl %edi
+ popl %esi
+ leave
+ ret
+#EfiCommonLibCopyMem ENDP
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiSetMem.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiSetMem.S
index 206563438b..d37221f9ab 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiSetMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiSetMem.S
@@ -1,158 +1,158 @@
-#/*++
-#
-#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:
-#
-# EfiSetMem.asm
-#
-#Abstract:
-#
-# This is the code that supports IA32-optimized SetMem service
-#
-#--*/
-#include "EfiBind.h"
-#---------------------------------------------------------------------------
- .686:
- #.MODEL flat,C
- .mmx:
- .code:
-
-#---------------------------------------------------------------------------
-.globl ASM_PFX(EfiCommonLibSetMem)
-
-#VOID
-#EfiCommonLibSetMem (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT8 Value
-# )
-#/*++
-#
-#Input: VOID *Buffer - Pointer to buffer to write
-# UINTN Count - Number of bytes to write
-# UINT8 Value - Value to write
-#
-#Output: None.
-#
-#Saves:
-#
-#Modifies:
-#
-#Description: This function is an optimized set-memory function.
-#
-#Notes: This function tries to set memory 8 bytes at a time. As a result,
-# it first picks up any misaligned bytes, then words, before getting
-# in the main loop that does the 8-byte clears.
-#
-#--*/
-ASM_PFX(EfiCommonLibSetMem):
-
- pushl %ebp
- movl %esp, %ebp
- subl $0x10, %esp # Reserve space for local variable UINT64 QWordValue @[ebp - 10H] & UINT64 MmxSave @[ebp - 18H]
- pushl %ebx
- pushl %edi
-
- movl 0xC(%ebp), %edx # Count
- testl %edx, %edx
- je _SetMemDone
-
- pushl %ebx
-
- movl 8(%ebp), %eax # Buffer
- movb 0x10(%ebp), %bl # Value
- movl %eax, %edi
- movb %bl, %bh
-
- cmpl $256, %edx
- jb _SetRemindingByte
-
- andb $0x7, %al
- testb %al, %al
- je _SetBlock
-
- movl %edi, %eax
- shrl $3, %eax
- incl %eax
- shll $3, %eax
- subl %edi, %eax
- cmpl %edx, %eax
- jnb _SetRemindingByte
-
- subl %eax, %edx
- movl %eax, %ecx
-
- movb %bl, %al
- rep
- stosb
-
-_SetBlock:
- movl %edx, %eax
- shrl $6, %eax
- testl %eax, %eax
- je _SetRemindingByte
-
- shll $6, %eax
- subl %eax, %edx
- shrl $6, %eax
-
- movw %bx, -0x10(%ebp) # QWordValue[0]
- movw %bx, -0x10+2(%ebp) # QWordValue[2]
- movw %bx, -0x10+4(%ebp) # QWordValue[4]
- movw %bx, -0x10+6(%ebp) # QWordValue[6]
-
-
- movq %mm0, -8(%ebp) # Save mm0 to MmxSave
- movq -0x10(%ebp), %mm0 # Load QWordValue to mm0
-
-_B:
- movq %mm0, %ds:(%edi)
- movq %mm0, %ds:8(%edi)
- movq %mm0, %ds:16(%edi)
- movq %mm0, %ds:24(%edi)
- movq %mm0, %ds:32(%edi)
- movq %mm0, %ds:40(%edi)
- movq %mm0, %ds:48(%edi)
- movq %mm0, %ds:56(%edi)
- addl $64, %edi
- decl %eax
- jnz _B
-
-# Restore mm0
- movq -8(%ebp), %mm0 # Restore MmxSave to mm0
- emms # Exit MMX Instruction
-
-_SetRemindingByte:
- movl %edx, %ecx
-
- movl %ebx, %eax
- shll $16, %eax
- movw %bx, %ax
- shrl $2, %ecx
- rep
- stosl
-
- movl %edx, %ecx
- andl $3, %ecx
- rep
- stosb
-
- popl %ebx
-
-_SetMemDone:
-
- popl %edi
- popl %ebx
- leave
- ret
-
-#EfiCommonLibSetMem ENDP
-
+#/*++
+#
+#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:
+#
+# EfiSetMem.asm
+#
+#Abstract:
+#
+# This is the code that supports IA32-optimized SetMem service
+#
+#--*/
+#include "EfiBind.h"
+#---------------------------------------------------------------------------
+ .686:
+ #.MODEL flat,C
+ .mmx:
+ .code:
+
+#---------------------------------------------------------------------------
+.globl ASM_PFX(EfiCommonLibSetMem)
+
+#VOID
+#EfiCommonLibSetMem (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT8 Value
+# )
+#/*++
+#
+#Input: VOID *Buffer - Pointer to buffer to write
+# UINTN Count - Number of bytes to write
+# UINT8 Value - Value to write
+#
+#Output: None.
+#
+#Saves:
+#
+#Modifies:
+#
+#Description: This function is an optimized set-memory function.
+#
+#Notes: This function tries to set memory 8 bytes at a time. As a result,
+# it first picks up any misaligned bytes, then words, before getting
+# in the main loop that does the 8-byte clears.
+#
+#--*/
+ASM_PFX(EfiCommonLibSetMem):
+
+ pushl %ebp
+ movl %esp, %ebp
+ subl $0x10, %esp # Reserve space for local variable UINT64 QWordValue @[ebp - 10H] & UINT64 MmxSave @[ebp - 18H]
+ pushl %ebx
+ pushl %edi
+
+ movl 0xC(%ebp), %edx # Count
+ testl %edx, %edx
+ je _SetMemDone
+
+ pushl %ebx
+
+ movl 8(%ebp), %eax # Buffer
+ movb 0x10(%ebp), %bl # Value
+ movl %eax, %edi
+ movb %bl, %bh
+
+ cmpl $256, %edx
+ jb _SetRemindingByte
+
+ andb $0x7, %al
+ testb %al, %al
+ je _SetBlock
+
+ movl %edi, %eax
+ shrl $3, %eax
+ incl %eax
+ shll $3, %eax
+ subl %edi, %eax
+ cmpl %edx, %eax
+ jnb _SetRemindingByte
+
+ subl %eax, %edx
+ movl %eax, %ecx
+
+ movb %bl, %al
+ rep
+ stosb
+
+_SetBlock:
+ movl %edx, %eax
+ shrl $6, %eax
+ testl %eax, %eax
+ je _SetRemindingByte
+
+ shll $6, %eax
+ subl %eax, %edx
+ shrl $6, %eax
+
+ movw %bx, -0x10(%ebp) # QWordValue[0]
+ movw %bx, -0x10+2(%ebp) # QWordValue[2]
+ movw %bx, -0x10+4(%ebp) # QWordValue[4]
+ movw %bx, -0x10+6(%ebp) # QWordValue[6]
+
+
+ movq %mm0, -8(%ebp) # Save mm0 to MmxSave
+ movq -0x10(%ebp), %mm0 # Load QWordValue to mm0
+
+_B:
+ movq %mm0, %ds:(%edi)
+ movq %mm0, %ds:8(%edi)
+ movq %mm0, %ds:16(%edi)
+ movq %mm0, %ds:24(%edi)
+ movq %mm0, %ds:32(%edi)
+ movq %mm0, %ds:40(%edi)
+ movq %mm0, %ds:48(%edi)
+ movq %mm0, %ds:56(%edi)
+ addl $64, %edi
+ decl %eax
+ jnz _B
+
+# Restore mm0
+ movq -8(%ebp), %mm0 # Restore MmxSave to mm0
+ emms # Exit MMX Instruction
+
+_SetRemindingByte:
+ movl %edx, %ecx
+
+ movl %ebx, %eax
+ shll $16, %eax
+ movw %bx, %ax
+ shrl $2, %ecx
+ rep
+ stosl
+
+ movl %edx, %ecx
+ andl $3, %ecx
+ rep
+ stosb
+
+ popl %ebx
+
+_SetMemDone:
+
+ popl %edi
+ popl %ebx
+ leave
+ ret
+
+#EfiCommonLibSetMem ENDP
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiZeroMem.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiZeroMem.S
index e279335499..c72f12295c 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiZeroMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiZeroMem.S
@@ -1,139 +1,139 @@
-#/*++
-#
-#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:
-#
-# EfiZeroMem.c
-#
-#Abstract:
-#
-# This is the code that supports IA32-optimized ZeroMem service
-#
-#--*/
-#include "EfiBind.h"
-#---------------------------------------------------------------------------
- .686:
- #.MODEL flat,C
- .mmx:
- .code:
-
-#---------------------------------------------------------------------------
-.globl ASM_PFX(EfiCommonLibZeroMem)
-#VOID
-#EfiCommonLibZeroMem (
-# IN VOID *Buffer,
-# IN UINTN Count
-# )
-#/*++
-#
-#Input: VOID *Buffer - Pointer to buffer to clear
-# UINTN Count - Number of bytes to clear
-#
-#Output: None.
-#
-#Saves:
-#
-#Modifies:
-#
-#Description: This function is an optimized zero-memory function.
-#
-#Notes: This function tries to zero memory 8 bytes at a time. As a result,
-# it first picks up any misaligned bytes, then words, before getting
-# in the main loop that does the 8-byte clears.
-#
-#--*/
-ASM_PFX(EfiCommonLibZeroMem):
-# UINT64 MmxSave;
- pushl %ebp
- movl %esp, %ebp
- pushl %ecx # Reserve space for local variable MmxSave
- pushl %ecx
- pushl %edi
-
- movl 0xC(%ebp), %ecx # Count
- movl 8(%ebp), %edi # Buffer
-
- # Pick up misaligned start bytes (get pointer 4-byte aligned)
-_StartByteZero:
- movl %edi, %eax
- andb $3, %al # check lower 2 bits of address
- testb %al, %al
- je _ZeroBlocks # already aligned?
- cmpl $0, %ecx
- je _ZeroMemDone
-
- # Clear the byte memory location
- movb $0, (%edi)
- incl %edi
-
- # Decrement our count
- decl %ecx
- jmp _StartByteZero # back to top of loop
-
-_ZeroBlocks:
-
- # Compute how many 64-byte blocks we can clear
- movl %ecx, %edx
- shrl $6, %ecx # convert to 64-byte count
- shll $6, %ecx # convert back to bytes
- subl %ecx, %edx # subtract from the original count
- shrl $6, %ecx # and this is how many 64-byte blocks
-
- # If no 64-byte blocks, then skip
- cmpl $0, %ecx
- je _ZeroRemaining
-
- # Save mm0
- movq %mm0, -8(%ebp) # Save mm0 to MmxSave
-
- pxor %mm0, %mm0 # Clear mm0
-
-_B:
- movq %mm0, %ds:(%edi)
- movq %mm0, %ds:8(%edi)
- movq %mm0, %ds:16(%edi)
- movq %mm0, %ds:24(%edi)
- movq %mm0, %ds:32(%edi)
- movq %mm0, %ds:40(%edi)
- movq %mm0, %ds:48(%edi)
- movq %mm0, %ds:56(%edi)
-
- addl $64, %edi
- decl %ecx
- jnz _B
-
-# Restore mm0
- movq -8(%ebp), %mm0 # Restore mm0 from MmxSave
- emms # Exit MMX Instruction
-
-_ZeroRemaining:
- # Zero out as many DWORDS as possible
- movl %edx, %ecx
- shrl $2, %ecx
- xorl %eax, %eax
-
- rep
- stosl
-
- # Zero out remaining as bytes
- movl %edx, %ecx
- andl $03, %ecx
-
- rep
- stosb
-
-_ZeroMemDone:
-
- popl %edi
- leave
- ret
-#EfiCommonLibZeroMem ENDP
-
+#/*++
+#
+#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:
+#
+# EfiZeroMem.c
+#
+#Abstract:
+#
+# This is the code that supports IA32-optimized ZeroMem service
+#
+#--*/
+#include "EfiBind.h"
+#---------------------------------------------------------------------------
+ .686:
+ #.MODEL flat,C
+ .mmx:
+ .code:
+
+#---------------------------------------------------------------------------
+.globl ASM_PFX(EfiCommonLibZeroMem)
+#VOID
+#EfiCommonLibZeroMem (
+# IN VOID *Buffer,
+# IN UINTN Count
+# )
+#/*++
+#
+#Input: VOID *Buffer - Pointer to buffer to clear
+# UINTN Count - Number of bytes to clear
+#
+#Output: None.
+#
+#Saves:
+#
+#Modifies:
+#
+#Description: This function is an optimized zero-memory function.
+#
+#Notes: This function tries to zero memory 8 bytes at a time. As a result,
+# it first picks up any misaligned bytes, then words, before getting
+# in the main loop that does the 8-byte clears.
+#
+#--*/
+ASM_PFX(EfiCommonLibZeroMem):
+# UINT64 MmxSave;
+ pushl %ebp
+ movl %esp, %ebp
+ pushl %ecx # Reserve space for local variable MmxSave
+ pushl %ecx
+ pushl %edi
+
+ movl 0xC(%ebp), %ecx # Count
+ movl 8(%ebp), %edi # Buffer
+
+ # Pick up misaligned start bytes (get pointer 4-byte aligned)
+_StartByteZero:
+ movl %edi, %eax
+ andb $3, %al # check lower 2 bits of address
+ testb %al, %al
+ je _ZeroBlocks # already aligned?
+ cmpl $0, %ecx
+ je _ZeroMemDone
+
+ # Clear the byte memory location
+ movb $0, (%edi)
+ incl %edi
+
+ # Decrement our count
+ decl %ecx
+ jmp _StartByteZero # back to top of loop
+
+_ZeroBlocks:
+
+ # Compute how many 64-byte blocks we can clear
+ movl %ecx, %edx
+ shrl $6, %ecx # convert to 64-byte count
+ shll $6, %ecx # convert back to bytes
+ subl %ecx, %edx # subtract from the original count
+ shrl $6, %ecx # and this is how many 64-byte blocks
+
+ # If no 64-byte blocks, then skip
+ cmpl $0, %ecx
+ je _ZeroRemaining
+
+ # Save mm0
+ movq %mm0, -8(%ebp) # Save mm0 to MmxSave
+
+ pxor %mm0, %mm0 # Clear mm0
+
+_B:
+ movq %mm0, %ds:(%edi)
+ movq %mm0, %ds:8(%edi)
+ movq %mm0, %ds:16(%edi)
+ movq %mm0, %ds:24(%edi)
+ movq %mm0, %ds:32(%edi)
+ movq %mm0, %ds:40(%edi)
+ movq %mm0, %ds:48(%edi)
+ movq %mm0, %ds:56(%edi)
+
+ addl $64, %edi
+ decl %ecx
+ jnz _B
+
+# Restore mm0
+ movq -8(%ebp), %mm0 # Restore mm0 from MmxSave
+ emms # Exit MMX Instruction
+
+_ZeroRemaining:
+ # Zero out as many DWORDS as possible
+ movl %edx, %ecx
+ shrl $2, %ecx
+ xorl %eax, %eax
+
+ rep
+ stosl
+
+ # Zero out remaining as bytes
+ movl %edx, %ecx
+ andl $03, %ecx
+
+ rep
+ stosb
+
+_ZeroMemDone:
+
+ popl %edi
+ leave
+ ret
+#EfiCommonLibZeroMem ENDP
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/GetPowerOfTwo.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/GetPowerOfTwo.S
index b3ee8ee126..2f4c3b76e9 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/GetPowerOfTwo.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/GetPowerOfTwo.S
@@ -1,68 +1,68 @@
-#/*++
-#
-#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:
-#
-# GetPowerOfTwo.c
-#
-#Abstract:
-#
-# Calculates the largest integer that is both
-# a power of two and less than Input
-#
-#--*/
-#include "EfiBind.h"
-#---------------------------------------------------------------------------
- .686:
- #.MODEL flat,C
- .code:
-
-#---------------------------------------------------------------------------
-.globl ASM_PFX(GetPowerOfTwo)
-#UINT64
-#GetPowerOfTwo (
-# IN UINT64 Input
-# )
-#/*++
-#
-#Routine Description:
-#
-# Calculates the largest integer that is both
-# a power of two and less than Input
-#
-#Arguments:
-#
-# Input - value to calculate power of two
-#
-#Returns:
-#
-# the largest integer that is both a power of
-# two and less than Input
-#
-#--*/
-ASM_PFX(GetPowerOfTwo):
- xorl %eax, %eax
- movl %eax, %edx
- movl 8(%esp), %ecx # dword ptr Input[4]
- jecxz _F
- bsrl %ecx, %ecx
- btsl %ecx, %edx
- jmp _Exit
-_F:
- movl 4(%esp), %ecx # dword ptr Input[0]
- jecxz _Exit
- bsrl %ecx, %ecx
- btsl %ecx, %eax
-_Exit:
-
- ret
-#GetPowerOfTwo ENDP
-
+#/*++
+#
+#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:
+#
+# GetPowerOfTwo.c
+#
+#Abstract:
+#
+# Calculates the largest integer that is both
+# a power of two and less than Input
+#
+#--*/
+#include "EfiBind.h"
+#---------------------------------------------------------------------------
+ .686:
+ #.MODEL flat,C
+ .code:
+
+#---------------------------------------------------------------------------
+.globl ASM_PFX(GetPowerOfTwo)
+#UINT64
+#GetPowerOfTwo (
+# IN UINT64 Input
+# )
+#/*++
+#
+#Routine Description:
+#
+# Calculates the largest integer that is both
+# a power of two and less than Input
+#
+#Arguments:
+#
+# Input - value to calculate power of two
+#
+#Returns:
+#
+# the largest integer that is both a power of
+# two and less than Input
+#
+#--*/
+ASM_PFX(GetPowerOfTwo):
+ xorl %eax, %eax
+ movl %eax, %edx
+ movl 8(%esp), %ecx # dword ptr Input[4]
+ jecxz _F
+ bsrl %ecx, %ecx
+ btsl %ecx, %edx
+ jmp _Exit
+_F:
+ movl 4(%esp), %ecx # dword ptr Input[0]
+ jecxz _Exit
+ bsrl %ecx, %ecx
+ btsl %ecx, %eax
+_Exit:
+
+ ret
+#GetPowerOfTwo ENDP
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/LShiftU64.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/LShiftU64.S
index 13ac2026f9..c9a978bed1 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/LShiftU64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/LShiftU64.S
@@ -1,82 +1,82 @@
-#/*++
-#
-#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:
-#
-# LShiftU64.c
-#
-#Abstract:
-#
-# 64-bit left shift function for IA-32
-#
-#--*/
-#
-#include "EfiBind.h"
-#---------------------------------------------------------------------------
- .686:
- #.MODEL flat,C
- .code:
-
-#---------------------------------------------------------------------------
-.globl ASM_PFX(LShiftU64)
-#
-#UINT64
-#LShiftU64 (
-# IN UINT64 Operand,
-# IN UINTN Count
-# )
-#/*++
-#
-#Routine Description:
-#
-# This routine allows a 64 bit value to be left shifted by 32 bits and
-# returns the shifted value.
-# Count is valid up 63. (Only Bits 0-5 is valid for Count)
-#
-#Arguments:
-#
-# Operand - Value to be shifted
-# Count - Number of times to shift left.
-#
-#Returns:
-#
-# Value shifted left identified by the Count.
-#
-#--*/
-ASM_PFX(LShiftU64):
-
- movl 4(%esp), %eax # dword ptr Operand[0]
- movl 8(%esp), %edx # dword ptr Operand[4]
-
- #
- # CL is valid from 0 - 31. shld will move EDX:EAX by CL times but EAX is not touched
- # For CL of 32 - 63, it will be shifted 0 - 31 so we will move eax to edx later.
- #
- movl 0xC(%esp), %ecx # Count
- andl $63, %ecx
- shld %cl, %eax, %edx
- shlb %cl, %eax
-
- #
- # Since Count is 32 - 63, eax will have been shifted by 0 - 31
- # If shifted by 32 or more, set lower 32 bits to zero.
- #
- cmpl $32, %ecx
- jc _LShiftU64_Done
-
- movl %eax, %edx
- xorl %eax, %eax
-
-_LShiftU64_Done:
-
- ret
-#LShiftU64 ENDP
-
+#/*++
+#
+#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:
+#
+# LShiftU64.c
+#
+#Abstract:
+#
+# 64-bit left shift function for IA-32
+#
+#--*/
+#
+#include "EfiBind.h"
+#---------------------------------------------------------------------------
+ .686:
+ #.MODEL flat,C
+ .code:
+
+#---------------------------------------------------------------------------
+.globl ASM_PFX(LShiftU64)
+#
+#UINT64
+#LShiftU64 (
+# IN UINT64 Operand,
+# IN UINTN Count
+# )
+#/*++
+#
+#Routine Description:
+#
+# This routine allows a 64 bit value to be left shifted by 32 bits and
+# returns the shifted value.
+# Count is valid up 63. (Only Bits 0-5 is valid for Count)
+#
+#Arguments:
+#
+# Operand - Value to be shifted
+# Count - Number of times to shift left.
+#
+#Returns:
+#
+# Value shifted left identified by the Count.
+#
+#--*/
+ASM_PFX(LShiftU64):
+
+ movl 4(%esp), %eax # dword ptr Operand[0]
+ movl 8(%esp), %edx # dword ptr Operand[4]
+
+ #
+ # CL is valid from 0 - 31. shld will move EDX:EAX by CL times but EAX is not touched
+ # For CL of 32 - 63, it will be shifted 0 - 31 so we will move eax to edx later.
+ #
+ movl 0xC(%esp), %ecx # Count
+ andl $63, %ecx
+ shld %cl, %eax, %edx
+ shlb %cl, %eax
+
+ #
+ # Since Count is 32 - 63, eax will have been shifted by 0 - 31
+ # If shifted by 32 or more, set lower 32 bits to zero.
+ #
+ cmpl $32, %ecx
+ jc _LShiftU64_Done
+
+ movl %eax, %edx
+ xorl %eax, %eax
+
+_LShiftU64_Done:
+
+ ret
+#LShiftU64 ENDP
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Log2.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Log2.S
index 2451fe6700..8a5afb1481 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Log2.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Log2.S
@@ -1,78 +1,78 @@
-#/*++
-#
-#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:
-#
-# Log2.c
-#
-#Abstract:
-#
-# 64-bit integer logarithm function for IA-32
-#
-#--*/
-#
-#---------------------------------------------------------------------------
-#include "EfiBind.h" //For ASM_PFX
-#---------------------------------------------------------------------------
-
-.globl ASM_PFX(Log2)
-
-#UINT8
-#Log2 (
-# IN UINT64 Operand
-# )
-#/*++
-#
-#Routine Description:
-#
-# Calculates and floors logarithms based on 2
-#
-#Arguments:
-#
-# Operand - value to calculate logarithm
-#
-#Returns:
-#
-# The largest integer that is less than or equal
-# to the logarithm of Operand based on 2
-#
-#--*/
-ASM_PFX(Log2):
- movl $64, %ecx
-
- cmpl $0, 4(%esp) # (UINT32 *(&Operand))
- jne _Log2_Wend
- cmpl $0, 8(%esp) # (UINT32 *(&Operand)) + 1
- jne _Log2_Wend
- movb $0xFF, %cl
- jmp _Log2_Done
-
-_Log2_Wend:
- decl %ecx
- cmpl $32, %ecx
- jae _Log2_Higher
- btl %ecx, 4(%esp) # (UINT32 *(&Operand))
- jmp _Log2_Bit
-
-_Log2_Higher:
- movl %ecx, %eax
- subl $32, %eax
- btl %eax, 8(%esp) # (UINT32 *(&Operand)) + 1
-
-_Log2_Bit:
- jc _Log2_Done
- jmp _Log2_Wend
-
-_Log2_Done:
- movb %cl, %al
-
- 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:
+#
+# Log2.c
+#
+#Abstract:
+#
+# 64-bit integer logarithm function for IA-32
+#
+#--*/
+#
+#---------------------------------------------------------------------------
+#include "EfiBind.h" //For ASM_PFX
+#---------------------------------------------------------------------------
+
+.globl ASM_PFX(Log2)
+
+#UINT8
+#Log2 (
+# IN UINT64 Operand
+# )
+#/*++
+#
+#Routine Description:
+#
+# Calculates and floors logarithms based on 2
+#
+#Arguments:
+#
+# Operand - value to calculate logarithm
+#
+#Returns:
+#
+# The largest integer that is less than or equal
+# to the logarithm of Operand based on 2
+#
+#--*/
+ASM_PFX(Log2):
+ movl $64, %ecx
+
+ cmpl $0, 4(%esp) # (UINT32 *(&Operand))
+ jne _Log2_Wend
+ cmpl $0, 8(%esp) # (UINT32 *(&Operand)) + 1
+ jne _Log2_Wend
+ movb $0xFF, %cl
+ jmp _Log2_Done
+
+_Log2_Wend:
+ decl %ecx
+ cmpl $32, %ecx
+ jae _Log2_Higher
+ btl %ecx, 4(%esp) # (UINT32 *(&Operand))
+ jmp _Log2_Bit
+
+_Log2_Higher:
+ movl %ecx, %eax
+ subl $32, %eax
+ btl %eax, 8(%esp) # (UINT32 *(&Operand)) + 1
+
+_Log2_Bit:
+ jc _Log2_Done
+ jmp _Log2_Wend
+
+_Log2_Done:
+ movb %cl, %al
+
+ ret
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/MultU64x32.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/MultU64x32.S
index 1d04247001..fd7f43d6ed 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/MultU64x32.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/MultU64x32.S
@@ -1,71 +1,71 @@
-#/*++
-#
-#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:
-#
-# MultU64x32.c
-#
-#Abstract:
-#
-# 64-bit Multiplication function for IA-32
-#
-#--*/
-#include "EfiBind.h"
-#---------------------------------------------------------------------------
- .686:
- #.MODEL flat,C
- .code:
-
-#---------------------------------------------------------------------------
-.globl ASM_PFX(MultU64x32)
-#UINT64
-#MultU64x32 (
-# IN UINT64 Multiplicand,
-# IN UINTN Multiplier
-# )
-#/*++
-#
-#Routine Description:
-#
-# This routine allows a 64 bit value to be multiplied with a 32 bit
-# value returns 64bit result.
-# No checking if the result is greater than 64bits
-#
-#Arguments:
-#
-# Multiplicand - multiplicand
-# Multiplier - multiplier
-#
-#Returns:
-#
-# Multiplicand * Multiplier
-#
-#--*/
-ASM_PFX(MultU64x32):
-
- movl 4(%esp), %eax # dword ptr Multiplicand[0]
- mull 0xC(%esp) # Multiplier
- pushl %eax
- pushl %edx
- movl 0x10(%esp), %eax # dword ptr Multiplicand[4]
- mull 0x14(%esp) # Multiplier
- #
- # The value in edx stored by second multiplication overflows
- # the output and should be discarded. So here we overwrite it
- # with the edx value of first multiplication.
- #
- popl %edx
- addl %eax, %edx
- popl %eax
-
- ret
-#MultU64x32 ENDP
-
+#/*++
+#
+#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:
+#
+# MultU64x32.c
+#
+#Abstract:
+#
+# 64-bit Multiplication function for IA-32
+#
+#--*/
+#include "EfiBind.h"
+#---------------------------------------------------------------------------
+ .686:
+ #.MODEL flat,C
+ .code:
+
+#---------------------------------------------------------------------------
+.globl ASM_PFX(MultU64x32)
+#UINT64
+#MultU64x32 (
+# IN UINT64 Multiplicand,
+# IN UINTN Multiplier
+# )
+#/*++
+#
+#Routine Description:
+#
+# This routine allows a 64 bit value to be multiplied with a 32 bit
+# value returns 64bit result.
+# No checking if the result is greater than 64bits
+#
+#Arguments:
+#
+# Multiplicand - multiplicand
+# Multiplier - multiplier
+#
+#Returns:
+#
+# Multiplicand * Multiplier
+#
+#--*/
+ASM_PFX(MultU64x32):
+
+ movl 4(%esp), %eax # dword ptr Multiplicand[0]
+ mull 0xC(%esp) # Multiplier
+ pushl %eax
+ pushl %edx
+ movl 0x10(%esp), %eax # dword ptr Multiplicand[4]
+ mull 0x14(%esp) # Multiplier
+ #
+ # The value in edx stored by second multiplication overflows
+ # the output and should be discarded. So here we overwrite it
+ # with the edx value of first multiplication.
+ #
+ popl %edx
+ addl %eax, %edx
+ popl %eax
+
+ ret
+#MultU64x32 ENDP
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.S
index 9d4bd3bee1..6ca752747b 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/Power10U64.S
@@ -1,82 +1,82 @@
-#/*++
-#
-#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:
-#
-# Power10U64.c
-#
-#Abstract:
-#
-# Calculates Operand * 10 ^ Power
-#
-#--*/
-#
-##include "Tiano.h"
-#include "EfiBind.h"
-#---------------------------------------------------------------------------
- .686:
- #.MODEL flat,C
- .code:
-
-.globl ASM_PFX(DivU64x32)
-#---------------------------------------------------------------------------
-#
-#UINT64
-#MultU64x32 (
-# IN UINT64 Multiplicand,
-# IN UINTN Multiplier
-# );
-#
-#UINT64
-#Power10U64 (
-# IN UINT64 Operand,
-# IN UINTN Power
-# )
-#/*++
-#
-#Routine Description:
-#
-# Raise 10 to the power of Power, and multiply the result with Operand
-#
-#Arguments:
-#
-# Operand - multiplicand
-# Power - power
-#
-#Returns:
-#
-# Operand * 10 ^ Power
-#
-#--*/
-ASM_PFX(Power10U64):
- pushl %ebp
- movl %esp, %ebp
- movl 8(%ebp), %eax # dword ptr Operand[0]
- movl 0xC(%ebp), %edx # dword ptr Operand[4]
- movl 0x10(%ebp), %ecx #Power
- jcxz _Power10U64_Done
-
-_Power10U64_Wend:
- pushl $10
- push 0xC(%ebp)
- push 0x8(%ebp)
- call ASM_PFX(MultU64x32)
- addl $0xc, %esp
- movl %eax, 8(%ebp) # dword ptr Operand[0]
- movl %edx, 0xC(%ebp) # dword ptr Operand[4]
- loopl _Power10U64_Wend
-
-_Power10U64_Done:
-
- popl %ebp
- ret
-#Power10U64 ENDP
-
+#/*++
+#
+#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:
+#
+# Power10U64.c
+#
+#Abstract:
+#
+# Calculates Operand * 10 ^ Power
+#
+#--*/
+#
+##include "Tiano.h"
+#include "EfiBind.h"
+#---------------------------------------------------------------------------
+ .686:
+ #.MODEL flat,C
+ .code:
+
+.globl ASM_PFX(DivU64x32)
+#---------------------------------------------------------------------------
+#
+#UINT64
+#MultU64x32 (
+# IN UINT64 Multiplicand,
+# IN UINTN Multiplier
+# );
+#
+#UINT64
+#Power10U64 (
+# IN UINT64 Operand,
+# IN UINTN Power
+# )
+#/*++
+#
+#Routine Description:
+#
+# Raise 10 to the power of Power, and multiply the result with Operand
+#
+#Arguments:
+#
+# Operand - multiplicand
+# Power - power
+#
+#Returns:
+#
+# Operand * 10 ^ Power
+#
+#--*/
+ASM_PFX(Power10U64):
+ pushl %ebp
+ movl %esp, %ebp
+ movl 8(%ebp), %eax # dword ptr Operand[0]
+ movl 0xC(%ebp), %edx # dword ptr Operand[4]
+ movl 0x10(%ebp), %ecx #Power
+ jcxz _Power10U64_Done
+
+_Power10U64_Wend:
+ pushl $10
+ push 0xC(%ebp)
+ push 0x8(%ebp)
+ call ASM_PFX(MultU64x32)
+ addl $0xc, %esp
+ movl %eax, 8(%ebp) # dword ptr Operand[0]
+ movl %edx, 0xC(%ebp) # dword ptr Operand[4]
+ loopl _Power10U64_Wend
+
+_Power10U64_Done:
+
+ popl %ebp
+ ret
+#Power10U64 ENDP
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/RShiftU64.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/RShiftU64.S
index 7eba91298a..ef72231a31 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/RShiftU64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/RShiftU64.S
@@ -1,80 +1,80 @@
-#/*++
-#
-#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:
-#
-# RShiftU64.c
-#
-#Abstract:
-#
-# 64-bit right shift function for IA-32
-#
-#--*/
-#
-##include "Tiano.h"
-#
-#include "EfiBind.h"
-#---------------------------------------------------------------------------
- .686:
- #.MODEL flat,C
- .code:
-
-#---------------------------------------------------------------------------
-.globl ASM_PFX(RShiftU64)
-#UINT64
-#RShiftU64 (
-# IN UINT64 Operand,
-# IN UINTN Count
-# )
-#/*++
-#
-#Routine Description:
-# This routine allows a 64 bit value to be right shifted by 32 bits and returns the
-# shifted value.
-# Count is valid up 63. (Only Bits 0-5 is valid for Count)
-#Arguments:
-# Operand - Value to be shifted
-# Count - Number of times to shift right.
-#
-#Returns:
-#
-# Value shifted right identified by the Count.
-#
-#--*/
-ASM_PFX(RShiftU64):
-
- movl 4(%esp), %eax # dword ptr Operand[0]
- movl 8(%esp), %edx # dword ptr Operand[4]
-
- #
- # CL is valid from 0 - 31. shld will move EDX:EAX by CL times but EDX is not touched
- # For CL of 32 - 63, it will be shifted 0 - 31 so we will move edx to eax later.
- #
- movl 0xC(%esp), %ecx # Count
- andl $63, %ecx
- shrd %cl, %edx, %eax
- shrb %cl, %edx
-
- cmpl $32, %ecx
- jc _RShiftU64_Done
-
- #
- # Since Count is 32 - 63, edx will have been shifted by 0 - 31
- # If shifted by 32 or more, set upper 32 bits to zero.
- #
- movl %edx, %eax
- xorl %edx, %edx
-
-_RShiftU64_Done:
-
- ret
-#RShiftU64 ENDP
-
+#/*++
+#
+#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:
+#
+# RShiftU64.c
+#
+#Abstract:
+#
+# 64-bit right shift function for IA-32
+#
+#--*/
+#
+##include "Tiano.h"
+#
+#include "EfiBind.h"
+#---------------------------------------------------------------------------
+ .686:
+ #.MODEL flat,C
+ .code:
+
+#---------------------------------------------------------------------------
+.globl ASM_PFX(RShiftU64)
+#UINT64
+#RShiftU64 (
+# IN UINT64 Operand,
+# IN UINTN Count
+# )
+#/*++
+#
+#Routine Description:
+# This routine allows a 64 bit value to be right shifted by 32 bits and returns the
+# shifted value.
+# Count is valid up 63. (Only Bits 0-5 is valid for Count)
+#Arguments:
+# Operand - Value to be shifted
+# Count - Number of times to shift right.
+#
+#Returns:
+#
+# Value shifted right identified by the Count.
+#
+#--*/
+ASM_PFX(RShiftU64):
+
+ movl 4(%esp), %eax # dword ptr Operand[0]
+ movl 8(%esp), %edx # dword ptr Operand[4]
+
+ #
+ # CL is valid from 0 - 31. shld will move EDX:EAX by CL times but EDX is not touched
+ # For CL of 32 - 63, it will be shifted 0 - 31 so we will move edx to eax later.
+ #
+ movl 0xC(%esp), %ecx # Count
+ andl $63, %ecx
+ shrd %cl, %edx, %eax
+ shrb %cl, %edx
+
+ cmpl $32, %ecx
+ jc _RShiftU64_Done
+
+ #
+ # Since Count is 32 - 63, edx will have been shifted by 0 - 31
+ # If shifted by 32 or more, set upper 32 bits to zero.
+ #
+ movl %edx, %eax
+ xorl %edx, %edx
+
+_RShiftU64_Done:
+
+ ret
+#RShiftU64 ENDP
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep1.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep1.S
index 79455cfb79..efd184e1f6 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 <EfiBind.h>
-
- .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 <EfiBind.h>
+
+ .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
+
+
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep4.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep4.S
index a9eb76ae67..b2f1724e8b 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 <EfiBind.h>
-
- .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 <EfiBind.h>
+
+ .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
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep4.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep4.S
index 11b9b45ab7..f07c3d55cc 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 <EfiBind.h>
-
- .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 <EfiBind.h>
+
+ .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
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 d878b3b8b2..01eec19f39 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)
+
+.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
+
+
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/ReadIdt.S b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/ReadIdt.S
index 0abd84f902..d9c82eeab5 100644
--- a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/ReadIdt.S
+++ b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/ReadIdt.S
@@ -1,69 +1,69 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ReadIdtBase.Asm
-#
-# Abstract:
-#
-# ReadIdtBase function
-#
-# Notes:
-#
-#include "EfiBind.h"
-#------------------------------------------------------------------------------
-
- .586:
- #.MODEL flat,C
- .code:
-
-.globl ASM_PFX(ReadIdtBasea)
-.globl ASM_PFX(ReadIdtLimita)
-
-#------------------------------------------------------------------------------
-# UINTN
-# ReadIdtBase (
-# void
-# )
-#
-# Abstract: Returns physical address of IDTR
-#
-ASM_PFX(ReadIdtBasea):
- push %ebp
- mov %esp,%ebp
- add $0xfffffff8,%esp
- sidtl 0xfffffffa(%ebp)
- mov 0xfffffffc(%ebp),%eax
- leave
- ret
-
-
-
-#------------------------------------------------------------------------------
-# UINT16
-# ReadIdtLimit (
-# void
-# )
-#
-# Abstract: Returns Limit of IDTR
-#
-ASM_PFX(ReadIdtLimita):
- push %ebp
- mov %esp,%ebp
- add $0xfffffff8,%esp
- sidtl 0xfffffffa(%ebp)
- mov 0xfffffffa(%ebp),%ax
- leave
- 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:
+#
+# ReadIdtBase.Asm
+#
+# Abstract:
+#
+# ReadIdtBase function
+#
+# Notes:
+#
+#include "EfiBind.h"
+#------------------------------------------------------------------------------
+
+ .586:
+ #.MODEL flat,C
+ .code:
+
+.globl ASM_PFX(ReadIdtBasea)
+.globl ASM_PFX(ReadIdtLimita)
+
+#------------------------------------------------------------------------------
+# UINTN
+# ReadIdtBase (
+# void
+# )
+#
+# Abstract: Returns physical address of IDTR
+#
+ASM_PFX(ReadIdtBasea):
+ push %ebp
+ mov %esp,%ebp
+ add $0xfffffff8,%esp
+ sidtl 0xfffffffa(%ebp)
+ mov 0xfffffffc(%ebp),%eax
+ leave
+ ret
+
+
+
+#------------------------------------------------------------------------------
+# UINT16
+# ReadIdtLimit (
+# void
+# )
+#
+# Abstract: Returns Limit of IDTR
+#
+ASM_PFX(ReadIdtLimita):
+ push %ebp
+ mov %esp,%ebp
+ add $0xfffffff8,%esp
+ sidtl 0xfffffffa(%ebp)
+ mov 0xfffffffa(%ebp),%ax
+ leave
+ ret
+
+
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/SupportItpDebug.S b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/SupportItpDebug.S
index 3bd41f343b..b0f134319d 100644
--- a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/SupportItpDebug.S
+++ b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/SupportItpDebug.S
@@ -1,71 +1,71 @@
-#------------------------------------------------------------------------------
-#
-# 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.asm
-#
-# Abstract:
-#
-# This is the code for debuging IA32, to add a break hook at loading every module
-#
-#------------------------------------------------------------------------------
-#include <EfiBind.h>
-
-# PROC:PRIVATE
- .686P:
- .MMX:
- #.MODEL SMALL
- .CODE:
-
-#------------------------------------------------------------------------------
-#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmEfiSetBreakSupport)
-
-# VOID
-# AsmEfiSetBreakSupport (
-# IN UINTN LoadAddr
-# )
-#------------------------------------------------------------------------------
-ASM_PFX(AsmEfiSetBreakSupport):
- push %ebp
- mov %esp, %ebp
- mov 0x8(%ebp),%eax
- 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
- ret
-
-#AsmEfiSetBreakSupport ENDP
-
+#------------------------------------------------------------------------------
+#
+# 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.asm
+#
+# Abstract:
+#
+# This is the code for debuging IA32, to add a break hook at loading every module
+#
+#------------------------------------------------------------------------------
+#include <EfiBind.h>
+
+# PROC:PRIVATE
+ .686P:
+ .MMX:
+ #.MODEL SMALL
+ .CODE:
+
+#------------------------------------------------------------------------------
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmEfiSetBreakSupport)
+
+# VOID
+# AsmEfiSetBreakSupport (
+# IN UINTN LoadAddr
+# )
+#------------------------------------------------------------------------------
+ASM_PFX(AsmEfiSetBreakSupport):
+ push %ebp
+ mov %esp, %ebp
+ mov 0x8(%ebp),%eax
+ 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
+ ret
+
+#AsmEfiSetBreakSupport ENDP
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/WriteIdt.S b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/WriteIdt.S
index 5d072c4921..54af688872 100644
--- a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/WriteIdt.S
+++ b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/WriteIdt.S
@@ -1,50 +1,50 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# WriteIdt.Asm
-#
-# Abstract:
-#
-# SetIdtBase function
-#
-# Notes:
-#
-#include "EfiBind.h"
-#------------------------------------------------------------------------------
-
- .586:
- #.MODEL flat,C
- .code:
-#------------------------------------------------------------------------------
-
-.globl ASM_PFX(SetIdtBase)
-
-# void
-# SetIdtBase (
-# UINT32 IdtBase,
-# UINT16 IdtLimit
-# )
-#
-# Abstract: Set IDTR with the given physical address
-#
-ASM_PFX(SetIdtBase):
- push %ebp
- mov %esp,%ebp
- add $0xfffffff8,%esp
- mov 0x8(%ebp),%eax
- mov 0xc(%ebp),%cx
- mov %eax,0xfffffffc(%ebp)
- mov %cx,0xfffffffa(%ebp)
- lidtl 0xfffffffa(%ebp)
- leave
- 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:
+#
+# WriteIdt.Asm
+#
+# Abstract:
+#
+# SetIdtBase function
+#
+# Notes:
+#
+#include "EfiBind.h"
+#------------------------------------------------------------------------------
+
+ .586:
+ #.MODEL flat,C
+ .code:
+#------------------------------------------------------------------------------
+
+.globl ASM_PFX(SetIdtBase)
+
+# void
+# SetIdtBase (
+# UINT32 IdtBase,
+# UINT16 IdtLimit
+# )
+#
+# Abstract: Set IDTR with the given physical address
+#
+ASM_PFX(SetIdtBase):
+ push %ebp
+ mov %esp,%ebp
+ add $0xfffffff8,%esp
+ mov 0x8(%ebp),%eax
+ mov 0xc(%ebp),%cx
+ mov %eax,0xfffffffc(%ebp)
+ mov %cx,0xfffffffa(%ebp)
+ lidtl 0xfffffffa(%ebp)
+ leave
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/ProcessorAsms.S b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/ProcessorAsms.S
index 2767aef13d..48e4b19c88 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 <EfiBind.h>
-
- .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 <EfiBind.h>
+
+ .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
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/SupportItpDebug.S b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/SupportItpDebug.S
index 4be5b1fb37..4a2d63a7fb 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 <EfiBind.h>
-
- .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 <EfiBind.h>
+
+ .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
+
+
+
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ia32/CpuFlushCache.S b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ia32/CpuFlushCache.S
index bbdfedcca3..8ed1a50cc0 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 <EfiBind.h>
-
- .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 <EfiBind.h>
+
+ .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
diff --git a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/X64/RuntimeLibAsm.S b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/X64/RuntimeLibAsm.S
index 60d0973007..31bc7c5a82 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 <EfiBind.h>
-
-.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 <EfiBind.h>
+
+.text
+
+.global 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/Fx.S b/EdkCompatibilityPkg/Foundation/Library/Thunk16/Ia32/Fx.S
index 111b56ea0d..2262646a5b 100644
--- a/EdkCompatibilityPkg/Foundation/Library/Thunk16/Ia32/Fx.S
+++ b/EdkCompatibilityPkg/Foundation/Library/Thunk16/Ia32/Fx.S
@@ -1,54 +1,54 @@
-#*****************************************************************************
-#*
-#* 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:
-#*
-#* Fx.asm
-#*
-#* Abstract:
-#*
-#* AsmFxRestore and AsmFxSave function
-#*
-#include <EfiBind.h>
-#------------------------------------------------------------------------------
-
- .586P:
- #.MODEL flat,C
- .xmm:
- .code:
-#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmFxSave)
-.globl ASM_PFX(AsmFxRestore)
-#------------------------------------------------------------------------------
-# VOID
-# AsmFxSave (
-# OUT IA32_FX_BUFFER *Buffer
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(AsmFxSave):
- movl 4(%esp), %eax
- fxsave (%eax)
- ret
-#AsmFxSave ENDP
-
-#------------------------------------------------------------------------------
-# VOID
-# AsmFxRestore (
-# IN CONST IA32_FX_BUFFER *Buffer
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(AsmFxRestore):
- movl 4(%esp), %eax
- fxrstor (%eax)
- ret
-#AsmFxRestore ENDP
-
-
+#*****************************************************************************
+#*
+#* 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:
+#*
+#* Fx.asm
+#*
+#* Abstract:
+#*
+#* AsmFxRestore and AsmFxSave function
+#*
+#include <EfiBind.h>
+#------------------------------------------------------------------------------
+
+ .586P:
+ #.MODEL flat,C
+ .xmm:
+ .code:
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmFxSave)
+.globl ASM_PFX(AsmFxRestore)
+#------------------------------------------------------------------------------
+# VOID
+# AsmFxSave (
+# OUT IA32_FX_BUFFER *Buffer
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(AsmFxSave):
+ movl 4(%esp), %eax
+ fxsave (%eax)
+ ret
+#AsmFxSave ENDP
+
+#------------------------------------------------------------------------------
+# VOID
+# AsmFxRestore (
+# IN CONST IA32_FX_BUFFER *Buffer
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(AsmFxRestore):
+ movl 4(%esp), %eax
+ fxrstor (%eax)
+ ret
+#AsmFxRestore ENDP
+
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/Thunk16/Ia32/Thunk16.S b/EdkCompatibilityPkg/Foundation/Library/Thunk16/Ia32/Thunk16.S
index facbe46c93..0f3abbd789 100644
--- a/EdkCompatibilityPkg/Foundation/Library/Thunk16/Ia32/Thunk16.S
+++ b/EdkCompatibilityPkg/Foundation/Library/Thunk16/Ia32/Thunk16.S
@@ -1,183 +1,183 @@
-#*****************************************************************************
-#*
-#* Copyright (c) 2006 - 2007, 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:
-#*
-#* Thunk.asm
-#*
-#* Abstract:
-#*
-#* Real mode thunk
-#*
-#*****************************************************************************
-#include <EfiBind.h>
-
- .686p:
-
-.globl ASM_PFX(mCode16Size)
-
-.data
-mCode16Size: .long _TEXT16SIZE
-
-.data
-
-NullSegSel: .quad 0
-_16BitCsSel:
- .word -1
- .word 0
- .byte 0
- .byte 0x9b
- .byte 0x8f # 16-bit segment
- .byte 0
-_16BitSsSel:
- .word -1
- .word 0
- .byte 0
- .byte 0x93
- .byte 0x8f # 16-bit segment
- .byte 0
-
-_16Gdtr:
- .word _16Gdtr - NullSegSel - 1
- .long NullSegSel
-
-
-.text
-.align 16
-
-
-ASM_PFX(Thunk16):
- push %ebp
- push %ebx
- push %esi
- push %edi
- push %ds
- push %es
- push %fs
- push %gs
- mov 0x24(%esp),%esi
- movzwl 0x32(%esi),%edx
- mov 0xc(%esi),%edi
- add $0xffffffb0,%edi
- push %edi #; save stack offset
- imul $0x10,%edx,%eax #; eax <- edx*16
- add %eax,%edi #; edi <- linear address of 16-bit stack
- push $0xd
- 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
- stos %eax,%es:(%edi)
- movl %cs,%eax
- stos %ax,%es:(%edi)
- mov 0x28(%esp),%eax
- stos %ax,%es:(%edi)
- mov %esp,%eax
- stos %eax,%es:(%edi)
- movl %ss,%eax
- stos %ax,%es:(%edi)
- sgdtl (%edi)
- sidtl 0x24(%esp)
- mov %cr0,%esi
- mov %esi,0x6(%edi) #; save CR0
- and $0x7ffffffe,%esi #; esi <- CR0 to set
- mov %cr4,%eax
- mov %eax,0xa(%edi) #; save CR4
- and $0xcf,%al #; clear PAE & PSE
- mov %edx,%edi #; edi <- 16-bit stack segment
- mov 0x2c(%esp),%edx
- shl $0x10,%edx
- push %edx
- pop %edx
- mov $(_16BitSsSel - NullSegSel),%dx
- lgdtl _16Gdtr #bugbug mismatch.
- .byte 0xea
- .long L_16Bit #bugbug mismatch.
- .word _16BitCsSel - NullSegSel
-L_16Bit:
- .byte 0x66
- movw %dx,%ss
- mov %esi,%cr0
- mov %eax,%cr4
- .byte 0x67
- .byte 0xff
- .byte 0x6c
- .byte 0x24
- .byte 0xfc
-
-L_Lable1:
- movl %ss,%eax
- shl $0x4,%eax
- add %esp,%eax
- lss 0x3c(%esp),%esp
- lidtl 0x24(%esp)
- pop %gs
- pop %fs
- pop %es
- pop %ds
- pop %edi
- pop %esi
- pop %ebx
- pop %ebp
- ret
-
-.code16
-_Code16Addr:
-ASM_PFX(RealMode):
- movw %di, %ss # set up stack
- movl %ebx, %esp
- lidt %cs:_16Idtr - _Code16Addr #lidt fword ptr cs:[_16Idtr - _Code16Addr]
- .byte 0x66
- popaw
- popw %ds
- popw %es
- popw %fs
- popw %gs
- addw $4, %sp # skip EFlags
- testw $1, 14(%esp) #(_STK16 ptr [esp + 8]).ThunkFlags, 1
- jz 1f
- pushf
-1:
- pushw %cs
-# push @FarCallRet - _Code16Addr
- .byte 0x68 # push /iw
- .word FarCallRet - _Code16Addr
- jz 2f
- ljmp *6(%esp) #bugbug
-2:
- ljmp *4(%esp) #bugbug
-FarCallRet:
- pushfl
- pushw %gs
- pushw %fs
- pushw %es
- pushw %ds
- pushal
- cli
- .byte 0x66 # sizeof (IA32_REGS) = 13 * 4 = 52
- lgdt 66(%esp) #lgdt (_STK16 ptr [esp + sizeof (IA32_REGS)]).SavedGdtr
- mov 76(%esp), %eax
- movl %eax, %cr4
- mov 72(%esp), %eax
- movl %eax, %cr0 # restore CR0
- ljmpl *52(%esp)
-#RealMode ENDP
-
-.text
-_16Idtr:
- .word 0x3ff #_16Idtr FWORD (1 SHL 10) - 1
- .byte 0x00
-
-_TEXT16END:
-
-_TEXT16SIZE = _TEXT16END - _Code16Addr
-
-
+#*****************************************************************************
+#*
+#* Copyright (c) 2006 - 2007, 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:
+#*
+#* Thunk.asm
+#*
+#* Abstract:
+#*
+#* Real mode thunk
+#*
+#*****************************************************************************
+#include <EfiBind.h>
+
+ .686p:
+
+.globl ASM_PFX(mCode16Size)
+
+.data
+mCode16Size: .long _TEXT16SIZE
+
+.data
+
+NullSegSel: .quad 0
+_16BitCsSel:
+ .word -1
+ .word 0
+ .byte 0
+ .byte 0x9b
+ .byte 0x8f # 16-bit segment
+ .byte 0
+_16BitSsSel:
+ .word -1
+ .word 0
+ .byte 0
+ .byte 0x93
+ .byte 0x8f # 16-bit segment
+ .byte 0
+
+_16Gdtr:
+ .word _16Gdtr - NullSegSel - 1
+ .long NullSegSel
+
+
+.text
+.align 16
+
+
+ASM_PFX(Thunk16):
+ push %ebp
+ push %ebx
+ push %esi
+ push %edi
+ push %ds
+ push %es
+ push %fs
+ push %gs
+ mov 0x24(%esp),%esi
+ movzwl 0x32(%esi),%edx
+ mov 0xc(%esi),%edi
+ add $0xffffffb0,%edi
+ push %edi #; save stack offset
+ imul $0x10,%edx,%eax #; eax <- edx*16
+ add %eax,%edi #; edi <- linear address of 16-bit stack
+ push $0xd
+ 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
+ stos %eax,%es:(%edi)
+ movl %cs,%eax
+ stos %ax,%es:(%edi)
+ mov 0x28(%esp),%eax
+ stos %ax,%es:(%edi)
+ mov %esp,%eax
+ stos %eax,%es:(%edi)
+ movl %ss,%eax
+ stos %ax,%es:(%edi)
+ sgdtl (%edi)
+ sidtl 0x24(%esp)
+ mov %cr0,%esi
+ mov %esi,0x6(%edi) #; save CR0
+ and $0x7ffffffe,%esi #; esi <- CR0 to set
+ mov %cr4,%eax
+ mov %eax,0xa(%edi) #; save CR4
+ and $0xcf,%al #; clear PAE & PSE
+ mov %edx,%edi #; edi <- 16-bit stack segment
+ mov 0x2c(%esp),%edx
+ shl $0x10,%edx
+ push %edx
+ pop %edx
+ mov $(_16BitSsSel - NullSegSel),%dx
+ lgdtl _16Gdtr #bugbug mismatch.
+ .byte 0xea
+ .long L_16Bit #bugbug mismatch.
+ .word _16BitCsSel - NullSegSel
+L_16Bit:
+ .byte 0x66
+ movw %dx,%ss
+ mov %esi,%cr0
+ mov %eax,%cr4
+ .byte 0x67
+ .byte 0xff
+ .byte 0x6c
+ .byte 0x24
+ .byte 0xfc
+
+L_Lable1:
+ movl %ss,%eax
+ shl $0x4,%eax
+ add %esp,%eax
+ lss 0x3c(%esp),%esp
+ lidtl 0x24(%esp)
+ pop %gs
+ pop %fs
+ pop %es
+ pop %ds
+ pop %edi
+ pop %esi
+ pop %ebx
+ pop %ebp
+ ret
+
+.code16
+_Code16Addr:
+ASM_PFX(RealMode):
+ movw %di, %ss # set up stack
+ movl %ebx, %esp
+ lidt %cs:_16Idtr - _Code16Addr #lidt fword ptr cs:[_16Idtr - _Code16Addr]
+ .byte 0x66
+ popaw
+ popw %ds
+ popw %es
+ popw %fs
+ popw %gs
+ addw $4, %sp # skip EFlags
+ testw $1, 14(%esp) #(_STK16 ptr [esp + 8]).ThunkFlags, 1
+ jz 1f
+ pushf
+1:
+ pushw %cs
+# push @FarCallRet - _Code16Addr
+ .byte 0x68 # push /iw
+ .word FarCallRet - _Code16Addr
+ jz 2f
+ ljmp *6(%esp) #bugbug
+2:
+ ljmp *4(%esp) #bugbug
+FarCallRet:
+ pushfl
+ pushw %gs
+ pushw %fs
+ pushw %es
+ pushw %ds
+ pushal
+ cli
+ .byte 0x66 # sizeof (IA32_REGS) = 13 * 4 = 52
+ lgdt 66(%esp) #lgdt (_STK16 ptr [esp + sizeof (IA32_REGS)]).SavedGdtr
+ mov 76(%esp), %eax
+ movl %eax, %cr4
+ mov 72(%esp), %eax
+ movl %eax, %cr0 # restore CR0
+ ljmpl *52(%esp)
+#RealMode ENDP
+
+.text
+_16Idtr:
+ .word 0x3ff #_16Idtr FWORD (1 SHL 10) - 1
+ .byte 0x00
+
+_TEXT16END:
+
+_TEXT16SIZE = _TEXT16END - _Code16Addr
+
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/Thunk16/X64/Fx.S b/EdkCompatibilityPkg/Foundation/Library/Thunk16/X64/Fx.S
index 7b15f41631..60ecdb7d25 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 <EfiBind.h>
-
-.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 <EfiBind.h>
+
+.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
\ No newline at end of file
diff --git a/EdkCompatibilityPkg/Foundation/Library/Thunk16/X64/Thunk16.S b/EdkCompatibilityPkg/Foundation/Library/Thunk16/X64/Thunk16.S
index a8a94a4fa9..26709e61b0 100644
--- a/EdkCompatibilityPkg/Foundation/Library/Thunk16/X64/Thunk16.S
+++ b/EdkCompatibilityPkg/Foundation/Library/Thunk16/X64/Thunk16.S
@@ -1,56 +1,56 @@
-#*****************************************************************************
-#*
-#* 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:
-#*
-#* Thunk.S
-#*
-#* Abstract:
-#*
-#* Real mode thunk
-#*
-#*****************************************************************************
-#include <EfiBind.h>
-
-
-
- .data
-
-.globl ASM_PFX(mCode16Size)
-
-.data
-mCode16Size: .long _Code16End - _Code16Addr
-
-
-NullSegSel: .quad 0
-_16CsSegSel:
- .word -1
- .word 0
- .byte 0
- .byte 0x9b
- .byte 0x8f #16-bit segment
- .byte 0
-_16DsSegSel:
- .word -1
- .word 0
- .byte 0
- .byte 0x93
- .byte 0x8f #16-bit segment
- .byte 0
-
-_16Gdtr:
- .word _16Gdtr - NullSegSel - 1
- .long NullSegSel
- .code:
-
+#*****************************************************************************
+#*
+#* 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:
+#*
+#* Thunk.S
+#*
+#* Abstract:
+#*
+#* Real mode thunk
+#*
+#*****************************************************************************
+#include <EfiBind.h>
+
+
+
+ .data
+
+.globl ASM_PFX(mCode16Size)
+
+.data
+mCode16Size: .long _Code16End - _Code16Addr
+
+
+NullSegSel: .quad 0
+_16CsSegSel:
+ .word -1
+ .word 0
+ .byte 0
+ .byte 0x9b
+ .byte 0x8f #16-bit segment
+ .byte 0
+_16DsSegSel:
+ .word -1
+ .word 0
+ .byte 0
+ .byte 0x93
+ .byte 0x8f #16-bit segment
+ .byte 0
+
+_16Gdtr:
+ .word _16Gdtr - NullSegSel - 1
+ .long NullSegSel
+ .code:
+
#IA32_REGS STRUC 4t
#_EDI DD ?
#_ESI DD ?
@@ -79,158 +79,158 @@ _16Gdtr:
#SavedCr0 DD ?
#SavedCr4 DD ?
#_STK16 ENDS
-
-ASM_PFX(Thunk16):
- push %rbp
- push %rbx
- push %rsi
- push %rdi
- push %r12
- push %r13
- push %r14
- push %r15
- pushq %fs
- pushq %gs
- movl %ds,%r12d
- movl %es,%r13d
- movl %ss,%r14d
- mov %rsp,%r15
- mov %rcx,%rsi
- movzwq 0x36(%rsi),%r10 #movzx r10, (IA32_REGS ptr [rsi])._SS
- xor %rdi,%rdi
- mov 0xc(%rsi),%edi #mov edi, (IA32_REGS ptr [rsi])._ESP
- add $0xffffffffffffffb0,%rdi #add rdi, - sizeof (IA32_REGS) - sizeof (_STK16)
- push %rdi
- imul $0x10,%r10,%rax
- add %rax,%rdi
- pushq $0xe #push sizeof (IA32_REGS) / 4
- pop %rcx
- rep movsl %ds:(%rsi),%es:(%rdi)
- pop %rbx #rbx <- 16-bit stack offset
- lea Label,%eax #42 <_Thunk16+0x42>
- stos %eax,%es:(%rdi)
- movl %cs,%eax #return segment
- stos %ax,%es:(%rdi)
- mov %edx,%eax #THUNK Flags
- stos %ax,%es:(%rdi)
- sgdt 0x58(%rsp) #save GDTR
- mov 0x58(%rsp),%rax
- stos %rax,%es:(%rdi)
- mov %cr0,%rax #save CR0
- mov %eax,%esi #esi <- CR0 to set
- stos %eax,%es:(%rdi)
- mov %cr4,%rax #save CR4
- stos %eax,%es:(%rdi)
- sidt 0x58(%rsp) #save IDTR
- and $0x7ffffffe,%esi #clear PE & PG bits
- mov %r10,%rdi #rdi <- 16-bit stack segment
- shl $0x10,%r8
- push %r8 #far jmp address
- lea Label_16Bit,%eax
- push %rax
- movw $0x8,0x4(%rsp)
- lgdt _16Gdtr #bugbug: may not match.
- lret
-Label_16Bit:
- .byte 0x66
- movl $0xc0000080,%ecx
- mov %rsi,%cr0 #disable PE & PG
- rdmsr
- and $0xfe,%ah
- wrmsr #clear LME bit
- mov %cr4,%rax
- and $0xcf,%al #clear PAE & PSE
- mov %rax,%cr4
- lret
-
-Label:
- xor %rax,%rax
- movl %ss,%eax
- shl $0x4,%eax
- add %esp,%eax
- mov %r15,%rsp
- lidt 0x58(%rsp)
- movl %r12d,%ds
- movl %r13d,%es
- movl %r14d,%ss
- popq %gs
- popq %fs
- pop %r15
- pop %r14
- pop %r13
- pop %r12
- pop %rdi
- pop %rsi
- pop %rbx
- pop %rbp
- retq
-
-
- .align 0x10
-
-_Code16Addr:
-ASM_PFX(RealMode):
- movl %edi,%ss
- mov %bx,%sp #set up 16-bit stack
- .byte 0x2e
- .byte 0x0f
- .byte 0x01
+
+ASM_PFX(Thunk16):
+ push %rbp
+ push %rbx
+ push %rsi
+ push %rdi
+ push %r12
+ push %r13
+ push %r14
+ push %r15
+ pushq %fs
+ pushq %gs
+ movl %ds,%r12d
+ movl %es,%r13d
+ movl %ss,%r14d
+ mov %rsp,%r15
+ mov %rcx,%rsi
+ movzwq 0x36(%rsi),%r10 #movzx r10, (IA32_REGS ptr [rsi])._SS
+ xor %rdi,%rdi
+ mov 0xc(%rsi),%edi #mov edi, (IA32_REGS ptr [rsi])._ESP
+ add $0xffffffffffffffb0,%rdi #add rdi, - sizeof (IA32_REGS) - sizeof (_STK16)
+ push %rdi
+ imul $0x10,%r10,%rax
+ add %rax,%rdi
+ pushq $0xe #push sizeof (IA32_REGS) / 4
+ pop %rcx
+ rep movsl %ds:(%rsi),%es:(%rdi)
+ pop %rbx #rbx <- 16-bit stack offset
+ lea Label,%eax #42 <_Thunk16+0x42>
+ stos %eax,%es:(%rdi)
+ movl %cs,%eax #return segment
+ stos %ax,%es:(%rdi)
+ mov %edx,%eax #THUNK Flags
+ stos %ax,%es:(%rdi)
+ sgdt 0x58(%rsp) #save GDTR
+ mov 0x58(%rsp),%rax
+ stos %rax,%es:(%rdi)
+ mov %cr0,%rax #save CR0
+ mov %eax,%esi #esi <- CR0 to set
+ stos %eax,%es:(%rdi)
+ mov %cr4,%rax #save CR4
+ stos %eax,%es:(%rdi)
+ sidt 0x58(%rsp) #save IDTR
+ and $0x7ffffffe,%esi #clear PE & PG bits
+ mov %r10,%rdi #rdi <- 16-bit stack segment
+ shl $0x10,%r8
+ push %r8 #far jmp address
+ lea Label_16Bit,%eax
+ push %rax
+ movw $0x8,0x4(%rsp)
+ lgdt _16Gdtr #bugbug: may not match.
+ lret
+Label_16Bit:
+ .byte 0x66
+ movl $0xc0000080,%ecx
+ mov %rsi,%cr0 #disable PE & PG
+ rdmsr
+ and $0xfe,%ah
+ wrmsr #clear LME bit
+ mov %cr4,%rax
+ and $0xcf,%al #clear PAE & PSE
+ mov %rax,%cr4
+ lret
+
+Label:
+ xor %rax,%rax
+ movl %ss,%eax
+ shl $0x4,%eax
+ add %esp,%eax
+ mov %r15,%rsp
+ lidt 0x58(%rsp)
+ movl %r12d,%ds
+ movl %r13d,%es
+ movl %r14d,%ss
+ popq %gs
+ popq %fs
+ pop %r15
+ pop %r14
+ pop %r13
+ pop %r12
+ pop %rdi
+ pop %rsi
+ pop %rbx
+ pop %rbp
+ retq
+
+
+ .align 0x10
+
+_Code16Addr:
+ASM_PFX(RealMode):
+ movl %edi,%ss
+ mov %bx,%sp #set up 16-bit stack
+ .byte 0x2e
+ .byte 0x0f
+ .byte 0x01
.byte 0x1e
.word _16Idtr - _Code16Addr #lidt _16Idtr
- .byte 0x66
+ .byte 0x66
.byte 0x61 #popad
.byte 0x1f #pop ds
- .byte 0x07 #pop es
+ .byte 0x07 #pop es
popq %fs
popq %gs
add $0x8,%esp #skip RFLAGS
- .byte 0x67 #test [esp + 0eh], 1
- .byte 0xf7
- .byte 0x44
- .byte 0x24
- .byte 0x0e
- .byte 0x01
- .byte 0x00
- jz 1f
- pushfq #pushf, actually
-1:
- .byte 0x0e #push cs
- .byte 0x68 #push /iw
- .word FarCallRet - _Code16Addr
- jz 2f
- .byte 0x66
- ljmp *6(%esp)
-2:
- .byte 0x66
- ljmp *4(%esp)
-FarCallRet:
- .byte 0x66
- push $0x00 #push a dword of zero
- .byte 0x66
- pushf #pushfd, actually
- pushq %gs
- pushq %fs
- .byte 0x06 #push %es
- .byte 0x1e #push %ds
- .byte 0x66
- .byte 0x60
- cli
- .byte 0x66 #sizeof (IA32_REGS) = 13 * 4 = 52
- lgdt 64(%esp) #lgdt (_STK16 ptr [esp + sizeof (IA32_REGS)]).SavedGdtr
- .byte 0x66
- mov 76(%esp), %eax
- mov %rax, %cr4
- .byte 0x66
- mov $0xc0000080, %ecx
- rdmsr
- orb $1, %ah
- wrmsr
- .byte 0x66
- mov 72(%esp), %eax
- mov %rax, %cr0 #restore CR0
- .byte 0x66
- ljmpl *52(%esp)
-
-_16Idtr:
- .word 0x3ff #FWORD (1 SHL 10) - 1
- .byte 0x00
+ .byte 0x67 #test [esp + 0eh], 1
+ .byte 0xf7
+ .byte 0x44
+ .byte 0x24
+ .byte 0x0e
+ .byte 0x01
+ .byte 0x00
+ jz 1f
+ pushfq #pushf, actually
+1:
+ .byte 0x0e #push cs
+ .byte 0x68 #push /iw
+ .word FarCallRet - _Code16Addr
+ jz 2f
+ .byte 0x66
+ ljmp *6(%esp)
+2:
+ .byte 0x66
+ ljmp *4(%esp)
+FarCallRet:
+ .byte 0x66
+ push $0x00 #push a dword of zero
+ .byte 0x66
+ pushf #pushfd, actually
+ pushq %gs
+ pushq %fs
+ .byte 0x06 #push %es
+ .byte 0x1e #push %ds
+ .byte 0x66
+ .byte 0x60
+ cli
+ .byte 0x66 #sizeof (IA32_REGS) = 13 * 4 = 52
+ lgdt 64(%esp) #lgdt (_STK16 ptr [esp + sizeof (IA32_REGS)]).SavedGdtr
+ .byte 0x66
+ mov 76(%esp), %eax
+ mov %rax, %cr4
+ .byte 0x66
+ mov $0xc0000080, %ecx
+ rdmsr
+ orb $1, %ah
+ wrmsr
+ .byte 0x66
+ mov 72(%esp), %eax
+ mov %rax, %cr0 #restore CR0
+ .byte 0x66
+ ljmpl *52(%esp)
+
+_16Idtr:
+ .word 0x3ff #FWORD (1 SHL 10) - 1
+ .byte 0x00