diff options
author | Tian, Hot <hot.tian@intel.com> | 2014-01-23 05:27:14 +0000 |
---|---|---|
committer | hhtian <hhtian@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-01-23 05:27:14 +0000 |
commit | 2b53e39435ee46ccf7addaef2a9b32fdfbc30fc0 (patch) | |
tree | 34621bd9212da64d0ba5f806a9d2e24c2d9f224d /EdkCompatibilityPkg | |
parent | 675723cbcaa67746062d8af9af16f5d342ba12f6 (diff) | |
download | edk2-platforms-2b53e39435ee46ccf7addaef2a9b32fdfbc30fc0.tar.xz |
Fix CRLF format
Signed-off-by: Tian, Hot <hot.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15172 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg')
50 files changed, 2644 insertions, 2644 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Strings.uni b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Strings.uni Binary files differindex 976ca3f1f1..71dcbd211d 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Strings.uni +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Strings.uni diff --git a/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/X64/PageFaultHandler.asm b/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/X64/PageFaultHandler.asm index d58a04bcfb..ed0d7f7c28 100644 --- a/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/X64/PageFaultHandler.asm +++ b/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/X64/PageFaultHandler.asm @@ -1,70 +1,70 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR> -; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; PageFaultHandler.asm -; -; Abstract: -; -; Defines page fault handler used to hook SMM IDT -; -;------------------------------------------------------------------------------ - -EXTERN mOriginalHandler:QWORD -EXTERN PageFaultHandler:PROC - - .code - -PageFaultHandlerHook PROC - push rax ; save all volatile registers - push rcx - push rdx - push r8 - push r9 - push r10 - push r11 - - add rsp, -10h * 6 - 8 ; reserve memory to store XMM registers and make address 16-byte alignment - movdqa [rsp], xmm0 - movdqa [rsp + 10h], xmm1 - movdqa [rsp + 20h], xmm2 - movdqa [rsp + 30h], xmm3 - movdqa [rsp + 40h], xmm4 - movdqa [rsp + 50h], xmm5 - - add rsp, -20h - call PageFaultHandler - add rsp, 20h - - movdqa xmm0, [rsp] - movdqa xmm1, [rsp + 10h] - movdqa xmm2, [rsp + 20h] - movdqa xmm3, [rsp + 30h] - movdqa xmm4, [rsp + 40h] - movdqa xmm5, [rsp + 50h] - add rsp, 10h * 6 + 8 - - test al, al ; set ZF flag - pop r11 - pop r10 - pop r9 - pop r8 - pop rdx - pop rcx - pop rax ; restore all volatile registers - jnz @F ; check ZF flag - jmp mOriginalHandler -@@: - add rsp, 08h ; skip error code for PF - iretq -PageFaultHandlerHook ENDP - END +;------------------------------------------------------------------------------
+;
+; Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
+; This program and the accompanying materials
+; are licensed and made available under the terms and conditions of the BSD License
+; which accompanies this distribution. The full text of the license may be found at
+; http://opensource.org/licenses/bsd-license.php
+;
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+;
+; Module Name:
+;
+; PageFaultHandler.asm
+;
+; Abstract:
+;
+; Defines page fault handler used to hook SMM IDT
+;
+;------------------------------------------------------------------------------
+
+EXTERN mOriginalHandler:QWORD
+EXTERN PageFaultHandler:PROC
+
+ .code
+
+PageFaultHandlerHook PROC
+ push rax ; save all volatile registers
+ push rcx
+ push rdx
+ push r8
+ push r9
+ push r10
+ push r11
+
+ add rsp, -10h * 6 - 8 ; reserve memory to store XMM registers and make address 16-byte alignment
+ movdqa [rsp], xmm0
+ movdqa [rsp + 10h], xmm1
+ movdqa [rsp + 20h], xmm2
+ movdqa [rsp + 30h], xmm3
+ movdqa [rsp + 40h], xmm4
+ movdqa [rsp + 50h], xmm5
+
+ add rsp, -20h
+ call PageFaultHandler
+ add rsp, 20h
+
+ movdqa xmm0, [rsp]
+ movdqa xmm1, [rsp + 10h]
+ movdqa xmm2, [rsp + 20h]
+ movdqa xmm3, [rsp + 30h]
+ movdqa xmm4, [rsp + 40h]
+ movdqa xmm5, [rsp + 50h]
+ add rsp, 10h * 6 + 8
+
+ test al, al ; set ZF flag
+ pop r11
+ pop r10
+ pop r9
+ pop r8
+ pop rdx
+ pop rcx
+ pop rax ; restore all volatile registers
+ jnz @F ; check ZF flag
+ jmp mOriginalHandler
+@@:
+ add rsp, 08h ; skip error code for PF
+ iretq
+PageFaultHandlerHook ENDP
+ END
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuIdEx.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuIdEx.asm index b2b343b63f..7ac279290f 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuIdEx.asm +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/CpuIdEx.asm @@ -1,42 +1,42 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; +;------------------------------------------------------------------------------
+;
+; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+; This program and the accompanying materials
+; are licensed and made available under the terms and conditions of the BSD License
+; which accompanies this distribution. The full text of the license may be found at
+; http://opensource.org/licenses/bsd-license.php
+;
+; THE PROGRAM 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: -; +;
+; Abstract:
+;
; AsmCpuidEx function
-; -; Notes: -; -;------------------------------------------------------------------------------ - +;
+; Notes:
+;
+;------------------------------------------------------------------------------
+
.686
.model flat,C
- .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI + .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 -; ) -;------------------------------------------------------------------------------ +; IN UINT32 RegisterInEax,
+; IN UINT32 RegisterInEcx,
+; OUT UINT32 *RegisterOutEax OPTIONAL,
+; OUT UINT32 *RegisterOutEbx OPTIONAL,
+; OUT UINT32 *RegisterOutEcx OPTIONAL,
+; OUT UINT32 *RegisterOutEdx OPTIONAL
+; )
+;------------------------------------------------------------------------------
AsmCpuidEx PROC USES ebx
push ebp
mov ebp, esp
@@ -64,5 +64,5 @@ AsmCpuidEx PROC USES ebx leave
ret
AsmCpuidEx ENDP
- - END +
+ END
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuBreakpoint.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuBreakpoint.S index 150823e979..2ab97c2645 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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> - -.globl ASM_PFX(CpuBreakpoint) -ASM_PFX(CpuBreakpoint): - int $0x3 - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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>
+
+.globl ASM_PFX(CpuBreakpoint)
+ASM_PFX(CpuBreakpoint):
+ int $0x3
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuId.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuId.S index 83f3f9a34c..f981cf3fa0 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ) -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmCpuid) -ASM_PFX(AsmCpuid): - push %rbx - mov %ecx, %eax - push %rax # save Index on stack - push %rdx - cpuid - test %r9, %r9 - jz L1 - mov %ecx, (%r9) -L1: - pop %rcx - jrcxz L2 - mov %eax, (%rcx) -L2: - mov %r8, %rcx - jrcxz L3 - mov %ebx, (%rcx) -L3: - mov 0x38(%rsp), %rcx - jrcxz L4 - mov %edx, (%rcx) -L4: - pop %rax # restore Index to rax as return value - pop %rbx - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# )
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmCpuid)
+ASM_PFX(AsmCpuid):
+ push %rbx
+ mov %ecx, %eax
+ push %rax # save Index on stack
+ push %rdx
+ cpuid
+ test %r9, %r9
+ jz L1
+ mov %ecx, (%r9)
+L1:
+ pop %rcx
+ jrcxz L2
+ mov %eax, (%rcx)
+L2:
+ mov %r8, %rcx
+ jrcxz L3
+ mov %ebx, (%rcx)
+L3:
+ mov 0x38(%rsp), %rcx
+ jrcxz L4
+ mov %edx, (%rcx)
+L4:
+ pop %rax # restore Index to rax as return value
+ pop %rbx
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuIdEx.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuIdEx.S index 4d318f42e1..1bdc18929d 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ) -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmCpuidEx) -ASM_PFX(AsmCpuidEx): - push %rbx - movl %ecx,%eax - movl %edx,%ecx - push %rax - cpuid - mov 0x38(%rsp), %r10 - test %r10, %r10 - jz L1 - mov %ecx,(%r10) -L1: - mov %r8, %rcx - jrcxz L2 - movl %eax,(%rcx) -L2: - mov %r9, %rcx - jrcxz L3 - mov %ebx, (%rcx) -L3: - mov 0x40(%rsp), %rcx - jrcxz L4 - mov %edx, (%rcx) -L4: - pop %rax - pop %rbx - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# )
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmCpuidEx)
+ASM_PFX(AsmCpuidEx):
+ push %rbx
+ movl %ecx,%eax
+ movl %edx,%ecx
+ push %rax
+ cpuid
+ mov 0x38(%rsp), %r10
+ test %r10, %r10
+ jz L1
+ mov %ecx,(%r10)
+L1:
+ mov %r8, %rcx
+ jrcxz L2
+ movl %eax,(%rcx)
+L2:
+ mov %r9, %rcx
+ jrcxz L3
+ mov %ebx, (%rcx)
+L3:
+ mov 0x40(%rsp), %rcx
+ jrcxz L4
+ mov %edx, (%rcx)
+L4:
+ pop %rax
+ pop %rbx
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisablePaging64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisablePaging64.S index 5093c795a8..a503d393e2 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ - -.globl ASM_PFX(InternalX86DisablePaging64) -ASM_PFX(InternalX86DisablePaging64): - cli - shl $0x20,%rcx - lea (%rip), %eax - mov %eax,%ecx - push %rcx - mov %edx,%ebx - mov %r8d,%esi - mov %r9d,%edi - mov 0x28(%rsp),%eax - lret -L1: - mov %eax,%esp - mov %cr0,%rax - btr $0x1f,%eax - mov %rax,%cr0 - mov $0xc0000080,%ecx - rdmsr - and $0xfe,%ah - wrmsr - mov %cr4,%rax - and $0xdf,%al - mov %rax,%cr4 - push %rdi - push %rsi - callq *%rbx - jmp . - +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+
+.globl ASM_PFX(InternalX86DisablePaging64)
+ASM_PFX(InternalX86DisablePaging64):
+ cli
+ shl $0x20,%rcx
+ lea (%rip), %eax
+ mov %eax,%ecx
+ push %rcx
+ mov %edx,%ebx
+ mov %r8d,%esi
+ mov %r9d,%edi
+ mov 0x28(%rsp),%eax
+ lret
+L1:
+ mov %eax,%esp
+ mov %cr0,%rax
+ btr $0x1f,%eax
+ mov %rax,%cr0
+ mov $0xc0000080,%ecx
+ rdmsr
+ and $0xfe,%ah
+ wrmsr
+ mov %cr4,%rax
+ and $0xdf,%al
+ mov %rax,%cr4
+ push %rdi
+ push %rsi
+ callq *%rbx
+ jmp .
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S index 065e4ff6cd..e68ee4f600 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S @@ -1,36 +1,36 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(EnableDisableInterrupts) -ASM_PFX(EnableDisableInterrupts): - sti - cli - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(EnableDisableInterrupts)
+ASM_PFX(EnableDisableInterrupts):
+ sti
+ cli
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableInterrupts.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableInterrupts.S index 349e8fdf50..acadeffdb1 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(EnableInterrupts) -ASM_PFX(EnableInterrupts): - sti - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(EnableInterrupts)
+ASM_PFX(EnableInterrupts):
+ sti
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnablePaging64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnablePaging64.S index d237142fa9..a7eef143a7 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(InternalX86EnablePaging64) -ASM_PFX(InternalX86EnablePaging64): - cli - pop %rax - callq Base -Base: - addl $(L1-Base),(%rsp) - mov %cr4,%rax - or $0x20,%al - mov %rax,%cr4 - mov $0xc0000080,%ecx - rdmsr - or $0x1,%ah - wrmsr - mov %cr0,%rax - bts $0x1f,%eax - mov %rax,%cr0 - lret -L1: - addr32 mov (%esp),%rbx - addr32 mov 0x8(%esp),%rcx - addr32 mov 0x10(%esp),%rdx - addr32 mov 0x18(%esp),%rsp - add $-0x20,%rsp - callq *%rbx - jmp . +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(InternalX86EnablePaging64)
+ASM_PFX(InternalX86EnablePaging64):
+ cli
+ pop %rax
+ callq Base
+Base:
+ addl $(L1-Base),(%rsp)
+ mov %cr4,%rax
+ or $0x20,%al
+ mov %rax,%cr4
+ mov $0xc0000080,%ecx
+ rdmsr
+ or $0x1,%ah
+ wrmsr
+ mov %cr0,%rax
+ bts $0x1f,%eax
+ mov %rax,%cr0
+ lret
+L1:
+ addr32 mov (%esp),%rbx
+ addr32 mov 0x8(%esp),%rcx
+ addr32 mov 0x10(%esp),%rdx
+ addr32 mov 0x18(%esp),%rsp
+ add $-0x20,%rsp
+ callq *%rbx
+ jmp .
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FlushCacheLine.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FlushCacheLine.S index 47ca501f7b..364b3936c8 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmFlushCacheLine) -ASM_PFX(AsmFlushCacheLine): - clflush (%rdi) - mov %rdi, %rax - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmFlushCacheLine)
+ASM_PFX(AsmFlushCacheLine):
+ clflush (%rdi)
+ mov %rdi, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxRestore.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxRestore.S index ed51c28a13..c805aa57be 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# )# -#------------------------------------------------------------------------------ -.globl ASM_PFX(InternalX86FxRestore) -ASM_PFX(InternalX86FxRestore): - fxrstor (%rcx) - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# )#
+#------------------------------------------------------------------------------
+.globl ASM_PFX(InternalX86FxRestore)
+ASM_PFX(InternalX86FxRestore):
+ fxrstor (%rcx)
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxSave.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxSave.S index d186ef7765..57d754b49a 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(InternalX86FxSave) -ASM_PFX(InternalX86FxSave): - fxsave (%rcx) - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl 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 7064d3ac64..974bf81922 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.S @@ -1,38 +1,38 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(InternalSyncCompareExchange64) -ASM_PFX(InternalSyncCompareExchange64): - mov %rsi, %rax - lock cmpxchg %rdx,(%rdi) - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(InternalSyncCompareExchange64)
+ASM_PFX(InternalSyncCompareExchange64):
+ mov %rsi, %rax
+ lock cmpxchg %rdx,(%rdi)
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedDecrement.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedDecrement.S index ae694f3d83..df4f586dce 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(InternalSyncDecrement) -ASM_PFX(InternalSyncDecrement): - lock decl (%rcx) - mov (%rcx), %eax - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(InternalSyncDecrement)
+ASM_PFX(InternalSyncDecrement):
+ lock decl (%rcx)
+ mov (%rcx), %eax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedIncrement.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedIncrement.S index 7ec372aee4..985f14f992 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(InternalSyncIncrement) -ASM_PFX(InternalSyncIncrement): - lock incl (%rcx) - mov (%rcx), %eax - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(InternalSyncIncrement)
+ASM_PFX(InternalSyncIncrement):
+ lock incl (%rcx)
+ mov (%rcx), %eax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Invd.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Invd.S index c3ddec711b..3ad09581b0 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# )# -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmInvd) -ASM_PFX(AsmInvd): - invd - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# )#
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmInvd)
+ASM_PFX(AsmInvd):
+ invd
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SetJump.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SetJump.S index bd805d923d..6d4d225b43 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SetJump.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SetJump.S @@ -1,54 +1,54 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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> - -.globl ASM_PFX(SetJump) -ASM_PFX(SetJump): - push %rcx - add $0xffffffffffffffe0,%rsp - call ASM_PFX(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) - # save non-volatile fp registers - stmxcsr 0x50(%rcx) - movdqu %xmm6, 0x58(%rcx) - movdqu %xmm7, 0x68(%rcx) - movdqu %xmm8, 0x78(%rcx) - movdqu %xmm9, 0x88(%rcx) - movdqu %xmm10, 0x98(%rcx) - movdqu %xmm11, 0xA8(%rcx) - movdqu %xmm12, 0xB8(%rcx) - movdqu %xmm13, 0xC8(%rcx) - movdqu %xmm14, 0xD8(%rcx) - movdqu %xmm15, 0xE8(%rcx) - xor %rax,%rax - jmpq *%rdx +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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>
+
+.globl ASM_PFX(SetJump)
+ASM_PFX(SetJump):
+ push %rcx
+ add $0xffffffffffffffe0,%rsp
+ call ASM_PFX(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)
+ # save non-volatile fp registers
+ stmxcsr 0x50(%rcx)
+ movdqu %xmm6, 0x58(%rcx)
+ movdqu %xmm7, 0x68(%rcx)
+ movdqu %xmm8, 0x78(%rcx)
+ movdqu %xmm9, 0x88(%rcx)
+ movdqu %xmm10, 0x98(%rcx)
+ movdqu %xmm11, 0xA8(%rcx)
+ movdqu %xmm12, 0xB8(%rcx)
+ movdqu %xmm13, 0xC8(%rcx)
+ movdqu %xmm14, 0xD8(%rcx)
+ movdqu %xmm15, 0xE8(%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 03eb16803f..28ab2a3c24 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# -#------------------------------------------------------------------------------ -.globl 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.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+#
+#------------------------------------------------------------------------------
+.globl ASM_PFX(InternalSwitchStack)
+ASM_PFX(InternalSwitchStack):
+ mov %rcx, %rax
+ mov %rdx, %rcx
+ mov %r8, %rdx
+ lea -0x20(%r9), %rsp
+ call *%rax
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr0.S index 1de001d7c0..046750f58c 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmWriteCr0) -ASM_PFX(AsmWriteCr0): - mov %rcx,%cr0 - mov %rcx,%rax - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmWriteCr0)
+ASM_PFX(AsmWriteCr0):
+ mov %rcx,%cr0
+ mov %rcx,%rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr2.S index 6e98268eed..0ef074ebee 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmWriteCr2) -ASM_PFX(AsmWriteCr2): - mov %rcx,%cr2 - mov %rcx,%rax - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmWriteCr2)
+ASM_PFX(AsmWriteCr2):
+ mov %rcx,%cr2
+ mov %rcx,%rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr3.S index dbcd607189..599b3c13d7 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmWriteCr3) -ASM_PFX(AsmWriteCr3): - mov %rcx,%cr3 - mov %rcx,%rax - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmWriteCr3)
+ASM_PFX(AsmWriteCr3):
+ mov %rcx,%cr3
+ mov %rcx,%rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr4.S index b1b114840b..d45f0ba18b 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmWriteCr4) -ASM_PFX(AsmWriteCr4): - mov %rcx,%cr4 - mov %rcx,%rax - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmWriteCr4)
+ASM_PFX(AsmWriteCr4):
+ mov %rcx,%cr4
+ 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 7211397cc5..9c1ca0d49e 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmWriteDr4) -ASM_PFX(AsmWriteDr4): - mov %rcx, %dr4 - mov %rcx, %rax - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmWriteDr4)
+ASM_PFX(AsmWriteDr4):
+ mov %rcx, %dr4
+ mov %rcx, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr5.S index 52144a2f90..bfe4df55c1 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmWriteDr5) -ASM_PFX(AsmWriteDr5): - mov %rcx, %dr5 - mov %rcx, %rax - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmWriteDr5)
+ASM_PFX(AsmWriteDr5):
+ mov %rcx, %dr5
+ mov %rcx, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr6.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr6.S index b63497f5df..ab3f88fd92 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmWriteDr6) -ASM_PFX(AsmWriteDr6): - mov %rcx, %dr6 - mov %rcx, %rax - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmWriteDr6)
+ASM_PFX(AsmWriteDr6):
+ mov %rcx, %dr6
+ mov %rcx, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr7.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr7.S index 6fbcc02454..7801c88068 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmWriteDr7) -ASM_PFX(AsmWriteDr7): - mov %rcx, %dr7 - mov %rcx, %rax - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmWriteDr7)
+ASM_PFX(AsmWriteDr7):
+ mov %rcx, %dr7
+ mov %rcx, %rax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteGdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteGdtr.S index 0e1f793065..ddbc26fa87 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(InternalX86WriteGdtr) -ASM_PFX(InternalX86WriteGdtr): - lgdt (%rcx) - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(InternalX86WriteGdtr)
+ASM_PFX(InternalX86WriteGdtr):
+ lgdt (%rcx)
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteIdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteIdtr.S index 8642645583..f24d9dc622 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteIdtr.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteIdtr.S @@ -1,35 +1,35 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(InternalX86WriteIdtr) -ASM_PFX(InternalX86WriteIdtr): - lidt (%rcx) - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(InternalX86WriteIdtr)
+ASM_PFX(InternalX86WriteIdtr):
+ lidt (%rcx)
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteLdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteLdtr.S index 36712ced38..b3646a1eb9 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteLdtr.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteLdtr.S @@ -1,35 +1,35 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmWriteLdtr); -ASM_PFX(AsmWriteLdtr): - lldt %cx - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmWriteLdtr);
+ASM_PFX(AsmWriteLdtr):
+ lldt %cx
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm0.S index 6aa9c839e3..8cfccf990c 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmWriteMm0); -ASM_PFX(AsmWriteMm0): - movd %rcx, %xmm0 - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmWriteMm0);
+ASM_PFX(AsmWriteMm0):
+ movd %rcx, %xmm0
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm1.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm1.S index 6697352958..df2a361c99 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmWriteMm1); -ASM_PFX(AsmWriteMm1): - movd %rcx, %mm1 - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmWriteMm1);
+ASM_PFX(AsmWriteMm1):
+ movd %rcx, %mm1
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm2.S index bff859d2d1..eb5871482e 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmWriteMm2) -ASM_PFX(AsmWriteMm2): - movd %rcx, %mm2 - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmWriteMm2)
+ASM_PFX(AsmWriteMm2):
+ movd %rcx, %mm2
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm3.S index 983630802d..3b65a2b40a 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmWriteMm3) -ASM_PFX(AsmWriteMm3): - movd %rcx, %mm3 - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmWriteMm3)
+ASM_PFX(AsmWriteMm3):
+ movd %rcx, %mm3
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm4.S index 0413354a4a..0739589034 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmWriteMm4) -ASM_PFX(AsmWriteMm4): - movd %rcx, %mm4 - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmWriteMm4)
+ASM_PFX(AsmWriteMm4):
+ movd %rcx, %mm4
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm5.S index fd5d6b5e30..24f6657b46 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmWriteMm5) -ASM_PFX(AsmWriteMm5): - movd %rcx, %mm5 - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmWriteMm5)
+ASM_PFX(AsmWriteMm5):
+ movd %rcx, %mm5
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm6.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm6.S index 6ee48fdb74..6b3948fd54 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmWriteMm6) -ASM_PFX(AsmWriteMm6): - movd %rcx, %mm6 - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmWriteMm6)
+ASM_PFX(AsmWriteMm6):
+ movd %rcx, %mm6
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm7.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm7.S index c89d7205f1..e3474407bc 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 -# ); -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmWriteMm7) -ASM_PFX(AsmWriteMm7): - movd %rcx, %mm7 - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+# );
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmWriteMm7)
+ASM_PFX(AsmWriteMm7):
+ movd %rcx, %mm7
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.S index de2141c06a..a94fafe419 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.S @@ -1,39 +1,39 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: -#------------------------------------------------------------------------------ -.globl ASM_PFX(AsmWriteMsr64) -ASM_PFX(AsmWriteMsr64): - mov %rdx, %rax - shr $0x20, %rdx - wrmsr - ret +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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:
+#------------------------------------------------------------------------------
+.globl ASM_PFX(AsmWriteMsr64)
+ASM_PFX(AsmWriteMsr64):
+ mov %rdx, %rax
+ shr $0x20, %rdx
+ wrmsr
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep1.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiCopyMemRep1.S index 310b87fb90..d177dc027c 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: - -.globl ASM_PFX(EfiCommonLibCopyMem) - -#------------------------------------------------------------------------------ -# VOID -# EfiCommonLibCopyMem ( -# OUT VOID *Destination, -# IN VOID *Source, -# IN UINTN Count -# ); -#------------------------------------------------------------------------------ -ASM_PFX(EfiCommonLibCopyMem): - push %rsi - push %rdi - cmp %rcx,%rdx - je CopyMemDone - cmp $0x0,%r8 - je CopyMemDone - mov %rdx,%rsi - mov %rcx,%rdi - lea -1(%r8,%rsi,1),%r9 - cmp %rdi,%rsi - jae CopyBytes - cmp %rdi,%r9 - jb CopyBytes - mov %r9,%rsi - lea -1(%r8,%rdi,1),%rdi - std - -CopyBytes: - mov %r8,%rcx - rep movsb %ds:(%rsi),%es:(%rdi) - cld - -CopyMemDone: - pop %rdi - pop %rsi - retq - - - +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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:
+
+.globl ASM_PFX(EfiCommonLibCopyMem)
+
+#------------------------------------------------------------------------------
+# VOID
+# EfiCommonLibCopyMem (
+# OUT VOID *Destination,
+# IN VOID *Source,
+# IN UINTN Count
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(EfiCommonLibCopyMem):
+ push %rsi
+ push %rdi
+ cmp %rcx,%rdx
+ je CopyMemDone
+ cmp $0x0,%r8
+ je CopyMemDone
+ mov %rdx,%rsi
+ mov %rcx,%rdi
+ lea -1(%r8,%rsi,1),%r9
+ cmp %rdi,%rsi
+ jae CopyBytes
+ cmp %rdi,%r9
+ jb CopyBytes
+ mov %r9,%rsi
+ lea -1(%r8,%rdi,1),%rdi
+ std
+
+CopyBytes:
+ mov %r8,%rcx
+ rep movsb %ds:(%rsi),%es:(%rdi)
+ cld
+
+CopyMemDone:
+ pop %rdi
+ pop %rsi
+ retq
+
+
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep4.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiSetMemRep4.S index 952cf55a29..730426202f 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: - -.globl ASM_PFX(EfiCommonLibCopyMem) - -#------------------------------------------------------------------------------ -# VOID -# EfiCommonLibSetMem ( -# OUT VOID *Buffer, -# IN UINTN Size, -# IN UINT8 Value -# ); -#------------------------------------------------------------------------------ -ASM_PFX(EfiCommonLibSetMem): - push %rdi - cmp $0x0,%rdx - je SetDone - mov %rcx,%rdi - mov %r8b,%al - mov %al,%ah - shrd $0x10,%eax,%ecx - shld $0x10,%ecx,%eax - mov %rdx,%rcx - shr $0x2,%rcx - rep stos %eax,%es:(%rdi) - mov %rdx,%rcx - and $0x3,%rcx - rep stos %al,%es:(%rdi) -SetDone: - pop %rdi - retq +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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:
+
+.globl ASM_PFX(EfiCommonLibCopyMem)
+
+#------------------------------------------------------------------------------
+# VOID
+# EfiCommonLibSetMem (
+# OUT VOID *Buffer,
+# IN UINTN Size,
+# IN UINT8 Value
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(EfiCommonLibSetMem):
+ push %rdi
+ cmp $0x0,%rdx
+ je SetDone
+ mov %rcx,%rdi
+ mov %r8b,%al
+ mov %al,%ah
+ shrd $0x10,%eax,%ecx
+ shld $0x10,%ecx,%eax
+ mov %rdx,%rcx
+ shr $0x2,%rcx
+ rep stos %eax,%es:(%rdi)
+ mov %rdx,%rcx
+ and $0x3,%rcx
+ rep stos %al,%es:(%rdi)
+SetDone:
+ pop %rdi
+ retq
diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep4.S b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/X64/EfiZeroMemRep4.S index b4cfdabf34..b0bd55bc58 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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: - -.globl ASM_PFX(EfiCommonLibZeroMem) -#------------------------------------------------------------------------------ -# VOID -# EfiCommonLibZeroMem ( -# IN VOID *Buffer, -# IN UINTN Size -# ); -#------------------------------------------------------------------------------ -ASM_PFX(EfiCommonLibZeroMem): - push %rdi - xor %rax,%rax - mov %rcx,%rdi - mov %rdx,%rcx - shr $0x2,%rcx - and $0x3,%rdx - rep stos %eax,%es:(%rdi) - mov %rdx,%rcx - rep stos %al,%es:(%rdi) - pop %rdi +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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:
+
+.globl ASM_PFX(EfiCommonLibZeroMem)
+#------------------------------------------------------------------------------
+# VOID
+# EfiCommonLibZeroMem (
+# IN VOID *Buffer,
+# IN UINTN Size
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(EfiCommonLibZeroMem):
+ push %rdi
+ xor %rax,%rax
+ mov %rcx,%rdi
+ mov %rdx,%rcx
+ shr $0x2,%rcx
+ and $0x3,%rdx
+ rep stos %eax,%es:(%rdi)
+ mov %rdx,%rcx
+ rep stos %al,%es:(%rdi)
+ pop %rdi
retq
\ No newline at end of file diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/ProcessorAsms.S b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/ProcessorAsms.S index dc99737ebb..9d0aef34db 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# ProcessorAsms.Asm -# -# -# -#include "EfiBind.h" -#------------------------------------------------------------------------------ - - .686P: - .MMX: - #.MODEL SMALL - .CODE: -#------------------------------------------------------------------------------ - -.globl ASM_PFX(TransferControlSetJump) -.globl ASM_PFX(TransferControlLongJump) -.globl ASM_PFX(SwitchStacks) -.globl ASM_PFX(SwitchIplStacks) - -#define EFI_SUCCESS 0 -#define EFI_WARN_RETURN_FROM_LONG_JUMP 5 - -# -# typedef struct { -# UINT32 ebx; -# UINT32 esi; -# UINT32 edi; -# UINT32 ebp; -# UINT32 esp; -# UINT32 eip; -#} EFI_JUMP_BUFFER; -# - -#typedef -#EFI_STATUS -#(EFIAPI *EFI_PEI_TRANSFER_CONTROL_SET_JUMP) ( -# IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This, -# OUT EFI_JUMP_BUFFER *Context -# ); -# -#Routine Description: -# -# This routine implements the IA32 variant of the SetJump call. Its -# responsibility is to store system state information for a possible -# subsequent LongJump. -# -#Arguments: -# -# Pointer to CPU context save buffer. -# -#Returns: -# -# EFI_SUCCESS -# -ASM_PFX(TransferControlSetJump): - push %ebp - mov %esp,%ebp - mov 0x8(%ebp),%eax - mov 0xc(%ebp),%ecx - mov %ebx,(%ecx) - mov %esi,0x4(%ecx) - mov %edi,0x8(%ecx) - mov 0x0(%ebp),%eax - mov %eax,0xc(%ecx) - lea 0x4(%ebp),%eax - mov %eax,0x10(%ecx) - mov 0x4(%ebp),%eax - mov %eax,0x14(%ecx) - mov $0x0,%eax - leave - ret - -#typedef -#EFI_STATUS -#(EFIAPI *EFI_PEI_TRANSFER_CONTROL_LONG_JUMP) ( -# IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This, -# IN EFI_JUMP_BUFFER *Context -# ); -# -# Routine Description: -# -# This routine implements the IA32 variant of the LongJump call. Its -# responsibility is restore the system state to the Context Buffer and -# pass control back. -# -# Arguments: -# -# Pointer to CPU context save buffer. -# -# Returns: -# -# EFI_WARN_RETURN_FROM_LONG_JUMP -# - -ASM_PFX(TransferControlLongJump): - push %ebp - mov %esp,%ebp - push %ebx - push %esi - push %edi - mov 0x8(%ebp),%eax - mov $0x5,%eax - mov 0xc(%ebp),%ecx - mov (%ecx),%ebx - mov 0x4(%ecx),%esi - mov 0x8(%ecx),%edi - mov 0xc(%ecx),%ebp - mov 0x10(%ecx),%esp - add $0x4,%esp - jmp *0x14(%ecx) - mov $0x5,%eax - pop %edi - pop %esi - pop %ebx - leave - ret - -# -# Routine Description: -# This allows the caller to switch the stack and goes to the new entry point -# -# Arguments: -# EntryPoint - Pointer to the location to enter -# Parameter - Parameter to pass in -# NewStack - New Location of the stack -# NewBsp - New BSP -# -# Returns: -# -# Nothing. Goes to the Entry Point passing in the new parameters -# -#SwitchStacks PROC C \ -# EntryPoint:PTR DWORD, \ -# Parameter:DWORD, \ -# NewStack:PTR DWORD, \ -# NewBsp:PTR DWORD -ASM_PFX(SwitchStacks): - push %ebp - mov %esp,%ebp - push %ebx - mov 0x14(%ebp),%eax - mov 0xc(%ebp),%ebx - mov 0x8(%ebp),%ecx - mov 0x10(%ebp),%eax - mov %eax,%esp - push %ebx - push $0x0 - jmp *%ecx - pop %ebx - leave - ret - - - - -# -# Routine Description: -# This allows the caller to switch the stack and goes to the new entry point -# -# Arguments: -# EntryPoint - Pointer to the location to enter -# Parameter1/Parameter2 - Parameter to pass in -# NewStack - New Location of the stack -# NewBsp - New BSP -# -# Returns: -# -# Nothing. Goes to the Entry Point passing in the new parameters -# -#SwitchIplStacks PROC C \ -# EntryPoint:PTR DWORD, \ -# Parameter1:DWORD, \ -# Parameter2:DWORD, \ -# NewStack:PTR DWORD, \ -# NewBsp:PTR DWORD -ASM_PFX(SwitchIplStacks): - push %ebp - mov %esp,%ebp - push %ebx - mov 0x18(%ebp),%eax - mov 0xc(%ebp),%ebx - mov 0x10(%ebp),%edx - mov 0x8(%ebp),%ecx - mov 0x14(%ebp),%eax - mov %eax,%esp - push %edx - push %ebx - call *%ecx - pop %ebx - leave - ret - -#SwitchIplStacks ENDP - - - +#
+# Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+# ProcessorAsms.Asm
+#
+#
+#
+#include "EfiBind.h"
+#------------------------------------------------------------------------------
+
+ .686P:
+ .MMX:
+ #.MODEL SMALL
+ .CODE:
+#------------------------------------------------------------------------------
+
+.globl ASM_PFX(TransferControlSetJump)
+.globl ASM_PFX(TransferControlLongJump)
+.globl ASM_PFX(SwitchStacks)
+.globl ASM_PFX(SwitchIplStacks)
+
+#define EFI_SUCCESS 0
+#define EFI_WARN_RETURN_FROM_LONG_JUMP 5
+
+#
+# typedef struct {
+# UINT32 ebx;
+# UINT32 esi;
+# UINT32 edi;
+# UINT32 ebp;
+# UINT32 esp;
+# UINT32 eip;
+#} EFI_JUMP_BUFFER;
+#
+
+#typedef
+#EFI_STATUS
+#(EFIAPI *EFI_PEI_TRANSFER_CONTROL_SET_JUMP) (
+# IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This,
+# OUT EFI_JUMP_BUFFER *Context
+# );
+#
+#Routine Description:
+#
+# This routine implements the IA32 variant of the SetJump call. Its
+# responsibility is to store system state information for a possible
+# subsequent LongJump.
+#
+#Arguments:
+#
+# Pointer to CPU context save buffer.
+#
+#Returns:
+#
+# EFI_SUCCESS
+#
+ASM_PFX(TransferControlSetJump):
+ push %ebp
+ mov %esp,%ebp
+ mov 0x8(%ebp),%eax
+ mov 0xc(%ebp),%ecx
+ mov %ebx,(%ecx)
+ mov %esi,0x4(%ecx)
+ mov %edi,0x8(%ecx)
+ mov 0x0(%ebp),%eax
+ mov %eax,0xc(%ecx)
+ lea 0x4(%ebp),%eax
+ mov %eax,0x10(%ecx)
+ mov 0x4(%ebp),%eax
+ mov %eax,0x14(%ecx)
+ mov $0x0,%eax
+ leave
+ ret
+
+#typedef
+#EFI_STATUS
+#(EFIAPI *EFI_PEI_TRANSFER_CONTROL_LONG_JUMP) (
+# IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This,
+# IN EFI_JUMP_BUFFER *Context
+# );
+#
+# Routine Description:
+#
+# This routine implements the IA32 variant of the LongJump call. Its
+# responsibility is restore the system state to the Context Buffer and
+# pass control back.
+#
+# Arguments:
+#
+# Pointer to CPU context save buffer.
+#
+# Returns:
+#
+# EFI_WARN_RETURN_FROM_LONG_JUMP
+#
+
+ASM_PFX(TransferControlLongJump):
+ push %ebp
+ mov %esp,%ebp
+ push %ebx
+ push %esi
+ push %edi
+ mov 0x8(%ebp),%eax
+ mov $0x5,%eax
+ mov 0xc(%ebp),%ecx
+ mov (%ecx),%ebx
+ mov 0x4(%ecx),%esi
+ mov 0x8(%ecx),%edi
+ mov 0xc(%ecx),%ebp
+ mov 0x10(%ecx),%esp
+ add $0x4,%esp
+ jmp *0x14(%ecx)
+ mov $0x5,%eax
+ pop %edi
+ pop %esi
+ pop %ebx
+ leave
+ ret
+
+#
+# Routine Description:
+# This allows the caller to switch the stack and goes to the new entry point
+#
+# Arguments:
+# EntryPoint - Pointer to the location to enter
+# Parameter - Parameter to pass in
+# NewStack - New Location of the stack
+# NewBsp - New BSP
+#
+# Returns:
+#
+# Nothing. Goes to the Entry Point passing in the new parameters
+#
+#SwitchStacks PROC C \
+# EntryPoint:PTR DWORD, \
+# Parameter:DWORD, \
+# NewStack:PTR DWORD, \
+# NewBsp:PTR DWORD
+ASM_PFX(SwitchStacks):
+ push %ebp
+ mov %esp,%ebp
+ push %ebx
+ mov 0x14(%ebp),%eax
+ mov 0xc(%ebp),%ebx
+ mov 0x8(%ebp),%ecx
+ mov 0x10(%ebp),%eax
+ mov %eax,%esp
+ push %ebx
+ push $0x0
+ jmp *%ecx
+ pop %ebx
+ leave
+ ret
+
+
+
+
+#
+# Routine Description:
+# This allows the caller to switch the stack and goes to the new entry point
+#
+# Arguments:
+# EntryPoint - Pointer to the location to enter
+# Parameter1/Parameter2 - Parameter to pass in
+# NewStack - New Location of the stack
+# NewBsp - New BSP
+#
+# Returns:
+#
+# Nothing. Goes to the Entry Point passing in the new parameters
+#
+#SwitchIplStacks PROC C \
+# EntryPoint:PTR DWORD, \
+# Parameter1:DWORD, \
+# Parameter2:DWORD, \
+# NewStack:PTR DWORD, \
+# NewBsp:PTR DWORD
+ASM_PFX(SwitchIplStacks):
+ push %ebp
+ mov %esp,%ebp
+ push %ebx
+ mov 0x18(%ebp),%eax
+ mov 0xc(%ebp),%ebx
+ mov 0x10(%ebp),%edx
+ mov 0x8(%ebp),%ecx
+ mov 0x14(%ebp),%eax
+ mov %eax,%esp
+ push %edx
+ push %ebx
+ call *%ecx
+ pop %ebx
+ leave
+ ret
+
+#SwitchIplStacks ENDP
+
+
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/ProcessorAsms.S b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/ProcessorAsms.S index 6987b4191c..6323c1fc44 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/ProcessorAsms.S +++ b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/ProcessorAsms.S @@ -1,161 +1,161 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 - -.globl ASM_PFX(SwitchStacks) -.globl ASM_PFX(TransferControlSetJump) -.globl ASM_PFX(TransferControlLongJump) - -# -# Routine Description: -# This allows the caller to switch the stack and goes to the new entry point -# -# Arguments: -# EntryPoint - Pointer to the location to enter // rcx -# Parameter - Parameter to pass in // rdx -# NewStack - New Location of the stack // r8 -# NewBsp - New BSP // r9 - not used -# -# Returns: -# Nothing. Goes to the Entry Point passing in the new parameters -# -ASM_PFX(SwitchStacks): - - # Adjust stack for - # 1) leave 4 registers space - # 2) let it 16 bytes aligned after call - sub $0x20,%r8 - and -0x10,%r8w # do not assume 16 bytes aligned - - mov %r8,%rsp - mov %rcx,%r10 - mov %rdx,%rcx - callq *%r10 - - # - # no ret as we have a new stack and we jumped to the new location - # - ret - -#SwitchStacks ENDP - - -.set EFI_SUCCESS, 0 -.set 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) - #; save non-volatile fp registers - stmxcsr 0x60(%rdx) - lea 0x68(%rdx), %rax - movdqu %xmm6, (%rax) - movdqu %xmm7, 0x10(%rax) - movdqu %xmm8, 0x20(%rax) - movdqu %xmm9, 0x30(%rax) - movdqu %xmm10, 0x40(%rax) - movdqu %xmm11, 0x50(%rax) - movdqu %xmm12, 0x60(%rax) - movdqu %xmm13, 0x70(%rax) - movdqu %xmm14, 0x80(%rax) - movdqu %xmm15, 0x90(%rax) - 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 - #; load non-volatile fp registers - ldmxcsr 0x60(%rdx) - lea 0x68(%rdx), %rax - movdqu (%rax), %xmm6 - movdqu 0x10(%rax), %xmm7 - movdqu 0x20(%rax), %xmm8 - movdqu 0x30(%rax), %xmm9 - movdqu 0x40(%rax), %xmm10 - movdqu 0x50(%rax), %xmm11 - movdqu 0x60(%rax), %xmm12 - movdqu 0x70(%rax), %xmm13 - movdqu 0x80(%rax), %xmm14 - movdqu 0x90(%rax), %xmm15 - 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 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+
+.globl ASM_PFX(SwitchStacks)
+.globl ASM_PFX(TransferControlSetJump)
+.globl ASM_PFX(TransferControlLongJump)
+
+#
+# Routine Description:
+# This allows the caller to switch the stack and goes to the new entry point
+#
+# Arguments:
+# EntryPoint - Pointer to the location to enter // rcx
+# Parameter - Parameter to pass in // rdx
+# NewStack - New Location of the stack // r8
+# NewBsp - New BSP // r9 - not used
+#
+# Returns:
+# Nothing. Goes to the Entry Point passing in the new parameters
+#
+ASM_PFX(SwitchStacks):
+
+ # Adjust stack for
+ # 1) leave 4 registers space
+ # 2) let it 16 bytes aligned after call
+ sub $0x20,%r8
+ and -0x10,%r8w # do not assume 16 bytes aligned
+
+ mov %r8,%rsp
+ mov %rcx,%r10
+ mov %rdx,%rcx
+ callq *%r10
+
+ #
+ # no ret as we have a new stack and we jumped to the new location
+ #
+ ret
+
+#SwitchStacks ENDP
+
+
+.set EFI_SUCCESS, 0
+.set 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)
+ #; save non-volatile fp registers
+ stmxcsr 0x60(%rdx)
+ lea 0x68(%rdx), %rax
+ movdqu %xmm6, (%rax)
+ movdqu %xmm7, 0x10(%rax)
+ movdqu %xmm8, 0x20(%rax)
+ movdqu %xmm9, 0x30(%rax)
+ movdqu %xmm10, 0x40(%rax)
+ movdqu %xmm11, 0x50(%rax)
+ movdqu %xmm12, 0x60(%rax)
+ movdqu %xmm13, 0x70(%rax)
+ movdqu %xmm14, 0x80(%rax)
+ movdqu %xmm15, 0x90(%rax)
+ 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
+ #; load non-volatile fp registers
+ ldmxcsr 0x60(%rdx)
+ lea 0x68(%rdx), %rax
+ movdqu (%rax), %xmm6
+ movdqu 0x10(%rax), %xmm7
+ movdqu 0x20(%rax), %xmm8
+ movdqu 0x30(%rax), %xmm9
+ movdqu 0x40(%rax), %xmm10
+ movdqu 0x50(%rax), %xmm11
+ movdqu 0x60(%rax), %xmm12
+ movdqu 0x70(%rax), %xmm13
+ movdqu 0x80(%rax), %xmm14
+ movdqu 0x90(%rax), %xmm15
+ 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 150c78c736..13efef48ad 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 - -.globl ASM_PFX(AsmEfiSetBreakSupport) - -#------------------------------------------------------------------------------ -# VOID -# AsmEfiSetBreakSupport ( -# IN UINTN LoadAddr // rcx -# ) -#------------------------------------------------------------------------------ - -ASM_PFX(AsmEfiSetBreakSupport): - - movw $60000, %dx - outl %eax, %dx - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - nop - ret - - - - +#------------------------------------------------------------------------------
+#
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+
+.globl ASM_PFX(AsmEfiSetBreakSupport)
+
+#------------------------------------------------------------------------------
+# VOID
+# AsmEfiSetBreakSupport (
+# IN UINTN LoadAddr // rcx
+# )
+#------------------------------------------------------------------------------
+
+ASM_PFX(AsmEfiSetBreakSupport):
+
+ movw $60000, %dx
+ outl %eax, %dx
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ ret
+
+
+
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ia32/CpuFlushCache.S b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ia32/CpuFlushCache.S index 265a4ee131..cb66e737d8 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.<BR> -#This program and the accompanying materials -#are licensed and made available under the terms and conditions of the BSD License -#which accompanies this distribution. The full text of the license may be found at -#http://opensource.org/licenses/bsd-license.php - # -#THE PROGRAM 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: - -#--------------------------------------------------------------------------- -.globl ASM_PFX(EfiCpuFlushCache) - -# -#// -#// Cache Flush Routine. -#// -#EFI_STATUS -#EfiCpuFlushCache ( - #IN EFI_PHYSICAL_ADDRESS Start, -# IN UINT64 Length - #) -#/*++ -# -#Routine Description: -# - #Flush cache with specified range. -# -#Arguments: -# - #Start - Start address -# Length - Length in bytes -# -#Returns: -# - #Status code -# - #EFI_SUCCESS - success -# -#--*/ -ASM_PFX(EfiCpuFlushCache): - wbinvd - xorl %eax, %eax - ret +#/*++
+#
+#Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+#This program and the accompanying materials
+#are licensed and made available under the terms and conditions of the BSD License
+#which accompanies this distribution. The full text of the license may be found at
+#http://opensource.org/licenses/bsd-license.php
+ #
+#THE PROGRAM 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:
+
+#---------------------------------------------------------------------------
+.globl ASM_PFX(EfiCpuFlushCache)
+
+#
+#//
+#// Cache Flush Routine.
+#//
+#EFI_STATUS
+#EfiCpuFlushCache (
+ #IN EFI_PHYSICAL_ADDRESS Start,
+# IN UINT64 Length
+ #)
+#/*++
+#
+#Routine Description:
+#
+ #Flush cache with specified range.
+#
+#Arguments:
+#
+ #Start - Start address
+# Length - Length in bytes
+#
+#Returns:
+#
+ #Status code
+#
+ #EFI_SUCCESS - success
+#
+#--*/
+ASM_PFX(EfiCpuFlushCache):
+ wbinvd
+ xorl %eax, %eax
+ ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/X64/RuntimeLibAsm.S b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/X64/RuntimeLibAsm.S index 7533381fff..d3d70012ac 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.<BR> -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM 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 - -.globl 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.<BR>
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM 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
+
+.globl ASM_PFX(EfiCpuFlushCache)
+#------------------------------------------------------------------------------
+#EFI_STATUS
+#EfiCpuFlushCache (
+# IN EFI_PHYSICAL_ADDRESS Start,
+# IN UINT64 Length
+# );
+#------------------------------------------------------------------------------
+
+ASM_PFX(EfiCpuFlushCache):
+ wbinvd
+ mov $0, %rax
+ ret
+
diff --git a/EdkCompatibilityPkg/Foundation/Library/Thunk16/X64/Fx.S b/EdkCompatibilityPkg/Foundation/Library/Thunk16/X64/Fx.S index c0807bc523..20193a63fe 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Thunk16/X64/Fx.S +++ b/EdkCompatibilityPkg/Foundation/Library/Thunk16/X64/Fx.S @@ -1,50 +1,50 @@ -#***************************************************************************** -#* -#* Copyright (c) 2008, Intel Corporation. All rights reserved.<BR> -#* This program and the accompanying materials -#* are licensed and made available under the terms and conditions of the BSD License -#* which accompanies this distribution. The full text of the license may be found at -#* http://opensource.org/licenses/bsd-license.php -#* -#* THE PROGRAM 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> - -.globl ASM_PFX(AsmFxSave) -.globl ASM_PFX(AsmFxRestore) - - .text - -#------------------------------------------------------------------------------ -# VOID -# AsmFxSave ( -# OUT IA32_FX_BUFFER *Buffer -# ); -#------------------------------------------------------------------------------ -ASM_PFX(AsmFxSave): - fxsave (%rcx) - retq - -#------------------------------------------------------------------------------ -# VOID -# AsmFxRestore ( -# IN CONST IA32_FX_BUFFER *Buffer -# ); -#------------------------------------------------------------------------------ -ASM_PFX(AsmFxRestore): - fxrstor (%rcx) - retq - +#*****************************************************************************
+#*
+#* Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+#* This program and the accompanying materials
+#* are licensed and made available under the terms and conditions of the BSD License
+#* which accompanies this distribution. The full text of the license may be found at
+#* http://opensource.org/licenses/bsd-license.php
+#*
+#* THE PROGRAM 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>
+
+.globl ASM_PFX(AsmFxSave)
+.globl ASM_PFX(AsmFxRestore)
+
+ .text
+
+#------------------------------------------------------------------------------
+# VOID
+# AsmFxSave (
+# OUT IA32_FX_BUFFER *Buffer
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(AsmFxSave):
+ fxsave (%rcx)
+ retq
+
+#------------------------------------------------------------------------------
+# VOID
+# AsmFxRestore (
+# IN CONST IA32_FX_BUFFER *Buffer
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(AsmFxRestore):
+ fxrstor (%rcx)
+ retq
+
#------------------------------------------------------------------------------
# UINTN
# AsmGetEflags (
diff --git a/EdkCompatibilityPkg/Sample/Tools/Source/UefiVfrCompile/VfrCompiler.h b/EdkCompatibilityPkg/Sample/Tools/Source/UefiVfrCompile/VfrCompiler.h index bc487f88ba..006f0bd7e8 100644 --- a/EdkCompatibilityPkg/Sample/Tools/Source/UefiVfrCompile/VfrCompiler.h +++ b/EdkCompatibilityPkg/Sample/Tools/Source/UefiVfrCompile/VfrCompiler.h @@ -1,20 +1,20 @@ -/*++ - -Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR> -This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -Module Name: - - VfrCompiler.h - -Abstract: - +/*++
+
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ VfrCompiler.h
+
+Abstract:
+
--*/
#ifndef _VFRCOMPILER_H_
@@ -56,7 +56,7 @@ typedef struct { INT8 PreprocessorOutputFileName[MAX_PATH];
INT8 VfrBaseFileName[MAX_PATH]; // name of input VFR file with no path or extension
INT8 *IncludePaths;
- bool SkipCPreprocessor; + bool SkipCPreprocessor;
INT8 *CPreprocessorOptions;
} OPTIONS;
diff --git a/EdkCompatibilityPkg/Sample/Tools/Source/UefiVfrCompile/VfrSyntax.g b/EdkCompatibilityPkg/Sample/Tools/Source/UefiVfrCompile/VfrSyntax.g index 85060c8e84..f5b7d5d6f9 100644 --- a/EdkCompatibilityPkg/Sample/Tools/Source/UefiVfrCompile/VfrSyntax.g +++ b/EdkCompatibilityPkg/Sample/Tools/Source/UefiVfrCompile/VfrSyntax.g @@ -1,18 +1,18 @@ -/*++ -Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR> -This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -Module Name: - VfrSyntax.g - -Abstract: - +/*++
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+ VfrSyntax.g
+
+Abstract:
+
--*/
#header<<
@@ -156,7 +156,7 @@ VfrParserStart ( #token Inventory("inventory") "inventory"
#token NonNvDataMap("_NON_NV_DATA_MAP") "_NON_NV_DATA_MAP"
#token Struct("struct") "struct"
-#token Boolean("BOOLEAN") "BOOLEAN" +#token Boolean("BOOLEAN") "BOOLEAN"
#token Uint64("UINT64") "UINT64"
#token Uint32("UINT32") "UINT32"
#token Uint16("UINT16") "UINT16"
@@ -198,7 +198,7 @@ VfrParserStart ( #token OptionOnlyFlag("OPTIONS_ONLY") "OPTIONS_ONLY"
#token Class("class") "class"
#token Subclass("subclass") "subclass"
-#token ClassGuid("classguid") "classguid" +#token ClassGuid("classguid") "classguid"
#token TypeDef("typedef") "typedef"
#token Restore("restore") "restore"
#token Save("save") "save"
@@ -254,9 +254,9 @@ VfrParserStart ( //
vfrProgram > [UINT8 Return] :
- << + <<
mParserStatus = 0;
- mConstantOnlyInExpression = FALSE; + mConstantOnlyInExpression = FALSE;
>>
(
vfrPragmaPackDefinition
@@ -267,48 +267,48 @@ vfrProgram > [UINT8 Return] : ;
pragmaPackShowDef :
- L:"show" << mCVfrVarDataTypeDB.Pack (L->getLine(), VFR_PACK_SHOW); >> - ; + L:"show" << mCVfrVarDataTypeDB.Pack (L->getLine(), VFR_PACK_SHOW); >>
+ ;
pragmaPackStackDef :
- << - UINT32 LineNum; - UINT8 PackAction; - INT8 *Identifier = NULL; - UINT32 PackNumber = DEFAULT_PACK_ALIGN; - >> - ( - L1:"push" << LineNum = L1->getLine(); PackAction = VFR_PACK_PUSH; >> - | L2:"pop" << LineNum = L2->getLine(); PackAction = VFR_PACK_POP; >> - ) - { - "," ID:StringIdentifier << Identifier = ID->getText(); >> - } - { - "," N:Number << PackAction |= VFR_PACK_ASSIGN; PackNumber = _STOU32(N->getText()); >> - } - << mCVfrVarDataTypeDB.Pack (LineNum, PackAction, Identifier, PackNumber); >> - ; -
-pragmaPackNumber : - << - UINT32 LineNum; - UINT32 PackNumber = DEFAULT_PACK_ALIGN; - >> - N:Number << LineNum = N->getLine(); PackNumber = _STOU32(N->getText()); >> - << mCVfrVarDataTypeDB.Pack (LineNum, VFR_PACK_ASSIGN, NULL, PackNumber); >> - ; - -vfrPragmaPackDefinition : - "\#pragma" "pack" "\(" - { - pragmaPackShowDef - | pragmaPackStackDef - | pragmaPackNumber - } - "\)" - ; - + <<
+ UINT32 LineNum;
+ UINT8 PackAction;
+ INT8 *Identifier = NULL;
+ UINT32 PackNumber = DEFAULT_PACK_ALIGN;
+ >>
+ (
+ L1:"push" << LineNum = L1->getLine(); PackAction = VFR_PACK_PUSH; >>
+ | L2:"pop" << LineNum = L2->getLine(); PackAction = VFR_PACK_POP; >>
+ )
+ {
+ "," ID:StringIdentifier << Identifier = ID->getText(); >>
+ }
+ {
+ "," N:Number << PackAction |= VFR_PACK_ASSIGN; PackNumber = _STOU32(N->getText()); >>
+ }
+ << mCVfrVarDataTypeDB.Pack (LineNum, PackAction, Identifier, PackNumber); >>
+ ;
+
+pragmaPackNumber :
+ <<
+ UINT32 LineNum;
+ UINT32 PackNumber = DEFAULT_PACK_ALIGN;
+ >>
+ N:Number << LineNum = N->getLine(); PackNumber = _STOU32(N->getText()); >>
+ << mCVfrVarDataTypeDB.Pack (LineNum, VFR_PACK_ASSIGN, NULL, PackNumber); >>
+ ;
+
+vfrPragmaPackDefinition :
+ "\#pragma" "pack" "\("
+ {
+ pragmaPackShowDef
+ | pragmaPackStackDef
+ | pragmaPackNumber
+ }
+ "\)"
+ ;
+
vfrDataStructDefinition :
{ TypeDef } Struct << mCVfrVarDataTypeDB.DeclareDataTypeBegin (); >>
{ NonNvDataMap }
@@ -433,86 +433,86 @@ dataStructFieldUser : // the syntax of GUID definition
//
guidSubDefinition [EFI_GUID &Guid] :
- G4:Number "," G5:Number "," G6:Number "," G7:Number "," G8:Number "," G9:Number "," G10:Number "," G11:Number + G4:Number "," G5:Number "," G6:Number "," G7:Number "," G8:Number "," G9:Number "," G10:Number "," G11:Number
<<
Guid.Data4[0] = _STOU8(G4->getText());
Guid.Data4[1] = _STOU8(G5->getText());
Guid.Data4[2] = _STOU8(G6->getText());
- Guid.Data4[3] = _STOU8(G7->getText()); - Guid.Data4[4] = _STOU8(G8->getText()); - Guid.Data4[5] = _STOU8(G9->getText()); - Guid.Data4[6] = _STOU8(G10->getText()); - Guid.Data4[7] = _STOU8(G11->getText()); + Guid.Data4[3] = _STOU8(G7->getText());
+ Guid.Data4[4] = _STOU8(G8->getText());
+ Guid.Data4[5] = _STOU8(G9->getText());
+ Guid.Data4[6] = _STOU8(G10->getText());
+ Guid.Data4[7] = _STOU8(G11->getText());
>>
;
-guidDefinition [EFI_GUID &Guid] : +guidDefinition [EFI_GUID &Guid] :
OpenBrace
G1:Number "," G2:Number "," G3:Number ","
- << - Guid.Data1 = _STOU32 (G1->getText()); - Guid.Data2 = _STOU16 (G2->getText()); - Guid.Data3 = _STOU16 (G3->getText()); - >> - ( - OpenBrace guidSubDefinition[Guid] CloseBrace - | guidSubDefinition[Guid] - ) + <<
+ Guid.Data1 = _STOU32 (G1->getText());
+ Guid.Data2 = _STOU16 (G2->getText());
+ Guid.Data3 = _STOU16 (G3->getText());
+ >>
+ (
+ OpenBrace guidSubDefinition[Guid] CloseBrace
+ | guidSubDefinition[Guid]
+ )
CloseBrace
- ; - -//***************************************************************************** -// -// the syntax of form set definition -// -vfrFormSetDefinition : + ;
+
+//*****************************************************************************
+//
+// the syntax of form set definition
+//
+vfrFormSetDefinition :
<<
EFI_GUID Guid;
EFI_GUID DefaultClassGuid = EFI_HII_PLATFORM_SETUP_FORMSET_GUID;
EFI_GUID ClassGuids[10];
UINT8 ClassGuidNum = 0;
CIfrFormSet *FSObj = NULL;
- UINT16 C, SC; + UINT16 C, SC;
>>
- L:FormSet - Uuid "=" guidDefinition[Guid] "," - Title "=" "STRING_TOKEN" "\(" S1:Number "\)" "," - Help "=" "STRING_TOKEN" "\(" S2:Number "\)" "," - { - ClassGuid "=" guidDefinition[ClassGuids[ClassGuidNum]] << ++ClassGuidNum; >> - ( - "\|" guidDefinition[ClassGuids[ClassGuidNum]] << ++ClassGuidNum; >> - )* + L:FormSet
+ Uuid "=" guidDefinition[Guid] ","
+ Title "=" "STRING_TOKEN" "\(" S1:Number "\)" ","
+ Help "=" "STRING_TOKEN" "\(" S2:Number "\)" ","
+ {
+ ClassGuid "=" guidDefinition[ClassGuids[ClassGuidNum]] << ++ClassGuidNum; >>
+ (
+ "\|" guidDefinition[ClassGuids[ClassGuidNum]] << ++ClassGuidNum; >>
+ )*
","
- } - << - switch (ClassGuidNum) { - case 0: - FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET)); - FSObj->SetClassGuid(&DefaultClassGuid); - break; - case 1: - FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET)); - FSObj->SetClassGuid(&ClassGuids[0]); - break; - case 2: - FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET) + sizeof(EFI_GUID)); - FSObj->SetClassGuid(&ClassGuids[0]); - FSObj->SetClassGuid(&ClassGuids[1]); - break; - default: - FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET) + 2 * sizeof(EFI_GUID)); - FSObj->SetClassGuid(&ClassGuids[0]); - FSObj->SetClassGuid(&ClassGuids[1]); - FSObj->SetClassGuid(&ClassGuids[2]); - break; - } - - SET_LINE_INFO (*FSObj, L); - FSObj->SetGuid (&Guid); + }
+ <<
+ switch (ClassGuidNum) {
+ case 0:
+ FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET));
+ FSObj->SetClassGuid(&DefaultClassGuid);
+ break;
+ case 1:
+ FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET));
+ FSObj->SetClassGuid(&ClassGuids[0]);
+ break;
+ case 2:
+ FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET) + sizeof(EFI_GUID));
+ FSObj->SetClassGuid(&ClassGuids[0]);
+ FSObj->SetClassGuid(&ClassGuids[1]);
+ break;
+ default:
+ FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET) + 2 * sizeof(EFI_GUID));
+ FSObj->SetClassGuid(&ClassGuids[0]);
+ FSObj->SetClassGuid(&ClassGuids[1]);
+ FSObj->SetClassGuid(&ClassGuids[2]);
+ break;
+ }
+
+ SET_LINE_INFO (*FSObj, L);
+ FSObj->SetGuid (&Guid);
FSObj->SetFormSetTitle (_STOSID(S1->getText()));
FSObj->SetHelp (_STOSID(S2->getText()));
- >> + >>
{
Class "=" classDefinition[C] "," << {CIfrClass CObj; CObj.SetClass(C);} >>
}
@@ -582,14 +582,14 @@ vfrStatementVarStoreLinear : )
{ Key "=" Number "," } // Key is used to assign Varid in Framework VFR but no use in UEFI2.1 VFR
{
- VarId "=" ID:Number "," << - _PCATCH( + VarId "=" ID:Number "," <<
+ _PCATCH(
(INTN)(VarStoreId = _STOU16(ID->getText())) != 0,
- (INTN)TRUE, - ID, - "varid 0 is not allowed." - ); - >> + (INTN)TRUE,
+ ID,
+ "varid 0 is not allowed."
+ );
+ >>
}
Name "=" SN:StringIdentifier ","
Uuid "=" guidDefinition[Guid]
@@ -689,10 +689,10 @@ subclassDefinition[UINT16 & SubClass] : ;
vfrStatementDisableIfFormSet :
- << + <<
CIfrDisableIf DIObj;
- UINT32 ExpOpCount = 0; - >> + UINT32 ExpOpCount = 0;
+ >>
D:DisableIf << DIObj.SetLineNo(D->getLine()); >>
vfrStatementExpression[0, ExpOpCount] ";" << mConstantOnlyInExpression = FALSE; >>
vfrFormSetList
@@ -791,7 +791,7 @@ vfrStorageVarId[EFI_VARSTORE_INFO & Info, INT8 *&QuestVarIdStr] : INT8 *VarStr = NULL;
INT8 *SName = NULL;
INT8 *TName = NULL;
- EFI_IFR_TYPE_VALUE Dummy = {0}; + EFI_IFR_TYPE_VALUE Dummy = {0};
>>
(
SN1:StringIdentifier << SName = SN1->getText(); _STRCAT(&VarIdStr, SN1->getText()); >>
@@ -832,19 +832,19 @@ vfrStorageVarId[EFI_VARSTORE_INFO & Info, INT8 *&QuestVarIdStr] : case EFI_VFR_VARSTORE_BUFFER:
_PCATCH(mCVfrVarDataTypeDB.GetDataFieldInfo (VarStr, $Info.mInfo.mVarOffset, $Info.mVarType, $Info.mVarTotalSize), SN2->getLine());
//_PCATCH(mCVfrDataStorage.BufferVarStoreRequestElementAdd (SName, Info), SN2);
- _PCATCH((EFI_VFR_RETURN_CODE)gCVfrBufferConfig.Register ( - SName, - NULL), - SN2->getLine()); - _PCATCH((EFI_VFR_RETURN_CODE)gCVfrBufferConfig.Write ( - 'a', - SName, - NULL, - $Info.mVarType, - $Info.mInfo.mVarOffset, - $Info.mVarTotalSize, - Dummy), - SN2->getLine()); + _PCATCH((EFI_VFR_RETURN_CODE)gCVfrBufferConfig.Register (
+ SName,
+ NULL),
+ SN2->getLine());
+ _PCATCH((EFI_VFR_RETURN_CODE)gCVfrBufferConfig.Write (
+ 'a',
+ SName,
+ NULL,
+ $Info.mVarType,
+ $Info.mInfo.mVarOffset,
+ $Info.mVarTotalSize,
+ Dummy),
+ SN2->getLine());
break;
case EFI_VFR_VARSTORE_NAME:
default: break;
@@ -863,10 +863,10 @@ vfrQuestionDataFieldName [EFI_QUESTION_ID &QId, UINT32 &Mask, INT8 *&VarIdStr, U OpenBracket I1:Number CloseBracket << _STRCAT(&VarIdStr, "["); _STRCAT(&VarIdStr, I1->getText()); _STRCAT(&VarIdStr, "]"); >>
<< mCVfrQuestionDB.GetQuestionId (NULL, VarIdStr, $QId, $Mask); >>
) <<
- if (mConstantOnlyInExpression) { - _PCATCH(VFR_RETURN_CONSTANT_ONLY, LineNo); - } - >> + if (mConstantOnlyInExpression) {
+ _PCATCH(VFR_RETURN_CONSTANT_ONLY, LineNo);
+ }
+ >>
|
(
SN2:StringIdentifier << _STRCAT (&VarIdStr, SN2->getText()); LineNo = SN2->getLine(); >>
@@ -879,10 +879,10 @@ vfrQuestionDataFieldName [EFI_QUESTION_ID &QId, UINT32 &Mask, INT8 *&VarIdStr, U )*
<< mCVfrQuestionDB.GetQuestionId (NULL, VarIdStr, $QId, $Mask); >>
) <<
- if (mConstantOnlyInExpression) { - _PCATCH(VFR_RETURN_CONSTANT_ONLY, LineNo); - } - >> + if (mConstantOnlyInExpression) {
+ _PCATCH(VFR_RETURN_CONSTANT_ONLY, LineNo);
+ }
+ >>
;
vfrConstantValueField[UINT8 Type] > [EFI_IFR_TYPE_VALUE Value] :
@@ -949,10 +949,10 @@ vfrFormDefinition : ;
vfrStatementRules :
- << + <<
CIfrRule RObj;
- UINT32 ExpOpCount = 0; - >> + UINT32 ExpOpCount = 0;
+ >>
R:Rule << RObj.SetLineNo(R->getLine()); >>
S1:StringIdentifier "," <<
mCVfrRulesDB.RegisterRule (S1->getText());
@@ -977,15 +977,15 @@ vfrStatementDefault : (
vfrStatementValue "," << IsExp = TRUE; DObj.SetScope (1); CIfrEnd EndObj1; EndObj1.SetLineNo(D->getLine()); >>
| "=" vfrConstantValueField[_GET_CURRQEST_DATATYPE()] > [Val] "," <<
- if (gCurrentMinMaxData != NULL && gCurrentMinMaxData->IsNumericOpcode()) { - //check default value is valid for Numeric Opcode - if (Val.u64 < gCurrentMinMaxData->GetMinData(_GET_CURRQEST_DATATYPE()) || Val.u64 > gCurrentMinMaxData->GetMaxData(_GET_CURRQEST_DATATYPE())) { - _PCATCH (VFR_RETURN_INVALID_PARAMETER, D->getLine(), "Numeric default value must be between MinValue and MaxValue."); - } - } + if (gCurrentMinMaxData != NULL && gCurrentMinMaxData->IsNumericOpcode()) {
+ //check default value is valid for Numeric Opcode
+ if (Val.u64 < gCurrentMinMaxData->GetMinData(_GET_CURRQEST_DATATYPE()) || Val.u64 > gCurrentMinMaxData->GetMaxData(_GET_CURRQEST_DATATYPE())) {
+ _PCATCH (VFR_RETURN_INVALID_PARAMETER, D->getLine(), "Numeric default value must be between MinValue and MaxValue.");
+ }
+ }
DObj.SetType (_GET_CURRQEST_DATATYPE());
- DObj.SetValue(Val); - >> + DObj.SetValue(Val);
+ >>
)
{
DefaultStore "=" SN:StringIdentifier "," << _PCATCH(mCVfrDefaultStore.GetDefaultId (SN->getText(), &DefaultId), SN); DObj.SetDefaultId (DefaultId); >>
@@ -999,9 +999,9 @@ vfrStatementDefault : _GET_CURRQEST_VARTINFO(),
VarStoreName,
_GET_CURRQEST_DATATYPE (),
- Val), + Val),
D->getLine()
- ); + );
}
>>
)
@@ -1045,13 +1045,13 @@ flagsField : ;
vfrStatementValue :
- << + <<
CIfrValue VObj;
- UINT32 ExpOpCount = 0; - >> + UINT32 ExpOpCount = 0;
+ >>
V:Value << VObj.SetLineNo(V->getLine()); >>
"=" vfrStatementExpression[0, ExpOpCount]
- << { CIfrEnd EndObj; EndObj.SetLineNo(0); } >> + << { CIfrEnd EndObj; EndObj.SetLineNo(0); } >>
;
vfrStatementSubTitle :
@@ -1095,7 +1095,7 @@ vfrStatementStaticText : <<
if (Flags & EFI_IFR_FLAG_CALLBACK) {
CIfrAction AObj;
- AObj.SetLineNo (T->getLine()); + AObj.SetLineNo (T->getLine());
mCVfrQuestionDB.RegisterQuestion (NULL, NULL, QId);
AObj.SetQuestionId (QId);
AObj.SetPrompt (_STOSID(S2->getText()));
@@ -1287,46 +1287,46 @@ vfrStatementBooleanType : vfrStatementCheckBox :
<<
CIfrCheckBox CBObj;
- EFI_IFR_TYPE_VALUE Val = {0}; - INT8 *VarStoreName = NULL; + EFI_IFR_TYPE_VALUE Val = {0};
+ INT8 *VarStoreName = NULL;
>>
L:CheckBox << CBObj.SetLineNo(L->getLine()); >>
vfrQuestionHeader[CBObj] ","
- { + {
F:FLAGS "=" vfrCheckBoxFlags[CBObj, F->getLine()] ","
- << - _PCATCH(mCVfrDataStorage.GetVarStoreName (_GET_CURRQEST_VARTINFO().mVarStoreId, &VarStoreName), VFR_RETURN_SUCCESS, L, "Failed to retrieve varstore name"); - Val.b = TRUE; - if (CBObj.GetFlags () & 0x01) { - _PCATCH( - mCVfrDefaultStore.BufferVarStoreAltConfigAdd ( - EFI_HII_DEFAULT_CLASS_STANDARD, - _GET_CURRQEST_VARTINFO(), - VarStoreName, - _GET_CURRQEST_DATATYPE (), - Val - ), - VFR_RETURN_SUCCESS, - L, - "No standard default storage found" - ); - } - if (CBObj.GetFlags () & 0x02) { - _PCATCH( - mCVfrDefaultStore.BufferVarStoreAltConfigAdd ( - EFI_HII_DEFAULT_CLASS_MANUFACTURING, - _GET_CURRQEST_VARTINFO(), - VarStoreName, - _GET_CURRQEST_DATATYPE (), - Val - ), - VFR_RETURN_SUCCESS, - L, - "No manufacturing default storage found" - ); - } - >> - } + <<
+ _PCATCH(mCVfrDataStorage.GetVarStoreName (_GET_CURRQEST_VARTINFO().mVarStoreId, &VarStoreName), VFR_RETURN_SUCCESS, L, "Failed to retrieve varstore name");
+ Val.b = TRUE;
+ if (CBObj.GetFlags () & 0x01) {
+ _PCATCH(
+ mCVfrDefaultStore.BufferVarStoreAltConfigAdd (
+ EFI_HII_DEFAULT_CLASS_STANDARD,
+ _GET_CURRQEST_VARTINFO(),
+ VarStoreName,
+ _GET_CURRQEST_DATATYPE (),
+ Val
+ ),
+ VFR_RETURN_SUCCESS,
+ L,
+ "No standard default storage found"
+ );
+ }
+ if (CBObj.GetFlags () & 0x02) {
+ _PCATCH(
+ mCVfrDefaultStore.BufferVarStoreAltConfigAdd (
+ EFI_HII_DEFAULT_CLASS_MANUFACTURING,
+ _GET_CURRQEST_VARTINFO(),
+ VarStoreName,
+ _GET_CURRQEST_DATATYPE (),
+ Val
+ ),
+ VFR_RETURN_SUCCESS,
+ L,
+ "No manufacturing default storage found"
+ );
+ }
+ >>
+ }
{
Key "=" KN:Number "," << AssignQuestionKey (CBObj, KN); >>
}
@@ -1535,25 +1535,25 @@ vfrNumericFlags [CIfrNumeric & NObj, UINT32 LineNum] : <<
UINT8 LFlags = _GET_CURRQEST_DATATYPE() & EFI_IFR_NUMERIC_SIZE;
UINT8 HFlags = 0;
- EFI_VFR_VARSTORE_TYPE VarStoreType = EFI_VFR_VARSTORE_INVALID; + EFI_VFR_VARSTORE_TYPE VarStoreType = EFI_VFR_VARSTORE_INVALID;
>>
numericFlagsField[HFlags, LFlags] ( "\|" numericFlagsField[HFlags, LFlags] )*
- << - //check data type flag - VarStoreType = mCVfrDataStorage.GetVarStoreType (_GET_CURRQEST_VARTINFO().mVarStoreId); - if (VarStoreType == EFI_VFR_VARSTORE_BUFFER || VarStoreType == EFI_VFR_VARSTORE_EFI) { - if (_GET_CURRQEST_DATATYPE() != (LFlags & EFI_IFR_NUMERIC_SIZE)) { - _PCATCH(VFR_RETURN_INVALID_PARAMETER, LineNum, "Numeric Flag is not same to Numeric VarData type"); - } - } else { - // update data type for name/value store - UINT32 DataTypeSize; - _GET_CURRQEST_VARTINFO().mVarType = LFlags & EFI_IFR_NUMERIC_SIZE; - mCVfrVarDataTypeDB.GetDataTypeSize (_GET_CURRQEST_DATATYPE(), &DataTypeSize); - _GET_CURRQEST_VARTINFO().mVarTotalSize = DataTypeSize; - } + <<
+ //check data type flag
+ VarStoreType = mCVfrDataStorage.GetVarStoreType (_GET_CURRQEST_VARTINFO().mVarStoreId);
+ if (VarStoreType == EFI_VFR_VARSTORE_BUFFER || VarStoreType == EFI_VFR_VARSTORE_EFI) {
+ if (_GET_CURRQEST_DATATYPE() != (LFlags & EFI_IFR_NUMERIC_SIZE)) {
+ _PCATCH(VFR_RETURN_INVALID_PARAMETER, LineNum, "Numeric Flag is not same to Numeric VarData type");
+ }
+ } else {
+ // update data type for name/value store
+ UINT32 DataTypeSize;
+ _GET_CURRQEST_VARTINFO().mVarType = LFlags & EFI_IFR_NUMERIC_SIZE;
+ mCVfrVarDataTypeDB.GetDataTypeSize (_GET_CURRQEST_DATATYPE(), &DataTypeSize);
+ _GET_CURRQEST_VARTINFO().mVarTotalSize = DataTypeSize;
+ }
_PCATCH(NObj.SetFlags (HFlags, LFlags), LineNum);
- >> + >>
;
numericFlagsField [UINT8 & HFlags, UINT8 & LFlags] :
@@ -1561,10 +1561,10 @@ numericFlagsField [UINT8 & HFlags, UINT8 & LFlags] : | "NUMERIC_SIZE_1" << $LFlags = ($LFlags & ~EFI_IFR_NUMERIC_SIZE) | EFI_IFR_NUMERIC_SIZE_1; >>
| "NUMERIC_SIZE_2" << $LFlags = ($LFlags & ~EFI_IFR_NUMERIC_SIZE) | EFI_IFR_NUMERIC_SIZE_2; >>
| "NUMERIC_SIZE_4" << $LFlags = ($LFlags & ~EFI_IFR_NUMERIC_SIZE) | EFI_IFR_NUMERIC_SIZE_4; >>
- | "NUMERIC_SIZE_8" << $LFlags = ($LFlags & ~EFI_IFR_NUMERIC_SIZE) | EFI_IFR_NUMERIC_SIZE_8; >> - | "DISPLAY_INT_DEC" << $LFlags = ($LFlags & ~EFI_IFR_DISPLAY) | EFI_IFR_DISPLAY_INT_DEC; >> - | "DISPLAY_UINT_DEC" << $LFlags = ($LFlags & ~EFI_IFR_DISPLAY) | EFI_IFR_DISPLAY_UINT_DEC; >> - | "DISPLAY_UINT_HEX" << $LFlags = ($LFlags & ~EFI_IFR_DISPLAY) | EFI_IFR_DISPLAY_UINT_HEX; >> + | "NUMERIC_SIZE_8" << $LFlags = ($LFlags & ~EFI_IFR_NUMERIC_SIZE) | EFI_IFR_NUMERIC_SIZE_8; >>
+ | "DISPLAY_INT_DEC" << $LFlags = ($LFlags & ~EFI_IFR_DISPLAY) | EFI_IFR_DISPLAY_INT_DEC; >>
+ | "DISPLAY_UINT_DEC" << $LFlags = ($LFlags & ~EFI_IFR_DISPLAY) | EFI_IFR_DISPLAY_UINT_DEC; >>
+ | "DISPLAY_UINT_HEX" << $LFlags = ($LFlags & ~EFI_IFR_DISPLAY) | EFI_IFR_DISPLAY_UINT_HEX; >>
| questionheaderFlagsField[HFlags]
;
@@ -1587,25 +1587,25 @@ vfrOneofFlagsField [CIfrOneOf & OObj, UINT32 LineNum] : <<
UINT8 LFlags = _GET_CURRQEST_DATATYPE() & EFI_IFR_NUMERIC_SIZE;
UINT8 HFlags = 0;
- EFI_VFR_VARSTORE_TYPE VarStoreType = EFI_VFR_VARSTORE_INVALID; + EFI_VFR_VARSTORE_TYPE VarStoreType = EFI_VFR_VARSTORE_INVALID;
>>
numericFlagsField[HFlags, LFlags] ( "\|" numericFlagsField[HFlags, LFlags] )*
- << - //check data type flag - VarStoreType = mCVfrDataStorage.GetVarStoreType (_GET_CURRQEST_VARTINFO().mVarStoreId); - if (VarStoreType == EFI_VFR_VARSTORE_BUFFER || VarStoreType == EFI_VFR_VARSTORE_EFI) { - if (_GET_CURRQEST_DATATYPE() != (LFlags & EFI_IFR_NUMERIC_SIZE)) { - _PCATCH(VFR_RETURN_INVALID_PARAMETER, LineNum, "Numeric Flag is not same to Numeric VarData type"); - } - } else { - // update data type for Name/Value store - UINT32 DataTypeSize; - _GET_CURRQEST_VARTINFO().mVarType = LFlags & EFI_IFR_NUMERIC_SIZE; - mCVfrVarDataTypeDB.GetDataTypeSize (_GET_CURRQEST_DATATYPE(), &DataTypeSize); - _GET_CURRQEST_VARTINFO().mVarTotalSize = DataTypeSize; - } + <<
+ //check data type flag
+ VarStoreType = mCVfrDataStorage.GetVarStoreType (_GET_CURRQEST_VARTINFO().mVarStoreId);
+ if (VarStoreType == EFI_VFR_VARSTORE_BUFFER || VarStoreType == EFI_VFR_VARSTORE_EFI) {
+ if (_GET_CURRQEST_DATATYPE() != (LFlags & EFI_IFR_NUMERIC_SIZE)) {
+ _PCATCH(VFR_RETURN_INVALID_PARAMETER, LineNum, "Numeric Flag is not same to Numeric VarData type");
+ }
+ } else {
+ // update data type for Name/Value store
+ UINT32 DataTypeSize;
+ _GET_CURRQEST_VARTINFO().mVarType = LFlags & EFI_IFR_NUMERIC_SIZE;
+ mCVfrVarDataTypeDB.GetDataTypeSize (_GET_CURRQEST_DATATYPE(), &DataTypeSize);
+ _GET_CURRQEST_VARTINFO().mVarTotalSize = DataTypeSize;
+ }
_PCATCH(OObj.SetFlags (HFlags, LFlags), LineNum);
- >> + >>
;
vfrStatementStringType :
@@ -1822,10 +1822,10 @@ vfrStatementStatList : ;
vfrStatementDisableIfStat :
- << + <<
CIfrDisableIf DIObj;
- UINT32 ExpOpCount = 0; - >> + UINT32 ExpOpCount = 0;
+ >>
L:DisableIf << DIObj.SetLineNo(L->getLine()); >>
vfrStatementExpression[0, ExpOpCount] ";" << mConstantOnlyInExpression = FALSE; >>
( vfrStatementStatList )*
@@ -1834,10 +1834,10 @@ vfrStatementDisableIfStat : ;
vfrStatementSuppressIfStat :
- << + <<
CIfrSuppressIf SIObj;
- UINT32 ExpOpCount = 0; - >> + UINT32 ExpOpCount = 0;
+ >>
L:SuppressIf << SIObj.SetLineNo(L->getLine()); >>
{ FLAGS "=" flagsField ( "\|" flagsField )* "," }
vfrStatementExpression[0, ExpOpCount] ";"
@@ -1847,10 +1847,10 @@ vfrStatementSuppressIfStat : ;
vfrStatementGrayOutIfStat :
- << + <<
CIfrGrayOutIf GOIObj;
- UINT32 ExpOpCount = 0; - >> + UINT32 ExpOpCount = 0;
+ >>
L:GrayOutIf << GOIObj.SetLineNo(L->getLine()); >>
{ FLAGS "=" flagsField ( "\|" flagsField )* "," }
vfrStatementExpression[0, ExpOpCount]
@@ -1890,10 +1890,10 @@ vfrStatementLocked : ;
vfrStatementInconsistentIf :
- << + <<
CIfrInconsistentIf IIObj;
- UINT32 ExpOpCount = 0; - >> + UINT32 ExpOpCount = 0;
+ >>
L:InconsistentIf << IIObj.SetLineNo(L->getLine()); >>
Prompt "=" "STRING_TOKEN" "\(" S:Number "\)" "," << IIObj.SetError (_STOSID(S->getText())); >>
{ FLAGS "=" flagsField ( "\|" flagsField )* "," }
@@ -1902,10 +1902,10 @@ vfrStatementInconsistentIf : ;
vfrStatementNoSubmitIf :
- << + <<
CIfrNoSubmitIf NSIObj;
- UINT32 ExpOpCount = 0; - >> + UINT32 ExpOpCount = 0;
+ >>
L:NoSubmitIf << NSIObj.SetLineNo(L->getLine()); >>
Prompt "=" "STRING_TOKEN" "\(" S:Number "\)" "," << NSIObj.SetError (_STOSID(S->getText())); >>
{ FLAGS "=" flagsField ( "\|" flagsField )* "," }
@@ -1914,10 +1914,10 @@ vfrStatementNoSubmitIf : ;
vfrStatementDisableIfQuest :
- << + <<
CIfrDisableIf DIObj;
- UINT32 ExpOpCount = 0; - >> + UINT32 ExpOpCount = 0;
+ >>
L:DisableIf << DIObj.SetLineNo(L->getLine()); >>
vfrStatementExpression[0, ExpOpCount] ";" << mConstantOnlyInExpression = FALSE; >>
vfrStatementQuestionOptionList
@@ -1937,10 +1937,10 @@ vfrStatementVarstoreDevice : ;
vfrStatementSuppressIfQuest :
- << + <<
CIfrSuppressIf SIObj;
- UINT32 ExpOpCount = 0; - >> + UINT32 ExpOpCount = 0;
+ >>
L:SuppressIf << SIObj.SetLineNo(L->getLine()); >>
{ FLAGS "=" flagsField ( "\|" flagsField )* "," }
vfrStatementExpression[0, ExpOpCount] ";"
@@ -1962,30 +1962,30 @@ vfrStatementOneOfOption : L:Option << OOOObj.SetLineNo(L->getLine()); >>
Text "=" "STRING_TOKEN" "\(" S:Number "\)" "," << OOOObj.SetOption (_STOSID(S->getText())); >>
Value "=" vfrConstantValueField[_GET_CURRQEST_DATATYPE()] >[Val] ","
- << - if (gCurrentMinMaxData != NULL) { - //set min/max value for oneof opcode - UINT64 Step = gCurrentMinMaxData->GetStepData(_GET_CURRQEST_DATATYPE()); - switch (_GET_CURRQEST_DATATYPE()) { - case EFI_IFR_TYPE_NUM_SIZE_64: - gCurrentMinMaxData->SetMinMaxStepData(Val.u64, Val.u64, Step); - break; - case EFI_IFR_TYPE_NUM_SIZE_32: - gCurrentMinMaxData->SetMinMaxStepData(Val.u32, Val.u32, (UINT32) Step); - break; - case EFI_IFR_TYPE_NUM_SIZE_16: - gCurrentMinMaxData->SetMinMaxStepData(Val.u16, Val.u16, (UINT16) Step); - break; - case EFI_IFR_TYPE_NUM_SIZE_8: - gCurrentMinMaxData->SetMinMaxStepData(Val.u8, Val.u8, (UINT8) Step); - break; - default: - break; - } - } - OOOObj.SetType (_GET_CURRQEST_DATATYPE()); - OOOObj.SetValue (Val); - >> + <<
+ if (gCurrentMinMaxData != NULL) {
+ //set min/max value for oneof opcode
+ UINT64 Step = gCurrentMinMaxData->GetStepData(_GET_CURRQEST_DATATYPE());
+ switch (_GET_CURRQEST_DATATYPE()) {
+ case EFI_IFR_TYPE_NUM_SIZE_64:
+ gCurrentMinMaxData->SetMinMaxStepData(Val.u64, Val.u64, Step);
+ break;
+ case EFI_IFR_TYPE_NUM_SIZE_32:
+ gCurrentMinMaxData->SetMinMaxStepData(Val.u32, Val.u32, (UINT32) Step);
+ break;
+ case EFI_IFR_TYPE_NUM_SIZE_16:
+ gCurrentMinMaxData->SetMinMaxStepData(Val.u16, Val.u16, (UINT16) Step);
+ break;
+ case EFI_IFR_TYPE_NUM_SIZE_8:
+ gCurrentMinMaxData->SetMinMaxStepData(Val.u8, Val.u8, (UINT8) Step);
+ break;
+ default:
+ break;
+ }
+ }
+ OOOObj.SetType (_GET_CURRQEST_DATATYPE());
+ OOOObj.SetValue (Val);
+ >>
F:FLAGS "=" vfrOneOfOptionFlags[OOOObj, F->getLine()]
<<
if (OOOObj.GetFlags () & 0x10) {
@@ -2066,7 +2066,7 @@ vfrStatementInvalidHidden : ;
vfrStatementInvalidInconsistentIf :
- << UINT32 ExpOpCount = 0; >> + << UINT32 ExpOpCount = 0; >>
InconsistentIf
Prompt "=" "STRING_TOKEN" "\(" S:Number "\)" ","
{ FLAGS "=" flagsField ( "\|" flagsField )* "," }
@@ -2237,28 +2237,28 @@ multdivmodTerm [UINT32 & RootLevel, UINT32 & ExpOpCount]: L3:"%" castTerm[$RootLevel, $ExpOpCount] << $ExpOpCount++; CIfrModulo MObj(L3->getLine()); >>
)
)*
- ; - -castTerm [UINT32 & RootLevel, UINT32 & ExpOpCount]: - << UINT8 CastType = 0xFF; >> - ( - L:"\(" - ( - Boolean << CastType = 0; >> - | Uint64 << CastType = 1; >> - | Uint32 << CastType = 1; >> - | Uint16 << CastType = 1; >> - | Uint8 << CastType = 1; >> - ) - "\)" - )* - atomTerm[$RootLevel, $ExpOpCount] - << - switch (CastType) { - case 0: { CIfrToBoolean TBObj(L->getLine()); $ExpOpCount++; } break; - case 1: { CIfrToUint TUObj(L->getLine()); $ExpOpCount++; } break; - } - >> + ;
+
+castTerm [UINT32 & RootLevel, UINT32 & ExpOpCount]:
+ << UINT8 CastType = 0xFF; >>
+ (
+ L:"\("
+ (
+ Boolean << CastType = 0; >>
+ | Uint64 << CastType = 1; >>
+ | Uint32 << CastType = 1; >>
+ | Uint16 << CastType = 1; >>
+ | Uint8 << CastType = 1; >>
+ )
+ "\)"
+ )*
+ atomTerm[$RootLevel, $ExpOpCount]
+ <<
+ switch (CastType) {
+ case 0: { CIfrToBoolean TBObj(L->getLine()); $ExpOpCount++; } break;
+ case 1: { CIfrToUint TUObj(L->getLine()); $ExpOpCount++; } break;
+ }
+ >>
;
atomTerm [UINT32 & RootLevel, UINT32 & ExpOpCount]:
@@ -2544,7 +2544,7 @@ vfrExpressionUnaryOp[UINT32 & RootLevel, UINT32 & ExpOpCount] : | bitwisenotExp[$RootLevel, $ExpOpCount]
| question2refExp[$RootLevel, $ExpOpCount]
| stringref2Exp[$RootLevel, $ExpOpCount]
- | toboolExp[$RootLevel, $ExpOpCount] + | toboolExp[$RootLevel, $ExpOpCount]
| unintExp[$RootLevel, $ExpOpCount]
| toupperExp[$RootLevel, $ExpOpCount]
| tolwerExp[$RootLevel, $ExpOpCount]
@@ -2700,7 +2700,7 @@ class EfiVfrParser { <<
private:
UINT8 mParserStatus;
- BOOLEAN mConstantOnlyInExpression; + BOOLEAN mConstantOnlyInExpression;
CVfrDefaultStore mCVfrDefaultStore;
CVfrVarDataTypeDB mCVfrVarDataTypeDB;
@@ -2723,14 +2723,14 @@ private: UINT8 _GET_CURRQEST_DATATYPE ();
UINT32 _GET_CURRQEST_VARSIZE ();
- UINT32 _GET_CURRQEST_ARRAY_SIZE (); + UINT32 _GET_CURRQEST_ARRAY_SIZE ();
public:
VOID _PCATCH (IN INTN, IN INTN, IN ANTLRTokenPtr, IN INT8 *);
VOID _PCATCH (IN EFI_VFR_RETURN_CODE);
VOID _PCATCH (IN EFI_VFR_RETURN_CODE, IN ANTLRTokenPtr);
VOID _PCATCH (IN EFI_VFR_RETURN_CODE, IN UINT32);
- VOID _PCATCH (IN EFI_VFR_RETURN_CODE, IN UINT32, IN INT8 *); + VOID _PCATCH (IN EFI_VFR_RETURN_CODE, IN UINT32, IN INT8 *);
VOID syn (ANTLRAbstractToken *, ANTLRChar *, SetWordType *, ANTLRTokenType, INT32);
@@ -2845,37 +2845,37 @@ EfiVfrParser::_GET_CURRQEST_VARSIZE ( return mCurrQestVarInfo.mVarTotalSize;
}
-UINT32 -EfiVfrParser::_GET_CURRQEST_ARRAY_SIZE ( - VOID - ) -{ - UINT8 Size = 1; - - switch (mCurrQestVarInfo.mVarType) { - case EFI_IFR_TYPE_NUM_SIZE_8: - Size = 1; - break; - - case EFI_IFR_TYPE_NUM_SIZE_16: - Size = 2; - break; - - case EFI_IFR_TYPE_NUM_SIZE_32: - Size = 4; - break; - - case EFI_IFR_TYPE_NUM_SIZE_64: - Size = 8; - break; - - default: - break; - } - - return (mCurrQestVarInfo.mVarTotalSize / Size); -} - +UINT32
+EfiVfrParser::_GET_CURRQEST_ARRAY_SIZE (
+ VOID
+ )
+{
+ UINT8 Size = 1;
+
+ switch (mCurrQestVarInfo.mVarType) {
+ case EFI_IFR_TYPE_NUM_SIZE_8:
+ Size = 1;
+ break;
+
+ case EFI_IFR_TYPE_NUM_SIZE_16:
+ Size = 2;
+ break;
+
+ case EFI_IFR_TYPE_NUM_SIZE_32:
+ Size = 4;
+ break;
+
+ case EFI_IFR_TYPE_NUM_SIZE_64:
+ Size = 8;
+ break;
+
+ default:
+ break;
+ }
+
+ return (mCurrQestVarInfo.mVarTotalSize / Size);
+}
+
VOID
EfiVfrParser::_PCATCH (
IN INTN ReturnCode,
@@ -2914,16 +2914,16 @@ EfiVfrParser::_PCATCH ( )
{
mParserStatus += gCVfrErrorHandle.HandleError (ReturnCode, LineNum);
-} - -VOID -EfiVfrParser::_PCATCH ( - IN EFI_VFR_RETURN_CODE ReturnCode, - IN UINT32 LineNum, - IN INT8 *ErrorMsg - ) -{ - mParserStatus = mParserStatus + gCVfrErrorHandle.HandleError (ReturnCode, LineNum, ErrorMsg); +}
+
+VOID
+EfiVfrParser::_PCATCH (
+ IN EFI_VFR_RETURN_CODE ReturnCode,
+ IN UINT32 LineNum,
+ IN INT8 *ErrorMsg
+ )
+{
+ mParserStatus = mParserStatus + gCVfrErrorHandle.HandleError (ReturnCode, LineNum, ErrorMsg);
}
VOID
|