-;------------------------------------------------------------------------------
-;
-; 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
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
+; This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution. The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
+; PageFaultHandler.asm\r
+;\r
+; Abstract:\r
+;\r
+; Defines page fault handler used to hook SMM IDT\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+EXTERN mOriginalHandler:QWORD\r
+EXTERN PageFaultHandler:PROC\r
+\r
+ .code\r
+\r
+PageFaultHandlerHook PROC\r
+ push rax ; save all volatile registers\r
+ push rcx\r
+ push rdx\r
+ push r8\r
+ push r9\r
+ push r10\r
+ push r11\r
+\r
+ add rsp, -10h * 6 - 8 ; reserve memory to store XMM registers and make address 16-byte alignment\r
+ movdqa [rsp], xmm0\r
+ movdqa [rsp + 10h], xmm1\r
+ movdqa [rsp + 20h], xmm2\r
+ movdqa [rsp + 30h], xmm3\r
+ movdqa [rsp + 40h], xmm4\r
+ movdqa [rsp + 50h], xmm5\r
+\r
+ add rsp, -20h\r
+ call PageFaultHandler\r
+ add rsp, 20h\r
+\r
+ movdqa xmm0, [rsp]\r
+ movdqa xmm1, [rsp + 10h] \r
+ movdqa xmm2, [rsp + 20h]\r
+ movdqa xmm3, [rsp + 30h]\r
+ movdqa xmm4, [rsp + 40h]\r
+ movdqa xmm5, [rsp + 50h]\r
+ add rsp, 10h * 6 + 8\r
+ \r
+ test al, al ; set ZF flag\r
+ pop r11\r
+ pop r10\r
+ pop r9\r
+ pop r8\r
+ pop rdx\r
+ pop rcx\r
+ pop rax ; restore all volatile registers\r
+ jnz @F ; check ZF flag\r
+ jmp mOriginalHandler\r
+@@:\r
+ add rsp, 08h ; skip error code for PF\r
+ iretq\r
+PageFaultHandlerHook ENDP\r
+ END\r
-;------------------------------------------------------------------------------
-;
-; 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:
-;
+;------------------------------------------------------------------------------\r
+;\r
+; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+; This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution. The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+; Module Name:\r
+;\r
; CpuIdEx.Asm\r
-;
-; Abstract:
-;
+;\r
+; Abstract:\r
+;\r
; AsmCpuidEx function\r
-;
-; Notes:
-;
-;------------------------------------------------------------------------------
-
+;\r
+; Notes:\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
.686\r
.model flat,C\r
- .code
-
-;------------------------------------------------------------------------------
-; UINT32
-; EFIAPI
+ .code\r
+\r
+;------------------------------------------------------------------------------\r
+; UINT32\r
+; EFIAPI\r
; AsmCpuidEx (\r
-; 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,\r
+; IN UINT32 RegisterInEcx,\r
+; OUT UINT32 *RegisterOutEax OPTIONAL,\r
+; OUT UINT32 *RegisterOutEbx OPTIONAL,\r
+; OUT UINT32 *RegisterOutEcx OPTIONAL,\r
+; OUT UINT32 *RegisterOutEdx OPTIONAL\r
+; )\r
+;------------------------------------------------------------------------------\r
AsmCpuidEx PROC USES ebx\r
push ebp\r
mov ebp, esp\r
leave\r
ret\r
AsmCpuidEx ENDP\r
-
- END
+\r
+ END\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# CpuBreakpoint.S\r
+#\r
+# Abstract:\r
+#\r
+# Implementation of CpuBreakpoint() on x86_64\r
+#\r
+#------------------------------------------------------------------------------\r
+#include <EdkIIGlueBase.h>\r
+\r
+.globl ASM_PFX(CpuBreakpoint)\r
+ASM_PFX(CpuBreakpoint):\r
+ int $0x3\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# CpuId.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmCpuid function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmCpuid (\r
+# IN UINT32 RegisterInEax,\r
+# OUT UINT32 *RegisterOutEax OPTIONAL,\r
+# OUT UINT32 *RegisterOutEbx OPTIONAL,\r
+# OUT UINT32 *RegisterOutEcx OPTIONAL,\r
+# OUT UINT32 *RegisterOutEdx OPTIONAL\r
+# )\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmCpuid)\r
+ASM_PFX(AsmCpuid):\r
+ push %rbx\r
+ mov %ecx, %eax\r
+ push %rax # save Index on stack\r
+ push %rdx\r
+ cpuid\r
+ test %r9, %r9\r
+ jz L1\r
+ mov %ecx, (%r9)\r
+L1:\r
+ pop %rcx\r
+ jrcxz L2\r
+ mov %eax, (%rcx)\r
+L2:\r
+ mov %r8, %rcx\r
+ jrcxz L3\r
+ mov %ebx, (%rcx)\r
+L3:\r
+ mov 0x38(%rsp), %rcx\r
+ jrcxz L4\r
+ mov %edx, (%rcx)\r
+L4:\r
+ pop %rax # restore Index to rax as return value\r
+ pop %rbx\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# CpuIdEx.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmCpuidEx function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+#include <EdkIIGlueBase.h>\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT32\r
+# EFIAPI\r
+# AsmCpuidEx (\r
+# IN UINT32 RegisterInEax,\r
+# IN UINT32 RegisterInEcx,\r
+# OUT UINT32 *RegisterOutEax OPTIONAL,\r
+# OUT UINT32 *RegisterOutEbx OPTIONAL,\r
+# OUT UINT32 *RegisterOutEcx OPTIONAL,\r
+# OUT UINT32 *RegisterOutEdx OPTIONAL\r
+# )\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmCpuidEx)\r
+ASM_PFX(AsmCpuidEx):\r
+ push %rbx\r
+ movl %ecx,%eax\r
+ movl %edx,%ecx\r
+ push %rax\r
+ cpuid\r
+ mov 0x38(%rsp), %r10\r
+ test %r10, %r10\r
+ jz L1\r
+ mov %ecx,(%r10)\r
+L1: \r
+ mov %r8, %rcx\r
+ jrcxz L2\r
+ movl %eax,(%rcx)\r
+L2: \r
+ mov %r9, %rcx\r
+ jrcxz L3\r
+ mov %ebx, (%rcx)\r
+L3: \r
+ mov 0x40(%rsp), %rcx\r
+ jrcxz L4\r
+ mov %edx, (%rcx)\r
+L4: \r
+ pop %rax\r
+ pop %rbx\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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 .
-
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# DisablePaging64.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmDisablePaging64 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+ \r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# InternalX86DisablePaging64 (\r
+# IN UINT16 Cs, %rdi\r
+# IN UINT64 EntryPoint, %rsi\r
+# IN UINT64 Context1, OPTIONAL %rdx\r
+# IN UINT32 Context2, OPTIONAL %rcx\r
+# IN UINT64 NewStack %r8\r
+# );\r
+#------------------------------------------------------------------------------\r
+\r
+.globl ASM_PFX(InternalX86DisablePaging64)\r
+ASM_PFX(InternalX86DisablePaging64):\r
+ cli \r
+ shl $0x20,%rcx\r
+ lea (%rip), %eax\r
+ mov %eax,%ecx\r
+ push %rcx\r
+ mov %edx,%ebx\r
+ mov %r8d,%esi\r
+ mov %r9d,%edi\r
+ mov 0x28(%rsp),%eax\r
+ lret \r
+L1:\r
+ mov %eax,%esp\r
+ mov %cr0,%rax\r
+ btr $0x1f,%eax\r
+ mov %rax,%cr0\r
+ mov $0xc0000080,%ecx\r
+ rdmsr \r
+ and $0xfe,%ah\r
+ wrmsr \r
+ mov %cr4,%rax\r
+ and $0xdf,%al\r
+ mov %rax,%cr4\r
+ push %rdi\r
+ push %rsi\r
+ callq *%rbx\r
+ jmp .\r
+\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# EnableDisableInterrupts.S\r
+#\r
+# Abstract:\r
+#\r
+# EnableDisableInterrupts function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# EnableDisableInterrupts (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(EnableDisableInterrupts)\r
+ASM_PFX(EnableDisableInterrupts):\r
+ sti\r
+ cli\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# EnableInterrupts.S\r
+#\r
+# Abstract:\r
+#\r
+# EnableInterrupts function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# EnableInterrupts (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(EnableInterrupts)\r
+ASM_PFX(EnableInterrupts):\r
+ sti\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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 .
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# EnablePaging64.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmEnablePaging64 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# InternalX86EnablePaging64 (\r
+# IN UINT16 Cs, %rdi\r
+# IN UINT64 EntryPoint, %rsi\r
+# IN UINT64 Context1, OPTIONAL %rdx\r
+# IN UINT64 Context2, OPTIONAL %rcx\r
+# IN UINT64 NewStack %r8\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(InternalX86EnablePaging64)\r
+ASM_PFX(InternalX86EnablePaging64):\r
+ cli \r
+ pop %rax\r
+ callq Base\r
+Base:\r
+ addl $(L1-Base),(%rsp)\r
+ mov %cr4,%rax\r
+ or $0x20,%al\r
+ mov %rax,%cr4\r
+ mov $0xc0000080,%ecx\r
+ rdmsr \r
+ or $0x1,%ah\r
+ wrmsr \r
+ mov %cr0,%rax\r
+ bts $0x1f,%eax\r
+ mov %rax,%cr0\r
+ lret \r
+L1:\r
+ addr32 mov (%esp),%rbx\r
+ addr32 mov 0x8(%esp),%rcx\r
+ addr32 mov 0x10(%esp),%rdx\r
+ addr32 mov 0x18(%esp),%rsp\r
+ add $-0x20,%rsp\r
+ callq *%rbx\r
+ jmp .\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# FlushCacheLine.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmFlushCacheLine function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# VOID *\r
+# EFIAPI \r
+# AsmFlushCacheLine (\r
+# IN VOID *LinearAddress\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmFlushCacheLine)\r
+ASM_PFX(AsmFlushCacheLine):\r
+ clflush (%rdi)\r
+ mov %rdi, %rax\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# FxRestore.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmFxRestore function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# InternalX86FxRestore (\r
+# IN CONST IA32_FX_BUFFER *Buffer\r
+# )#\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(InternalX86FxRestore)\r
+ASM_PFX(InternalX86FxRestore):\r
+ fxrstor (%rcx)\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# FxSave.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmFxSave function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# InternalX86FxSave (\r
+# OUT IA32_FX_BUFFER *Buffer\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(InternalX86FxSave)\r
+ASM_PFX(InternalX86FxSave):\r
+ fxsave (%rcx)\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# InterlockedCompareExchange64.S\r
+#\r
+# Abstract:\r
+#\r
+# InterlockedCompareExchange64 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# InterlockedCompareExchange64 (\r
+# IN UINT64 *Value,\r
+# IN UINT64 CompareValue,\r
+# IN UINT64 ExchangeValue\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(InternalSyncCompareExchange64)\r
+ASM_PFX(InternalSyncCompareExchange64):\r
+ mov %rsi, %rax\r
+ lock cmpxchg %rdx,(%rdi)\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# InterlockedDecrement.S\r
+#\r
+# Abstract:\r
+#\r
+# InterlockedDecrement function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# UINT32\r
+# EFIAPI\r
+# InterlockedDecrement (\r
+# IN UINT32 *Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(InternalSyncDecrement)\r
+ASM_PFX(InternalSyncDecrement):\r
+ lock decl (%rcx)\r
+ mov (%rcx), %eax\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# InterlockedIncrement.S\r
+#\r
+# Abstract:\r
+#\r
+# InterlockedIncrement function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# UINT32\r
+# EFIAPI\r
+# InterlockedIncrement (\r
+# IN UINT32 *Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(InternalSyncIncrement)\r
+ASM_PFX(InternalSyncIncrement):\r
+ lock incl (%rcx)\r
+ mov (%rcx), %eax\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# Invd.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmInvd function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmInvd (\r
+# VOID\r
+# )#\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmInvd)\r
+ASM_PFX(AsmInvd):\r
+ invd\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# SetJump.S\r
+#\r
+# Abstract:\r
+#\r
+# Implementation of SetJump() on x86_64\r
+#\r
+#------------------------------------------------------------------------------\r
+#include <EdkIIGlueBase.h>\r
+\r
+.globl ASM_PFX(SetJump)\r
+ASM_PFX(SetJump):\r
+ push %rcx\r
+ add $0xffffffffffffffe0,%rsp\r
+ call ASM_PFX(InternalAssertJumpBuffer)\r
+ add $0x20,%rsp\r
+ pop %rcx\r
+ pop %rdx\r
+ mov %rbx,(%rcx)\r
+ mov %rsp,0x8(%rcx)\r
+ mov %rbp,0x10(%rcx)\r
+ mov %rdi,0x18(%rcx)\r
+ mov %rsi,0x20(%rcx)\r
+ mov %r12,0x28(%rcx)\r
+ mov %r13,0x30(%rcx)\r
+ mov %r14,0x38(%rcx)\r
+ mov %r15,0x40(%rcx)\r
+ mov %rdx,0x48(%rcx)\r
+ # save non-volatile fp registers\r
+ stmxcsr 0x50(%rcx)\r
+ movdqu %xmm6, 0x58(%rcx) \r
+ movdqu %xmm7, 0x68(%rcx)\r
+ movdqu %xmm8, 0x78(%rcx)\r
+ movdqu %xmm9, 0x88(%rcx)\r
+ movdqu %xmm10, 0x98(%rcx)\r
+ movdqu %xmm11, 0xA8(%rcx)\r
+ movdqu %xmm12, 0xB8(%rcx)\r
+ movdqu %xmm13, 0xC8(%rcx)\r
+ movdqu %xmm14, 0xD8(%rcx)\r
+ movdqu %xmm15, 0xE8(%rcx) \r
+ xor %rax,%rax\r
+ jmpq *%rdx\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# SwitchStack.S\r
+#\r
+# Abstract:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# Routine Description:\r
+#\r
+# Routine for switching stacks with 1 parameter\r
+#\r
+# Arguments:\r
+#\r
+# (rdi) EntryPoint - Entry point with new stack.\r
+# (rsi) Context1 - Parameter1 for entry point.\r
+# (rdx) Context2 - Parameter2 for entry point.\r
+# (rcx) NewStack - Pointer to new stack.\r
+#\r
+# Returns:\r
+#\r
+# None\r
+#\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(InternalSwitchStack)\r
+ASM_PFX(InternalSwitchStack):\r
+ mov %rcx, %rax\r
+ mov %rdx, %rcx\r
+ mov %r8, %rdx\r
+ lea -0x20(%r9), %rsp\r
+ call *%rax\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteCr0.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteCr0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteCr0 (\r
+# UINTN Cr0\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteCr0)\r
+ASM_PFX(AsmWriteCr0):\r
+ mov %rcx,%cr0\r
+ mov %rcx,%rax\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteCr2.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteCr2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteCr2 (\r
+# UINTN Cr2\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteCr2)\r
+ASM_PFX(AsmWriteCr2):\r
+ mov %rcx,%cr2\r
+ mov %rcx,%rax\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteCr3.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteCr3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteCr3 (\r
+# UINTN Cr3\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteCr3)\r
+ASM_PFX(AsmWriteCr3):\r
+ mov %rcx,%cr3\r
+ mov %rcx,%rax\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteCr4.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteCr4 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteCr4 (\r
+# UINTN Cr4\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteCr4)\r
+ASM_PFX(AsmWriteCr4):\r
+ mov %rcx,%cr4\r
+ mov %rcx,%rax\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteDr4.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteDr4 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteDr4 (\r
+# IN UINTN Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteDr4)\r
+ASM_PFX(AsmWriteDr4):\r
+ mov %rcx, %dr4\r
+ mov %rcx, %rax\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteDr5.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteDr5 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteDr5 (\r
+# IN UINTN Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteDr5)\r
+ASM_PFX(AsmWriteDr5):\r
+ mov %rcx, %dr5\r
+ mov %rcx, %rax\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteDr6.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteDr6 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteDr6 (\r
+# IN UINTN Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteDr6)\r
+ASM_PFX(AsmWriteDr6):\r
+ mov %rcx, %dr6\r
+ mov %rcx, %rax\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteDr7.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteDr7 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteDr7 (\r
+# IN UINTN Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteDr7)\r
+ASM_PFX(AsmWriteDr7):\r
+ mov %rcx, %dr7\r
+ mov %rcx, %rax\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteGdtr.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteGdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# InternalX86WriteGdtr (\r
+# IN CONST IA32_DESCRIPTOR *Idtr\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(InternalX86WriteGdtr)\r
+ASM_PFX(InternalX86WriteGdtr):\r
+ lgdt (%rcx)\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteIdtr.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteIdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# InternalX86WriteIdtr (\r
+# IN CONST IA32_DESCRIPTOR *Idtr\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(InternalX86WriteIdtr)\r
+ASM_PFX(InternalX86WriteIdtr):\r
+ lidt (%rcx)\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteLdtr.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteLdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteLdtr (\r
+# IN UINT16 Ldtr\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteLdtr);\r
+ASM_PFX(AsmWriteLdtr):\r
+ lldt %cx\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteMm0.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteMm0 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteMm0);\r
+ASM_PFX(AsmWriteMm0):\r
+ movd %rcx, %xmm0\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteMm1.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm1 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteMm1 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteMm1);\r
+ASM_PFX(AsmWriteMm1):\r
+ movd %rcx, %mm1\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteMm2.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteMm2 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteMm2)\r
+ASM_PFX(AsmWriteMm2):\r
+ movd %rcx, %mm2\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteMm3.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteMm3 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteMm3)\r
+ASM_PFX(AsmWriteMm3):\r
+ movd %rcx, %mm3\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteMm4.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm4 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteMm4 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteMm4)\r
+ASM_PFX(AsmWriteMm4):\r
+ movd %rcx, %mm4\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteMm5.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm5 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteMm5 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteMm5)\r
+ASM_PFX(AsmWriteMm5):\r
+ movd %rcx, %mm5\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteMm6.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm6 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteMm6 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteMm6)\r
+ASM_PFX(AsmWriteMm6):\r
+ movd %rcx, %mm6\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteMm7.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm7 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteMm7 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteMm7)\r
+ASM_PFX(AsmWriteMm7):\r
+ movd %rcx, %mm7\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteMsr64.S\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMsr64 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+#include <EdkIIGlueBase.h>\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMsr64 (\r
+# IN UINT32 Index,\r
+# IN UINT64 Value\r
+# );\r
+# TODO:\r
+#------------------------------------------------------------------------------\r
+.globl ASM_PFX(AsmWriteMsr64)\r
+ASM_PFX(AsmWriteMsr64):\r
+ mov %rdx, %rax\r
+ shr $0x20, %rdx\r
+ wrmsr\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
-
-
-
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# EfiCopyMemRep1.S\r
+#\r
+# Abstract:\r
+#\r
+# CopyMem function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+#include <EfiBind.h>\r
+\r
+ .code: \r
+\r
+.globl ASM_PFX(EfiCommonLibCopyMem)\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EfiCommonLibCopyMem (\r
+# OUT VOID *Destination,\r
+# IN VOID *Source,\r
+# IN UINTN Count\r
+# );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(EfiCommonLibCopyMem):\r
+ push %rsi\r
+ push %rdi\r
+ cmp %rcx,%rdx\r
+ je CopyMemDone\r
+ cmp $0x0,%r8\r
+ je CopyMemDone\r
+ mov %rdx,%rsi\r
+ mov %rcx,%rdi\r
+ lea -1(%r8,%rsi,1),%r9\r
+ cmp %rdi,%rsi\r
+ jae CopyBytes\r
+ cmp %rdi,%r9\r
+ jb CopyBytes\r
+ mov %r9,%rsi\r
+ lea -1(%r8,%rdi,1),%rdi\r
+ std \r
+\r
+CopyBytes:\r
+ mov %r8,%rcx\r
+ rep movsb %ds:(%rsi),%es:(%rdi)\r
+ cld \r
+\r
+CopyMemDone:\r
+ pop %rdi\r
+ pop %rsi\r
+ retq \r
+\r
+\r
+\r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# EfiSetMemRep4.S\r
+#\r
+# Abstract:\r
+#\r
+# SetMem function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+#include <EfiBind.h>\r
+\r
+ .code: \r
+\r
+.globl ASM_PFX(EfiCommonLibCopyMem)\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EfiCommonLibSetMem (\r
+# OUT VOID *Buffer,\r
+# IN UINTN Size,\r
+# IN UINT8 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(EfiCommonLibSetMem):\r
+ push %rdi\r
+ cmp $0x0,%rdx\r
+ je SetDone\r
+ mov %rcx,%rdi\r
+ mov %r8b,%al\r
+ mov %al,%ah\r
+ shrd $0x10,%eax,%ecx\r
+ shld $0x10,%ecx,%eax\r
+ mov %rdx,%rcx\r
+ shr $0x2,%rcx\r
+ rep stos %eax,%es:(%rdi)\r
+ mov %rdx,%rcx\r
+ and $0x3,%rcx\r
+ rep stos %al,%es:(%rdi)\r
+SetDone:\r
+ pop %rdi\r
+ retq \r
-#------------------------------------------------------------------------------
-#
-# 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
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# EfiZeroMemRep4.S\r
+#\r
+# Abstract:\r
+#\r
+# ZeroMem function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+#include <EfiBind.h>\r
+\r
+ .code: \r
+\r
+.globl ASM_PFX(EfiCommonLibZeroMem)\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EfiCommonLibZeroMem (\r
+# IN VOID *Buffer,\r
+# IN UINTN Size\r
+# );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(EfiCommonLibZeroMem):\r
+ push %rdi\r
+ xor %rax,%rax\r
+ mov %rcx,%rdi\r
+ mov %rdx,%rcx\r
+ shr $0x2,%rcx\r
+ and $0x3,%rdx\r
+ rep stos %eax,%es:(%rdi)\r
+ mov %rdx,%rcx\r
+ rep stos %al,%es:(%rdi)\r
+ pop %rdi\r
retq
\ No newline at end of file
-#
-# 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
-
-
-
+#\r
+# Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials \r
+# are licensed and made available under the terms and conditions of the BSD License \r
+# which accompanies this distribution. The full text of the license may be found at \r
+# http://opensource.org/licenses/bsd-license.php \r
+# \r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+# \r
+# Module Name:\r
+# \r
+# ProcessorAsms.Asm\r
+#\r
+#\r
+#\r
+#include "EfiBind.h"\r
+#------------------------------------------------------------------------------\r
+\r
+ .686P: \r
+ .MMX: \r
+ #.MODEL SMALL\r
+ .CODE: \r
+#------------------------------------------------------------------------------\r
+ \r
+.globl ASM_PFX(TransferControlSetJump) \r
+.globl ASM_PFX(TransferControlLongJump)\r
+.globl ASM_PFX(SwitchStacks)\r
+.globl ASM_PFX(SwitchIplStacks)\r
+\r
+#define EFI_SUCCESS 0\r
+#define EFI_WARN_RETURN_FROM_LONG_JUMP 5\r
+\r
+#\r
+# typedef struct {\r
+# UINT32 ebx;\r
+# UINT32 esi;\r
+# UINT32 edi;\r
+# UINT32 ebp;\r
+# UINT32 esp;\r
+# UINT32 eip;\r
+#} EFI_JUMP_BUFFER;\r
+#\r
+\r
+#typedef \r
+#EFI_STATUS\r
+#(EFIAPI *EFI_PEI_TRANSFER_CONTROL_SET_JUMP) (\r
+# IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This,\r
+# OUT EFI_JUMP_BUFFER *Context\r
+# );\r
+#\r
+#Routine Description:\r
+#\r
+# This routine implements the IA32 variant of the SetJump call. Its\r
+# responsibility is to store system state information for a possible\r
+# subsequent LongJump.\r
+#\r
+#Arguments:\r
+#\r
+# Pointer to CPU context save buffer.\r
+#\r
+#Returns:\r
+#\r
+# EFI_SUCCESS\r
+#\r
+ASM_PFX(TransferControlSetJump):\r
+ push %ebp\r
+ mov %esp,%ebp\r
+ mov 0x8(%ebp),%eax\r
+ mov 0xc(%ebp),%ecx\r
+ mov %ebx,(%ecx)\r
+ mov %esi,0x4(%ecx)\r
+ mov %edi,0x8(%ecx)\r
+ mov 0x0(%ebp),%eax\r
+ mov %eax,0xc(%ecx)\r
+ lea 0x4(%ebp),%eax\r
+ mov %eax,0x10(%ecx)\r
+ mov 0x4(%ebp),%eax\r
+ mov %eax,0x14(%ecx)\r
+ mov $0x0,%eax\r
+ leave \r
+ ret \r
+\r
+#typedef \r
+#EFI_STATUS\r
+#(EFIAPI *EFI_PEI_TRANSFER_CONTROL_LONG_JUMP) (\r
+# IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This,\r
+# IN EFI_JUMP_BUFFER *Context\r
+# );\r
+#\r
+# Routine Description:\r
+# \r
+# This routine implements the IA32 variant of the LongJump call. Its\r
+# responsibility is restore the system state to the Context Buffer and\r
+# pass control back.\r
+#\r
+# Arguments:\r
+# \r
+# Pointer to CPU context save buffer.\r
+#\r
+# Returns:\r
+#\r
+# EFI_WARN_RETURN_FROM_LONG_JUMP\r
+#\r
+\r
+ASM_PFX(TransferControlLongJump):\r
+ push %ebp\r
+ mov %esp,%ebp\r
+ push %ebx\r
+ push %esi\r
+ push %edi\r
+ mov 0x8(%ebp),%eax\r
+ mov $0x5,%eax\r
+ mov 0xc(%ebp),%ecx\r
+ mov (%ecx),%ebx\r
+ mov 0x4(%ecx),%esi\r
+ mov 0x8(%ecx),%edi\r
+ mov 0xc(%ecx),%ebp\r
+ mov 0x10(%ecx),%esp\r
+ add $0x4,%esp\r
+ jmp *0x14(%ecx)\r
+ mov $0x5,%eax\r
+ pop %edi\r
+ pop %esi\r
+ pop %ebx\r
+ leave \r
+ ret \r
+\r
+#\r
+# Routine Description:\r
+# This allows the caller to switch the stack and goes to the new entry point\r
+#\r
+# Arguments:\r
+# EntryPoint - Pointer to the location to enter\r
+# Parameter - Parameter to pass in\r
+# NewStack - New Location of the stack\r
+# NewBsp - New BSP\r
+#\r
+# Returns:\r
+#\r
+# Nothing. Goes to the Entry Point passing in the new parameters\r
+#\r
+#SwitchStacks PROC C \\r
+# EntryPoint:PTR DWORD, \\r
+# Parameter:DWORD, \\r
+# NewStack:PTR DWORD, \\r
+# NewBsp:PTR DWORD\r
+ASM_PFX(SwitchStacks):\r
+ push %ebp\r
+ mov %esp,%ebp\r
+ push %ebx\r
+ mov 0x14(%ebp),%eax\r
+ mov 0xc(%ebp),%ebx\r
+ mov 0x8(%ebp),%ecx\r
+ mov 0x10(%ebp),%eax\r
+ mov %eax,%esp\r
+ push %ebx\r
+ push $0x0\r
+ jmp *%ecx\r
+ pop %ebx\r
+ leave \r
+ ret \r
+\r
+\r
+\r
+\r
+#\r
+# Routine Description:\r
+# This allows the caller to switch the stack and goes to the new entry point\r
+#\r
+# Arguments:\r
+# EntryPoint - Pointer to the location to enter\r
+# Parameter1/Parameter2 - Parameter to pass in\r
+# NewStack - New Location of the stack\r
+# NewBsp - New BSP\r
+#\r
+# Returns:\r
+#\r
+# Nothing. Goes to the Entry Point passing in the new parameters\r
+#\r
+#SwitchIplStacks PROC C \\r
+# EntryPoint:PTR DWORD, \\r
+# Parameter1:DWORD, \\r
+# Parameter2:DWORD, \\r
+# NewStack:PTR DWORD, \\r
+# NewBsp:PTR DWORD\r
+ASM_PFX(SwitchIplStacks):\r
+ push %ebp\r
+ mov %esp,%ebp\r
+ push %ebx\r
+ mov 0x18(%ebp),%eax\r
+ mov 0xc(%ebp),%ebx\r
+ mov 0x10(%ebp),%edx\r
+ mov 0x8(%ebp),%ecx\r
+ mov 0x14(%ebp),%eax\r
+ mov %eax,%esp\r
+ push %edx\r
+ push %ebx\r
+ call *%ecx\r
+ pop %ebx\r
+ leave \r
+ ret \r
+\r
+#SwitchIplStacks ENDP\r
+\r
+\r
+\r
-#------------------------------------------------------------------------------
-#
-# 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
-
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials \r
+# are licensed and made available under the terms and conditions of the BSD License \r
+# which accompanies this distribution. The full text of the license may be found at \r
+# http://opensource.org/licenses/bsd-license.php \r
+# \r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+# \r
+# Module Name:\r
+# ProcessorAsms.S\r
+#\r
+# Abstract:\r
+# This is separated from processor.c to allow this functions to be built with /O1\r
+#\r
+#\r
+#------------------------------------------------------------------------------\r
+#include <EfiBind.h>\r
+\r
+ .text\r
+\r
+.globl ASM_PFX(SwitchStacks)\r
+.globl ASM_PFX(TransferControlSetJump)\r
+.globl ASM_PFX(TransferControlLongJump)\r
+\r
+#\r
+# Routine Description:\r
+# This allows the caller to switch the stack and goes to the new entry point\r
+#\r
+# Arguments:\r
+# EntryPoint - Pointer to the location to enter // rcx\r
+# Parameter - Parameter to pass in // rdx\r
+# NewStack - New Location of the stack // r8\r
+# NewBsp - New BSP // r9 - not used\r
+#\r
+# Returns:\r
+# Nothing. Goes to the Entry Point passing in the new parameters\r
+#\r
+ASM_PFX(SwitchStacks):\r
+\r
+ # Adjust stack for\r
+ # 1) leave 4 registers space\r
+ # 2) let it 16 bytes aligned after call\r
+ sub $0x20,%r8\r
+ and -0x10,%r8w # do not assume 16 bytes aligned\r
+\r
+ mov %r8,%rsp\r
+ mov %rcx,%r10\r
+ mov %rdx,%rcx\r
+ callq *%r10\r
+\r
+ #\r
+ # no ret as we have a new stack and we jumped to the new location\r
+ # \r
+ ret\r
+\r
+#SwitchStacks ENDP\r
+\r
+\r
+.set EFI_SUCCESS, 0\r
+.set EFI_WARN_RETURN_FROM_LONG_JUMP, 5\r
+\r
+#\r
+#Routine Description:\r
+#\r
+# This routine implements the x64 variant of the SetJump call. Its\r
+# responsibility is to store system state information for a possible\r
+# subsequent LongJump.\r
+#\r
+#Arguments:\r
+#\r
+# Pointer to CPU context save buffer.\r
+#\r
+#Returns:\r
+#\r
+# EFI_SUCCESS\r
+#\r
+# EFI_STATUS\r
+# EFIAPI\r
+# TransferControlLongJump (\r
+# IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This,\r
+# IN EFI_JUMP_BUFFER *Jump\r
+# );\r
+#\r
+# rcx - *This\r
+# rdx - JumpBuffer\r
+#\r
+ASM_PFX(TransferControlSetJump):\r
+ mov %rbx,(%rdx)\r
+ mov %rsp,0x8(%rdx)\r
+ mov %rbp,0x10(%rdx)\r
+ mov %rdi,0x18(%rdx)\r
+ mov %rsi,0x20(%rdx)\r
+ mov %r10,0x28(%rdx)\r
+ mov %r11,0x30(%rdx)\r
+ mov %r12,0x38(%rdx)\r
+ mov %r13,0x40(%rdx)\r
+ mov %r14,0x48(%rdx)\r
+ mov %r15,0x50(%rdx)\r
+ #; save non-volatile fp registers\r
+ stmxcsr 0x60(%rdx)\r
+ lea 0x68(%rdx), %rax\r
+ movdqu %xmm6, (%rax) \r
+ movdqu %xmm7, 0x10(%rax)\r
+ movdqu %xmm8, 0x20(%rax)\r
+ movdqu %xmm9, 0x30(%rax)\r
+ movdqu %xmm10, 0x40(%rax)\r
+ movdqu %xmm11, 0x50(%rax)\r
+ movdqu %xmm12, 0x60(%rax)\r
+ movdqu %xmm13, 0x70(%rax)\r
+ movdqu %xmm14, 0x80(%rax)\r
+ movdqu %xmm15, 0x90(%rax)\r
+ mov (%rsp),%rax\r
+ mov %rax,0x58(%rdx)\r
+ mov $0x0,%rax\r
+ retq \r
+\r
+\r
+#\r
+# EFI_STATUS\r
+# EFIAPI\r
+# TransferControlLongJump (\r
+# IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This, // rcx\r
+# IN EFI_JUMP_BUFFER *Jump // rdx\r
+# );\r
+#\r
+#\r
+ASM_PFX(TransferControlLongJump):\r
+ # set return from SetJump to EFI_WARN_RETURN_FROM_LONG_JUMP\r
+ #; load non-volatile fp registers\r
+ ldmxcsr 0x60(%rdx)\r
+ lea 0x68(%rdx), %rax\r
+ movdqu (%rax), %xmm6\r
+ movdqu 0x10(%rax), %xmm7\r
+ movdqu 0x20(%rax), %xmm8\r
+ movdqu 0x30(%rax), %xmm9\r
+ movdqu 0x40(%rax), %xmm10\r
+ movdqu 0x50(%rax), %xmm11\r
+ movdqu 0x60(%rax), %xmm12\r
+ movdqu 0x70(%rax), %xmm13\r
+ movdqu 0x80(%rax), %xmm14\r
+ movdqu 0x90(%rax), %xmm15\r
+ mov $0x5,%rax\r
+ mov (%rdx),%rbx\r
+ mov 0x8(%rdx),%rsp\r
+ mov 0x10(%rdx),%rbp\r
+ mov 0x18(%rdx),%rdi\r
+ mov 0x20(%rdx),%rsi\r
+ mov 0x28(%rdx),%r10\r
+ mov 0x30(%rdx),%r11\r
+ mov 0x38(%rdx),%r12\r
+ mov 0x40(%rdx),%r13\r
+ mov 0x48(%rdx),%r14\r
+ mov 0x50(%rdx),%r15\r
+ add $0x8,%rsp\r
+ jmpq *0x58(%rdx)\r
+ mov $0x5,%rax\r
+ retq \r
+\r
-#------------------------------------------------------------------------------
-#
-# 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
-
-
-
-
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials \r
+# are licensed and made available under the terms and conditions of the BSD License \r
+# which accompanies this distribution. The full text of the license may be found at \r
+# http://opensource.org/licenses/bsd-license.php \r
+# \r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+#\r
+# Module Name:\r
+#\r
+# SupportItpDebug.S\r
+# \r
+# Abstract:\r
+# \r
+# This is the code for debuging X64, to add a break hook at loading every module\r
+#\r
+#------------------------------------------------------------------------------\r
+#include <EfiBind.h>\r
+\r
+ .text\r
+\r
+.globl ASM_PFX(AsmEfiSetBreakSupport)\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# AsmEfiSetBreakSupport (\r
+# IN UINTN LoadAddr // rcx\r
+# )\r
+#------------------------------------------------------------------------------\r
+\r
+ASM_PFX(AsmEfiSetBreakSupport):\r
+\r
+ movw $60000, %dx\r
+ outl %eax, %dx\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ nop\r
+ ret\r
+\r
+\r
+\r
+\r
-#/*++
-#
-#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
+#/*++\r
+#\r
+#Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+#This program and the accompanying materials \r
+#are licensed and made available under the terms and conditions of the BSD License \r
+#which accompanies this distribution. The full text of the license may be found at \r
+#http://opensource.org/licenses/bsd-license.php \r
+ #\r
+#THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+#WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+#\r
+#Module Name:\r
+#\r
+ #CpuFlushCache.c\r
+#\r
+#Abstract:\r
+#\r
+ #Cpu Flush Cache Function.\r
+#\r
+#--*/\r
+#---------------------------------------------------------------------------\r
+#include <EfiBind.h>\r
+\r
+ .586p: \r
+ #.MODEL flat,C\r
+ .code: \r
+\r
+#---------------------------------------------------------------------------\r
+.globl ASM_PFX(EfiCpuFlushCache)\r
+\r
+#\r
+#//\r
+#// Cache Flush Routine.\r
+#//\r
+#EFI_STATUS\r
+#EfiCpuFlushCache (\r
+ #IN EFI_PHYSICAL_ADDRESS Start,\r
+# IN UINT64 Length\r
+ #)\r
+#/*++\r
+#\r
+#Routine Description:\r
+#\r
+ #Flush cache with specified range.\r
+#\r
+#Arguments:\r
+#\r
+ #Start - Start address\r
+# Length - Length in bytes\r
+#\r
+#Returns:\r
+#\r
+ #Status code\r
+# \r
+ #EFI_SUCCESS - success\r
+#\r
+#--*/\r
+ASM_PFX(EfiCpuFlushCache):\r
+ wbinvd\r
+ xorl %eax, %eax\r
+ ret\r
-#------------------------------------------------------------------------------
-#
-# 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
-
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# RuntimeLibAsm.S\r
+#\r
+# Abstract:\r
+#\r
+#\r
+#------------------------------------------------------------------------------\r
+#include <EfiBind.h>\r
+\r
+.text\r
+\r
+.globl ASM_PFX(EfiCpuFlushCache)\r
+#------------------------------------------------------------------------------\r
+#EFI_STATUS\r
+#EfiCpuFlushCache (\r
+# IN EFI_PHYSICAL_ADDRESS Start,\r
+# IN UINT64 Length\r
+# );\r
+#------------------------------------------------------------------------------\r
+\r
+ASM_PFX(EfiCpuFlushCache):\r
+ wbinvd\r
+ mov $0, %rax\r
+ ret\r
+\r
-#*****************************************************************************
-#*
-#* 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
-
+#*****************************************************************************\r
+#*\r
+#* Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+#* This program and the accompanying materials \r
+#* are licensed and made available under the terms and conditions of the BSD License \r
+#* which accompanies this distribution. The full text of the license may be found at \r
+#* http://opensource.org/licenses/bsd-license.php \r
+#* \r
+#* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+#* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+#* \r
+#* Module Name:\r
+#*\r
+#* Fx.S\r
+#* \r
+#* Abstract:\r
+#* \r
+#* AsmFxRestore and AsmFxSave function\r
+#* \r
+#*****************************************************************************\r
+#include <EfiBind.h>\r
+\r
+.globl ASM_PFX(AsmFxSave)\r
+.globl ASM_PFX(AsmFxRestore)\r
+\r
+ .text\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# AsmFxSave (\r
+# OUT IA32_FX_BUFFER *Buffer\r
+# );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmFxSave):\r
+ fxsave (%rcx)\r
+ retq\r
+ \r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# AsmFxRestore (\r
+# IN CONST IA32_FX_BUFFER *Buffer\r
+# );\r
+#------------------------------------------------------------------------------\r
+ASM_PFX(AsmFxRestore):\r
+ fxrstor (%rcx)\r
+ retq\r
+\r
#------------------------------------------------------------------------------\r
# UINTN\r
# AsmGetEflags (\r
-/*++
-
-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:
-
+/*++\r
+\r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
+are licensed and made available under the terms and conditions of the BSD License \r
+which accompanies this distribution. The full text of the license may be found at \r
+http://opensource.org/licenses/bsd-license.php \r
+ \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+\r
+Module Name:\r
+\r
+ VfrCompiler.h\r
+\r
+Abstract:\r
+\r
--*/\r
\r
#ifndef _VFRCOMPILER_H_\r
INT8 PreprocessorOutputFileName[MAX_PATH];\r
INT8 VfrBaseFileName[MAX_PATH]; // name of input VFR file with no path or extension\r
INT8 *IncludePaths;\r
- bool SkipCPreprocessor;
+ bool SkipCPreprocessor;\r
INT8 *CPreprocessorOptions;\r
} OPTIONS;\r
\r
-/*++
-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:
-
+/*++\r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+ VfrSyntax.g\r
+\r
+Abstract:\r
+\r
--*/\r
\r
#header<<\r
#token Inventory("inventory") "inventory"\r
#token NonNvDataMap("_NON_NV_DATA_MAP") "_NON_NV_DATA_MAP"\r
#token Struct("struct") "struct"\r
-#token Boolean("BOOLEAN") "BOOLEAN"
+#token Boolean("BOOLEAN") "BOOLEAN"\r
#token Uint64("UINT64") "UINT64"\r
#token Uint32("UINT32") "UINT32"\r
#token Uint16("UINT16") "UINT16"\r
#token OptionOnlyFlag("OPTIONS_ONLY") "OPTIONS_ONLY"\r
#token Class("class") "class"\r
#token Subclass("subclass") "subclass"\r
-#token ClassGuid("classguid") "classguid"
+#token ClassGuid("classguid") "classguid"\r
#token TypeDef("typedef") "typedef"\r
#token Restore("restore") "restore"\r
#token Save("save") "save"\r
//\r
\r
vfrProgram > [UINT8 Return] :\r
- <<
+ <<\r
mParserStatus = 0;\r
- mConstantOnlyInExpression = FALSE;
+ mConstantOnlyInExpression = FALSE;\r
>>\r
(\r
vfrPragmaPackDefinition\r
;\r
\r
pragmaPackShowDef :\r
- L:"show" << mCVfrVarDataTypeDB.Pack (L->getLine(), VFR_PACK_SHOW); >>
- ;
+ L:"show" << mCVfrVarDataTypeDB.Pack (L->getLine(), VFR_PACK_SHOW); >>\r
+ ;\r
\r
pragmaPackStackDef :\r
- <<
- 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); >>
- ;
-\r
-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
- }
- "\)"
- ;
-
+ <<\r
+ UINT32 LineNum;\r
+ UINT8 PackAction;\r
+ INT8 *Identifier = NULL;\r
+ UINT32 PackNumber = DEFAULT_PACK_ALIGN;\r
+ >>\r
+ (\r
+ L1:"push" << LineNum = L1->getLine(); PackAction = VFR_PACK_PUSH; >>\r
+ | L2:"pop" << LineNum = L2->getLine(); PackAction = VFR_PACK_POP; >>\r
+ )\r
+ {\r
+ "," ID:StringIdentifier << Identifier = ID->getText(); >>\r
+ }\r
+ {\r
+ "," N:Number << PackAction |= VFR_PACK_ASSIGN; PackNumber = _STOU32(N->getText()); >>\r
+ }\r
+ << mCVfrVarDataTypeDB.Pack (LineNum, PackAction, Identifier, PackNumber); >>\r
+ ;\r
+\r
+pragmaPackNumber :\r
+ <<\r
+ UINT32 LineNum;\r
+ UINT32 PackNumber = DEFAULT_PACK_ALIGN;\r
+ >>\r
+ N:Number << LineNum = N->getLine(); PackNumber = _STOU32(N->getText()); >>\r
+ << mCVfrVarDataTypeDB.Pack (LineNum, VFR_PACK_ASSIGN, NULL, PackNumber); >>\r
+ ;\r
+\r
+vfrPragmaPackDefinition :\r
+ "\#pragma" "pack" "\("\r
+ {\r
+ pragmaPackShowDef\r
+ | pragmaPackStackDef\r
+ | pragmaPackNumber\r
+ }\r
+ "\)"\r
+ ;\r
+\r
vfrDataStructDefinition :\r
{ TypeDef } Struct << mCVfrVarDataTypeDB.DeclareDataTypeBegin (); >>\r
{ NonNvDataMap }\r
// the syntax of GUID definition\r
//\r
guidSubDefinition [EFI_GUID &Guid] :\r
- 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\r
<<\r
Guid.Data4[0] = _STOU8(G4->getText());\r
Guid.Data4[1] = _STOU8(G5->getText());\r
Guid.Data4[2] = _STOU8(G6->getText());\r
- 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());\r
+ Guid.Data4[4] = _STOU8(G8->getText());\r
+ Guid.Data4[5] = _STOU8(G9->getText());\r
+ Guid.Data4[6] = _STOU8(G10->getText());\r
+ Guid.Data4[7] = _STOU8(G11->getText());\r
>>\r
;\r
\r
-guidDefinition [EFI_GUID &Guid] :
+guidDefinition [EFI_GUID &Guid] :\r
OpenBrace\r
G1:Number "," G2:Number "," G3:Number ","\r
- <<
- Guid.Data1 = _STOU32 (G1->getText());
- Guid.Data2 = _STOU16 (G2->getText());
- Guid.Data3 = _STOU16 (G3->getText());
- >>
- (
- OpenBrace guidSubDefinition[Guid] CloseBrace
- | guidSubDefinition[Guid]
- )
+ <<\r
+ Guid.Data1 = _STOU32 (G1->getText());\r
+ Guid.Data2 = _STOU16 (G2->getText());\r
+ Guid.Data3 = _STOU16 (G3->getText());\r
+ >>\r
+ (\r
+ OpenBrace guidSubDefinition[Guid] CloseBrace\r
+ | guidSubDefinition[Guid]\r
+ )\r
CloseBrace\r
- ;
-
-//*****************************************************************************
-//
-// the syntax of form set definition
-//
-vfrFormSetDefinition :
+ ;\r
+\r
+//*****************************************************************************\r
+//\r
+// the syntax of form set definition\r
+//\r
+vfrFormSetDefinition :\r
<<\r
EFI_GUID Guid;\r
EFI_GUID DefaultClassGuid = EFI_HII_PLATFORM_SETUP_FORMSET_GUID;\r
EFI_GUID ClassGuids[10];\r
UINT8 ClassGuidNum = 0;\r
CIfrFormSet *FSObj = NULL;\r
- UINT16 C, SC;
+ UINT16 C, SC;\r
>>\r
- 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\r
+ Uuid "=" guidDefinition[Guid] ","\r
+ Title "=" "STRING_TOKEN" "\(" S1:Number "\)" ","\r
+ Help "=" "STRING_TOKEN" "\(" S2:Number "\)" ","\r
+ {\r
+ ClassGuid "=" guidDefinition[ClassGuids[ClassGuidNum]] << ++ClassGuidNum; >>\r
+ (\r
+ "\|" guidDefinition[ClassGuids[ClassGuidNum]] << ++ClassGuidNum; >>\r
+ )*\r
","\r
- }
- <<
- 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);
+ }\r
+ <<\r
+ switch (ClassGuidNum) {\r
+ case 0:\r
+ FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET));\r
+ FSObj->SetClassGuid(&DefaultClassGuid);\r
+ break;\r
+ case 1:\r
+ FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET));\r
+ FSObj->SetClassGuid(&ClassGuids[0]);\r
+ break;\r
+ case 2:\r
+ FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET) + sizeof(EFI_GUID));\r
+ FSObj->SetClassGuid(&ClassGuids[0]);\r
+ FSObj->SetClassGuid(&ClassGuids[1]);\r
+ break;\r
+ default:\r
+ FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET) + 2 * sizeof(EFI_GUID));\r
+ FSObj->SetClassGuid(&ClassGuids[0]);\r
+ FSObj->SetClassGuid(&ClassGuids[1]);\r
+ FSObj->SetClassGuid(&ClassGuids[2]);\r
+ break;\r
+ }\r
+\r
+ SET_LINE_INFO (*FSObj, L);\r
+ FSObj->SetGuid (&Guid);\r
FSObj->SetFormSetTitle (_STOSID(S1->getText()));\r
FSObj->SetHelp (_STOSID(S2->getText()));\r
- >>
+ >>\r
{\r
Class "=" classDefinition[C] "," << {CIfrClass CObj; CObj.SetClass(C);} >>\r
}\r
)\r
{ Key "=" Number "," } // Key is used to assign Varid in Framework VFR but no use in UEFI2.1 VFR\r
{\r
- VarId "=" ID:Number "," <<
- _PCATCH(
+ VarId "=" ID:Number "," <<\r
+ _PCATCH(\r
(INTN)(VarStoreId = _STOU16(ID->getText())) != 0,\r
- (INTN)TRUE,
- ID,
- "varid 0 is not allowed."
- );
- >>
+ (INTN)TRUE,\r
+ ID,\r
+ "varid 0 is not allowed."\r
+ );\r
+ >>\r
}\r
Name "=" SN:StringIdentifier ","\r
Uuid "=" guidDefinition[Guid]\r
;\r
\r
vfrStatementDisableIfFormSet :\r
- <<
+ <<\r
CIfrDisableIf DIObj;\r
- UINT32 ExpOpCount = 0;
- >>
+ UINT32 ExpOpCount = 0;\r
+ >>\r
D:DisableIf << DIObj.SetLineNo(D->getLine()); >>\r
vfrStatementExpression[0, ExpOpCount] ";" << mConstantOnlyInExpression = FALSE; >>\r
vfrFormSetList\r
INT8 *VarStr = NULL;\r
INT8 *SName = NULL;\r
INT8 *TName = NULL;\r
- EFI_IFR_TYPE_VALUE Dummy = {0};
+ EFI_IFR_TYPE_VALUE Dummy = {0};\r
>>\r
(\r
SN1:StringIdentifier << SName = SN1->getText(); _STRCAT(&VarIdStr, SN1->getText()); >>\r
case EFI_VFR_VARSTORE_BUFFER:\r
_PCATCH(mCVfrVarDataTypeDB.GetDataFieldInfo (VarStr, $Info.mInfo.mVarOffset, $Info.mVarType, $Info.mVarTotalSize), SN2->getLine());\r
//_PCATCH(mCVfrDataStorage.BufferVarStoreRequestElementAdd (SName, Info), SN2);\r
- _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 (\r
+ SName,\r
+ NULL),\r
+ SN2->getLine());\r
+ _PCATCH((EFI_VFR_RETURN_CODE)gCVfrBufferConfig.Write (\r
+ 'a',\r
+ SName,\r
+ NULL,\r
+ $Info.mVarType,\r
+ $Info.mInfo.mVarOffset,\r
+ $Info.mVarTotalSize,\r
+ Dummy),\r
+ SN2->getLine());\r
break;\r
case EFI_VFR_VARSTORE_NAME:\r
default: break;\r
OpenBracket I1:Number CloseBracket << _STRCAT(&VarIdStr, "["); _STRCAT(&VarIdStr, I1->getText()); _STRCAT(&VarIdStr, "]"); >>\r
<< mCVfrQuestionDB.GetQuestionId (NULL, VarIdStr, $QId, $Mask); >>\r
) <<\r
- if (mConstantOnlyInExpression) {
- _PCATCH(VFR_RETURN_CONSTANT_ONLY, LineNo);
- }
- >>
+ if (mConstantOnlyInExpression) {\r
+ _PCATCH(VFR_RETURN_CONSTANT_ONLY, LineNo);\r
+ }\r
+ >>\r
|\r
(\r
SN2:StringIdentifier << _STRCAT (&VarIdStr, SN2->getText()); LineNo = SN2->getLine(); >>\r
)*\r
<< mCVfrQuestionDB.GetQuestionId (NULL, VarIdStr, $QId, $Mask); >>\r
) <<\r
- if (mConstantOnlyInExpression) {
- _PCATCH(VFR_RETURN_CONSTANT_ONLY, LineNo);
- }
- >>
+ if (mConstantOnlyInExpression) {\r
+ _PCATCH(VFR_RETURN_CONSTANT_ONLY, LineNo);\r
+ }\r
+ >>\r
;\r
\r
vfrConstantValueField[UINT8 Type] > [EFI_IFR_TYPE_VALUE Value] :\r
;\r
\r
vfrStatementRules :\r
- <<
+ << \r
CIfrRule RObj;\r
- UINT32 ExpOpCount = 0;
- >>
+ UINT32 ExpOpCount = 0;\r
+ >>\r
R:Rule << RObj.SetLineNo(R->getLine()); >>\r
S1:StringIdentifier "," <<\r
mCVfrRulesDB.RegisterRule (S1->getText());\r
(\r
vfrStatementValue "," << IsExp = TRUE; DObj.SetScope (1); CIfrEnd EndObj1; EndObj1.SetLineNo(D->getLine()); >>\r
| "=" vfrConstantValueField[_GET_CURRQEST_DATATYPE()] > [Val] "," << \r
- 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()) {\r
+ //check default value is valid for Numeric Opcode\r
+ if (Val.u64 < gCurrentMinMaxData->GetMinData(_GET_CURRQEST_DATATYPE()) || Val.u64 > gCurrentMinMaxData->GetMaxData(_GET_CURRQEST_DATATYPE())) {\r
+ _PCATCH (VFR_RETURN_INVALID_PARAMETER, D->getLine(), "Numeric default value must be between MinValue and MaxValue.");\r
+ }\r
+ }\r
DObj.SetType (_GET_CURRQEST_DATATYPE()); \r
- DObj.SetValue(Val);
- >>
+ DObj.SetValue(Val);\r
+ >>\r
)\r
{\r
DefaultStore "=" SN:StringIdentifier "," << _PCATCH(mCVfrDefaultStore.GetDefaultId (SN->getText(), &DefaultId), SN); DObj.SetDefaultId (DefaultId); >>\r
_GET_CURRQEST_VARTINFO(),\r
VarStoreName,\r
_GET_CURRQEST_DATATYPE (),\r
- Val),
+ Val),\r
D->getLine()\r
- );
+ );\r
}\r
>>\r
)\r
;\r
\r
vfrStatementValue :\r
- <<
+ << \r
CIfrValue VObj;\r
- UINT32 ExpOpCount = 0;
- >>
+ UINT32 ExpOpCount = 0;\r
+ >>\r
V:Value << VObj.SetLineNo(V->getLine()); >>\r
"=" vfrStatementExpression[0, ExpOpCount]\r
- << { CIfrEnd EndObj; EndObj.SetLineNo(0); } >>
+ << { CIfrEnd EndObj; EndObj.SetLineNo(0); } >>\r
;\r
\r
vfrStatementSubTitle :\r
<<\r
if (Flags & EFI_IFR_FLAG_CALLBACK) {\r
CIfrAction AObj;\r
- AObj.SetLineNo (T->getLine());
+ AObj.SetLineNo (T->getLine());\r
mCVfrQuestionDB.RegisterQuestion (NULL, NULL, QId);\r
AObj.SetQuestionId (QId);\r
AObj.SetPrompt (_STOSID(S2->getText()));\r
vfrStatementCheckBox :\r
<<\r
CIfrCheckBox CBObj;\r
- EFI_IFR_TYPE_VALUE Val = {0};
- INT8 *VarStoreName = NULL;
+ EFI_IFR_TYPE_VALUE Val = {0};\r
+ INT8 *VarStoreName = NULL;\r
>>\r
L:CheckBox << CBObj.SetLineNo(L->getLine()); >>\r
vfrQuestionHeader[CBObj] ","\r
- {
+ {\r
F:FLAGS "=" vfrCheckBoxFlags[CBObj, F->getLine()] ","\r
- <<
- _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"
- );
- }
- >>
- }
+ <<\r
+ _PCATCH(mCVfrDataStorage.GetVarStoreName (_GET_CURRQEST_VARTINFO().mVarStoreId, &VarStoreName), VFR_RETURN_SUCCESS, L, "Failed to retrieve varstore name");\r
+ Val.b = TRUE;\r
+ if (CBObj.GetFlags () & 0x01) {\r
+ _PCATCH(\r
+ mCVfrDefaultStore.BufferVarStoreAltConfigAdd (\r
+ EFI_HII_DEFAULT_CLASS_STANDARD,\r
+ _GET_CURRQEST_VARTINFO(),\r
+ VarStoreName,\r
+ _GET_CURRQEST_DATATYPE (),\r
+ Val\r
+ ),\r
+ VFR_RETURN_SUCCESS,\r
+ L,\r
+ "No standard default storage found"\r
+ );\r
+ }\r
+ if (CBObj.GetFlags () & 0x02) {\r
+ _PCATCH(\r
+ mCVfrDefaultStore.BufferVarStoreAltConfigAdd (\r
+ EFI_HII_DEFAULT_CLASS_MANUFACTURING,\r
+ _GET_CURRQEST_VARTINFO(),\r
+ VarStoreName,\r
+ _GET_CURRQEST_DATATYPE (),\r
+ Val\r
+ ),\r
+ VFR_RETURN_SUCCESS,\r
+ L,\r
+ "No manufacturing default storage found"\r
+ );\r
+ }\r
+ >>\r
+ }\r
{\r
Key "=" KN:Number "," << AssignQuestionKey (CBObj, KN); >>\r
}\r
<<\r
UINT8 LFlags = _GET_CURRQEST_DATATYPE() & EFI_IFR_NUMERIC_SIZE;\r
UINT8 HFlags = 0;\r
- EFI_VFR_VARSTORE_TYPE VarStoreType = EFI_VFR_VARSTORE_INVALID;
+ EFI_VFR_VARSTORE_TYPE VarStoreType = EFI_VFR_VARSTORE_INVALID;\r
>>\r
numericFlagsField[HFlags, LFlags] ( "\|" numericFlagsField[HFlags, LFlags] )*\r
- <<
- //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;
- }
+ <<\r
+ //check data type flag\r
+ VarStoreType = mCVfrDataStorage.GetVarStoreType (_GET_CURRQEST_VARTINFO().mVarStoreId);\r
+ if (VarStoreType == EFI_VFR_VARSTORE_BUFFER || VarStoreType == EFI_VFR_VARSTORE_EFI) {\r
+ if (_GET_CURRQEST_DATATYPE() != (LFlags & EFI_IFR_NUMERIC_SIZE)) {\r
+ _PCATCH(VFR_RETURN_INVALID_PARAMETER, LineNum, "Numeric Flag is not same to Numeric VarData type");\r
+ }\r
+ } else {\r
+ // update data type for name/value store\r
+ UINT32 DataTypeSize;\r
+ _GET_CURRQEST_VARTINFO().mVarType = LFlags & EFI_IFR_NUMERIC_SIZE;\r
+ mCVfrVarDataTypeDB.GetDataTypeSize (_GET_CURRQEST_DATATYPE(), &DataTypeSize);\r
+ _GET_CURRQEST_VARTINFO().mVarTotalSize = DataTypeSize;\r
+ }\r
_PCATCH(NObj.SetFlags (HFlags, LFlags), LineNum);\r
- >>
+ >>\r
;\r
\r
numericFlagsField [UINT8 & HFlags, UINT8 & LFlags] :\r
| "NUMERIC_SIZE_1" << $LFlags = ($LFlags & ~EFI_IFR_NUMERIC_SIZE) | EFI_IFR_NUMERIC_SIZE_1; >>\r
| "NUMERIC_SIZE_2" << $LFlags = ($LFlags & ~EFI_IFR_NUMERIC_SIZE) | EFI_IFR_NUMERIC_SIZE_2; >>\r
| "NUMERIC_SIZE_4" << $LFlags = ($LFlags & ~EFI_IFR_NUMERIC_SIZE) | EFI_IFR_NUMERIC_SIZE_4; >>\r
- | "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; >>\r
+ | "DISPLAY_INT_DEC" << $LFlags = ($LFlags & ~EFI_IFR_DISPLAY) | EFI_IFR_DISPLAY_INT_DEC; >>\r
+ | "DISPLAY_UINT_DEC" << $LFlags = ($LFlags & ~EFI_IFR_DISPLAY) | EFI_IFR_DISPLAY_UINT_DEC; >>\r
+ | "DISPLAY_UINT_HEX" << $LFlags = ($LFlags & ~EFI_IFR_DISPLAY) | EFI_IFR_DISPLAY_UINT_HEX; >>\r
| questionheaderFlagsField[HFlags]\r
;\r
\r
<<\r
UINT8 LFlags = _GET_CURRQEST_DATATYPE() & EFI_IFR_NUMERIC_SIZE;\r
UINT8 HFlags = 0;\r
- EFI_VFR_VARSTORE_TYPE VarStoreType = EFI_VFR_VARSTORE_INVALID;
+ EFI_VFR_VARSTORE_TYPE VarStoreType = EFI_VFR_VARSTORE_INVALID;\r
>>\r
numericFlagsField[HFlags, LFlags] ( "\|" numericFlagsField[HFlags, LFlags] )*\r
- <<
- //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;
- }
+ <<\r
+ //check data type flag\r
+ VarStoreType = mCVfrDataStorage.GetVarStoreType (_GET_CURRQEST_VARTINFO().mVarStoreId);\r
+ if (VarStoreType == EFI_VFR_VARSTORE_BUFFER || VarStoreType == EFI_VFR_VARSTORE_EFI) {\r
+ if (_GET_CURRQEST_DATATYPE() != (LFlags & EFI_IFR_NUMERIC_SIZE)) {\r
+ _PCATCH(VFR_RETURN_INVALID_PARAMETER, LineNum, "Numeric Flag is not same to Numeric VarData type");\r
+ }\r
+ } else {\r
+ // update data type for Name/Value store\r
+ UINT32 DataTypeSize;\r
+ _GET_CURRQEST_VARTINFO().mVarType = LFlags & EFI_IFR_NUMERIC_SIZE;\r
+ mCVfrVarDataTypeDB.GetDataTypeSize (_GET_CURRQEST_DATATYPE(), &DataTypeSize);\r
+ _GET_CURRQEST_VARTINFO().mVarTotalSize = DataTypeSize;\r
+ }\r
_PCATCH(OObj.SetFlags (HFlags, LFlags), LineNum);\r
- >>
+ >>\r
;\r
\r
vfrStatementStringType :\r
;\r
\r
vfrStatementDisableIfStat :\r
- <<
+ <<\r
CIfrDisableIf DIObj;\r
- UINT32 ExpOpCount = 0;
- >>
+ UINT32 ExpOpCount = 0;\r
+ >>\r
L:DisableIf << DIObj.SetLineNo(L->getLine()); >>\r
vfrStatementExpression[0, ExpOpCount] ";" << mConstantOnlyInExpression = FALSE; >>\r
( vfrStatementStatList )*\r
;\r
\r
vfrStatementSuppressIfStat :\r
- <<
+ <<\r
CIfrSuppressIf SIObj;\r
- UINT32 ExpOpCount = 0;
- >>
+ UINT32 ExpOpCount = 0;\r
+ >>\r
L:SuppressIf << SIObj.SetLineNo(L->getLine()); >>\r
{ FLAGS "=" flagsField ( "\|" flagsField )* "," }\r
vfrStatementExpression[0, ExpOpCount] ";"\r
;\r
\r
vfrStatementGrayOutIfStat :\r
- <<
+ <<\r
CIfrGrayOutIf GOIObj;\r
- UINT32 ExpOpCount = 0;
- >>
+ UINT32 ExpOpCount = 0;\r
+ >>\r
L:GrayOutIf << GOIObj.SetLineNo(L->getLine()); >>\r
{ FLAGS "=" flagsField ( "\|" flagsField )* "," }\r
vfrStatementExpression[0, ExpOpCount]\r
;\r
\r
vfrStatementInconsistentIf :\r
- <<
+ <<\r
CIfrInconsistentIf IIObj;\r
- UINT32 ExpOpCount = 0;
- >>
+ UINT32 ExpOpCount = 0;\r
+ >>\r
L:InconsistentIf << IIObj.SetLineNo(L->getLine()); >>\r
Prompt "=" "STRING_TOKEN" "\(" S:Number "\)" "," << IIObj.SetError (_STOSID(S->getText())); >>\r
{ FLAGS "=" flagsField ( "\|" flagsField )* "," }\r
;\r
\r
vfrStatementNoSubmitIf :\r
- <<
+ <<\r
CIfrNoSubmitIf NSIObj;\r
- UINT32 ExpOpCount = 0;
- >>
+ UINT32 ExpOpCount = 0;\r
+ >>\r
L:NoSubmitIf << NSIObj.SetLineNo(L->getLine()); >>\r
Prompt "=" "STRING_TOKEN" "\(" S:Number "\)" "," << NSIObj.SetError (_STOSID(S->getText())); >>\r
{ FLAGS "=" flagsField ( "\|" flagsField )* "," }\r
;\r
\r
vfrStatementDisableIfQuest :\r
- <<
+ <<\r
CIfrDisableIf DIObj;\r
- UINT32 ExpOpCount = 0;
- >>
+ UINT32 ExpOpCount = 0;\r
+ >>\r
L:DisableIf << DIObj.SetLineNo(L->getLine()); >>\r
vfrStatementExpression[0, ExpOpCount] ";" << mConstantOnlyInExpression = FALSE; >>\r
vfrStatementQuestionOptionList\r
;\r
\r
vfrStatementSuppressIfQuest :\r
- <<
+ <<\r
CIfrSuppressIf SIObj;\r
- UINT32 ExpOpCount = 0;
- >>
+ UINT32 ExpOpCount = 0;\r
+ >>\r
L:SuppressIf << SIObj.SetLineNo(L->getLine()); >>\r
{ FLAGS "=" flagsField ( "\|" flagsField )* "," }\r
vfrStatementExpression[0, ExpOpCount] ";"\r
L:Option << OOOObj.SetLineNo(L->getLine()); >>\r
Text "=" "STRING_TOKEN" "\(" S:Number "\)" "," << OOOObj.SetOption (_STOSID(S->getText())); >>\r
Value "=" vfrConstantValueField[_GET_CURRQEST_DATATYPE()] >[Val] "," \r
- <<
- 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);
- >>
+ << \r
+ if (gCurrentMinMaxData != NULL) {\r
+ //set min/max value for oneof opcode\r
+ UINT64 Step = gCurrentMinMaxData->GetStepData(_GET_CURRQEST_DATATYPE());\r
+ switch (_GET_CURRQEST_DATATYPE()) {\r
+ case EFI_IFR_TYPE_NUM_SIZE_64:\r
+ gCurrentMinMaxData->SetMinMaxStepData(Val.u64, Val.u64, Step);\r
+ break;\r
+ case EFI_IFR_TYPE_NUM_SIZE_32:\r
+ gCurrentMinMaxData->SetMinMaxStepData(Val.u32, Val.u32, (UINT32) Step);\r
+ break;\r
+ case EFI_IFR_TYPE_NUM_SIZE_16:\r
+ gCurrentMinMaxData->SetMinMaxStepData(Val.u16, Val.u16, (UINT16) Step);\r
+ break;\r
+ case EFI_IFR_TYPE_NUM_SIZE_8:\r
+ gCurrentMinMaxData->SetMinMaxStepData(Val.u8, Val.u8, (UINT8) Step);\r
+ break;\r
+ default:\r
+ break;\r
+ }\r
+ }\r
+ OOOObj.SetType (_GET_CURRQEST_DATATYPE()); \r
+ OOOObj.SetValue (Val); \r
+ >>\r
F:FLAGS "=" vfrOneOfOptionFlags[OOOObj, F->getLine()]\r
<<\r
if (OOOObj.GetFlags () & 0x10) {\r
;\r
\r
vfrStatementInvalidInconsistentIf :\r
- << UINT32 ExpOpCount = 0; >>
+ << UINT32 ExpOpCount = 0; >>\r
InconsistentIf\r
Prompt "=" "STRING_TOKEN" "\(" S:Number "\)" ","\r
{ FLAGS "=" flagsField ( "\|" flagsField )* "," }\r
L3:"%" castTerm[$RootLevel, $ExpOpCount] << $ExpOpCount++; CIfrModulo MObj(L3->getLine()); >>\r
)\r
)*\r
- ;
-
-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;
- }
- >>
+ ;\r
+\r
+castTerm [UINT32 & RootLevel, UINT32 & ExpOpCount]:\r
+ << UINT8 CastType = 0xFF; >>\r
+ (\r
+ L:"\("\r
+ (\r
+ Boolean << CastType = 0; >>\r
+ | Uint64 << CastType = 1; >>\r
+ | Uint32 << CastType = 1; >>\r
+ | Uint16 << CastType = 1; >>\r
+ | Uint8 << CastType = 1; >>\r
+ )\r
+ "\)"\r
+ )*\r
+ atomTerm[$RootLevel, $ExpOpCount]\r
+ <<\r
+ switch (CastType) {\r
+ case 0: { CIfrToBoolean TBObj(L->getLine()); $ExpOpCount++; } break;\r
+ case 1: { CIfrToUint TUObj(L->getLine()); $ExpOpCount++; } break;\r
+ }\r
+ >>\r
;\r
\r
atomTerm [UINT32 & RootLevel, UINT32 & ExpOpCount]:\r
| bitwisenotExp[$RootLevel, $ExpOpCount]\r
| question2refExp[$RootLevel, $ExpOpCount]\r
| stringref2Exp[$RootLevel, $ExpOpCount]\r
- | toboolExp[$RootLevel, $ExpOpCount]
+ | toboolExp[$RootLevel, $ExpOpCount]\r
| unintExp[$RootLevel, $ExpOpCount]\r
| toupperExp[$RootLevel, $ExpOpCount]\r
| tolwerExp[$RootLevel, $ExpOpCount]\r
<<\r
private:\r
UINT8 mParserStatus;\r
- BOOLEAN mConstantOnlyInExpression;
+ BOOLEAN mConstantOnlyInExpression;\r
\r
CVfrDefaultStore mCVfrDefaultStore;\r
CVfrVarDataTypeDB mCVfrVarDataTypeDB;\r
\r
UINT8 _GET_CURRQEST_DATATYPE ();\r
UINT32 _GET_CURRQEST_VARSIZE ();\r
- UINT32 _GET_CURRQEST_ARRAY_SIZE ();
+ UINT32 _GET_CURRQEST_ARRAY_SIZE ();\r
\r
public:\r
VOID _PCATCH (IN INTN, IN INTN, IN ANTLRTokenPtr, IN INT8 *);\r
VOID _PCATCH (IN EFI_VFR_RETURN_CODE);\r
VOID _PCATCH (IN EFI_VFR_RETURN_CODE, IN ANTLRTokenPtr);\r
VOID _PCATCH (IN EFI_VFR_RETURN_CODE, IN UINT32);\r
- VOID _PCATCH (IN EFI_VFR_RETURN_CODE, IN UINT32, IN INT8 *);
+ VOID _PCATCH (IN EFI_VFR_RETURN_CODE, IN UINT32, IN INT8 *);\r
\r
VOID syn (ANTLRAbstractToken *, ANTLRChar *, SetWordType *, ANTLRTokenType, INT32);\r
\r
return mCurrQestVarInfo.mVarTotalSize;\r
}\r
\r
-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\r
+EfiVfrParser::_GET_CURRQEST_ARRAY_SIZE (\r
+ VOID\r
+ )\r
+{\r
+ UINT8 Size = 1;\r
+\r
+ switch (mCurrQestVarInfo.mVarType) {\r
+ case EFI_IFR_TYPE_NUM_SIZE_8:\r
+ Size = 1;\r
+ break;\r
+\r
+ case EFI_IFR_TYPE_NUM_SIZE_16:\r
+ Size = 2;\r
+ break;\r
+\r
+ case EFI_IFR_TYPE_NUM_SIZE_32:\r
+ Size = 4;\r
+ break;\r
+\r
+ case EFI_IFR_TYPE_NUM_SIZE_64:\r
+ Size = 8;\r
+ break;\r
+\r
+ default:\r
+ break;\r
+ }\r
+\r
+ return (mCurrQestVarInfo.mVarTotalSize / Size);\r
+}\r
+\r
VOID\r
EfiVfrParser::_PCATCH (\r
IN INTN ReturnCode,\r
)\r
{\r
mParserStatus += gCVfrErrorHandle.HandleError (ReturnCode, LineNum);\r
-}
-
-VOID
-EfiVfrParser::_PCATCH (
- IN EFI_VFR_RETURN_CODE ReturnCode,
- IN UINT32 LineNum,
- IN INT8 *ErrorMsg
- )
-{
- mParserStatus = mParserStatus + gCVfrErrorHandle.HandleError (ReturnCode, LineNum, ErrorMsg);
+}\r
+\r
+VOID\r
+EfiVfrParser::_PCATCH (\r
+ IN EFI_VFR_RETURN_CODE ReturnCode,\r
+ IN UINT32 LineNum,\r
+ IN INT8 *ErrorMsg\r
+ )\r
+{\r
+ mParserStatus = mParserStatus + gCVfrErrorHandle.HandleError (ReturnCode, LineNum, ErrorMsg);\r
}\r
\r
VOID\r