summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-11 03:36:07 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-11 03:36:07 +0000
commit7b414b4ed6ccdefce8e167ecc7d67ad64118eb94 (patch)
tree8ac9f25a508ec3f38ee50c3d43a1282c06605330 /MdeModulePkg/Universal
parent987da598355ba96e9eb8b78fc4bdca4c3faedfe5 (diff)
downloadedk2-platforms-7b414b4ed6ccdefce8e167ecc7d67ad64118eb94.tar.xz
1. add public functions header.
2. apply for doxgen format for file header. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5043 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.S59
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.asm27
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/ipf/AsmFuncs.s94
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/ipf/Ds64Macros.i37
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/ipf/common.i37
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/x64/AsmFuncs.S41
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/x64/AsmFuncs.asm27
-rw-r--r--MdeModulePkg/Universal/DriverSampleDxe/Inventory.vfr28
-rw-r--r--MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr30
-rw-r--r--MdeModulePkg/Universal/EbcDxe/Ia32/EbcLowLevel.S34
-rw-r--r--MdeModulePkg/Universal/EbcDxe/Ia32/EbcLowLevel.asm63
-rw-r--r--MdeModulePkg/Universal/EbcDxe/Ipf/EbcLowLevel.s63
-rw-r--r--MdeModulePkg/Universal/EbcDxe/x64/EbcLowLevel.S48
-rw-r--r--MdeModulePkg/Universal/EbcDxe/x64/EbcLowLevel.asm60
14 files changed, 292 insertions, 356 deletions
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.S b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.S
index 0dddb3b550..965828cf56 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.S
+++ b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.S
@@ -1,15 +1,16 @@
-#******************************************************************************
-#*
-#* Copyright (c) 2006, Intel Corporation
-#* All rights reserved. This program and the accompanying materials
-#* are licensed and made available under the terms and conditions of the BSD License
-#* which accompanies this distribution. The full text of the license may be found at
-#* http://opensource.org/licenses/bsd-license.php
-#*
-#* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-#* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#*
-#******************************************************************************
+#/**@file
+# Low leve IA32 specific debug support functions.
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+#**/
.globl ASM_PFX(OrigVector)
.globl ASM_PFX(InterruptEntryStub)
@@ -29,12 +30,12 @@ ASM_PFX(StubSize): .long ASM_PFX(InterruptEntryStubEnd) - ASM_PFX(Interr
ASM_PFX(FxStorSupport):
push %ebx
mov $0x1,%eax
- cpuid
+ cpuid
mov %edx,%eax
and $0x1000000,%eax
shr $0x18,%eax
pop %ebx
- ret
+ ret
.globl ASM_PFX(GetIdtr)
ASM_PFX(GetIdtr):
@@ -43,25 +44,25 @@ ASM_PFX(GetIdtr):
add $0xfffffff8,%esp
sidtl 0xfffffffa(%ebp)
mov 0xfffffffc(%ebp),%eax
- leave
- ret
+ leave
+ ret
.globl ASM_PFX(WriteInterruptFlag)
ASM_PFX(WriteInterruptFlag):
push %ebp
mov %esp,%ebp
- pushf
+ pushf
pop %eax
and $0x200,%eax
shr $0x9,%eax
mov 0x8(%ebp),%ecx
or %cl,%cl
jne ASM_PFX(WriteInterruptFlag+0x17)
- cli
+ cli
jmp ASM_PFX(WriteInterruptFlag+0x18)
- sti
- leave
- ret
+ sti
+ leave
+ ret
.globl ASM_PFX(Vect2Desc)
ASM_PFX(Vect2Desc):
@@ -74,8 +75,8 @@ ASM_PFX(Vect2Desc):
movw $0x8e00,0x4(%ecx)
shr $0x10,%eax
mov %ax,0x6(%ecx)
- leave
- ret
+ leave
+ ret
.globl ASM_PFX(InterruptEntryStub)
ASM_PFX(InterruptEntryStub):
@@ -88,8 +89,8 @@ ASM_PFX(InterruptEntryStubEnd):
.globl ASM_PFX(CommonIdtEntry)
ASM_PFX(CommonIdtEntry):
- pusha
- pushf
+ pusha
+ pushf
pop %eax
mov %eax,0x0
cmpl $0x8,0x0
@@ -259,12 +260,12 @@ ASM_PFX(CommonIdtEntry):
push %ebx
push %cs
push $0x0
- iret
+ iret
PhonyIretd:
- popa
+ popa
mov 0x0,%esp
jmp *0x0
- popa
+ popa
mov 0x0,%esp
- iret
+ iret
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.asm b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.asm
index 28a43cfe63..315120ef94 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.asm
+++ b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.asm
@@ -1,15 +1,16 @@
-;******************************************************************************
-;*
-;* Copyright (c) 2006, Intel Corporation
-;* All rights reserved. This program and the accompanying materials
-;* are licensed and made available under the terms and conditions of the BSD License
-;* which accompanies this distribution. The full text of the license may be found at
-;* http://opensource.org/licenses/bsd-license.php
-;*
-;* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-;* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-;*
-;******************************************************************************
+;/** @file
+; Low leve IA32 specific debug support functions.
+;
+; Copyright (c) 2006, Intel Corporation. <BR>
+; All rights reserved. This program and the accompanying materials
+; are licensed and made available under the terms and conditions of the BSD License
+; which accompanies this distribution. The full text of the license may be found at
+; http://opensource.org/licenses/bsd-license.php
+;
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+;
+;**/
.586p
.MODEL FLAT, C
@@ -95,7 +96,7 @@ OrigVector dd 66666666h ; ?
align 16
DebugStackEnd db "DbgStkEnd >>>>>>" ;; 16 byte long string - must be 16 bytes to preserve alignment
dd 1ffdh dup (000000000h) ;; 32K should be enough stack
- ;; This allocation is coocked to insure
+ ;; This allocation is coocked to insure
;; that the the buffer for the FXSTORE instruction
;; will be 16 byte aligned also.
;;
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/ipf/AsmFuncs.s b/MdeModulePkg/Universal/DebugSupportDxe/ipf/AsmFuncs.s
index 866e5db9a8..23a5eb487f 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/ipf/AsmFuncs.s
+++ b/MdeModulePkg/Universal/DebugSupportDxe/ipf/AsmFuncs.s
@@ -1,24 +1,18 @@
-//++
-// Copyright (c) 2006, Intel Corporation
-// All rights reserved. This program and the accompanying materials
-// are licensed and made available under the terms and conditions of the BSD License
-// which accompanies this distribution. The full text of the license may be found at
-// http://opensource.org/licenses/bsd-license.php
-//
-// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-//
-// Module Name:
-//
-// AsmFuncs.s
-//
-// Abstract:
-//
-// Low level IPF routines used by the debug support driver
-//
-// Revision History:
-//
-//--
+/// @file
+/// Low level IPF routines used by the debug support driver
+///
+/// Copyright (c) 2006, Intel Corporation
+/// All rights reserved. This program and the accompanying materials
+/// are licensed and made available under the terms and conditions of the BSD License
+/// which accompanies this distribution. The full text of the license may be found at
+/// http://opensource.org/licenses/bsd-license.php
+///
+/// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+/// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+///
+/// Module Name: AsmFuncs.s
+///
+///
#include "common.i"
@@ -127,32 +121,32 @@ LoopBack: // $L143:
// our chained handler installed:
//
//
-//
-//
-//
-// This IVT entry is Failsafe bundle
-// reserved by the
-// Itanium architecture Original bundle 0
-// and is used for
-// for locating our
-// handler and the
-// original bundle Patch code...
-// zero of the ext
-// interrupt handler
-//
-// RSVD (3400) Unused
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
+//
+//
+//
+// This IVT entry is Failsafe bundle
+// reserved by the
+// Itanium architecture Original bundle 0
+// and is used for
+// for locating our
+// handler and the
+// original bundle Patch code...
+// zero of the ext
+// interrupt handler
+//
+// RSVD (3400) Unused
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
// EXT_INT (3000) Bundle 0 Bundle zero - This one is
// modified, all other bundles
// in the EXT_INT entry are
@@ -430,7 +424,7 @@ RelocateSlot:
add loc3=loc2, in1;; // loc3 = physical address of branch target
(p14) sub loc2=r0,loc2;; // flip sign in loc2 if offset is negative
sub loc4=loc3,in2;; // loc4 = relative offset from new ip to branch target
- cmp.lt p15, p14 = 0, loc4;; // get new sign bit
+ cmp.lt p15, p14 = 0, loc4;; // get new sign bit
(p14) sub loc5=r0,loc4 // get absolute value of offset
(p15) mov loc5=loc4;;
movl loc6=0x0FFFFFF;; // maximum offset in bytes for ip-rel branch
@@ -1230,7 +1224,7 @@ HookHandler:
// the backing store. The processor, however may not be aware that the
// stacked registers need to be reloaded from the backing store. Therefore,
// we explicitly cause the RSE to refresh the stacked register's contents
- // from the backing store.
+ // from the backing store.
mov loc0=ar.rsc // get RSC value
mov loc1=ar.rsc // save it so we can restore it
movl loc3=0xffffffffc000ffff;; // create mask for clearing RSC.loadrs
@@ -1307,7 +1301,7 @@ PatchCode:
movl SCRATCH_REG1 = ~( MASK(PSR_DT,1) | MASK(PSR_RT,1));;
and SCRATCH_REG1 = SCRATCH_REG0, SCRATCH_REG1;;
mov psr.l = SCRATCH_REG1;;
- srlz.d
+ srlz.d
tbit.z p14, p15 = SCRATCH_REG6, PSR_IS;; // Check to see if we were
// interrupted from IA32
// context. If so, bail out
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/ipf/Ds64Macros.i b/MdeModulePkg/Universal/DebugSupportDxe/ipf/Ds64Macros.i
index 6088ce70fd..7316e199b5 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/ipf/Ds64Macros.i
+++ b/MdeModulePkg/Universal/DebugSupportDxe/ipf/Ds64Macros.i
@@ -1,24 +1,19 @@
-//++
-// Copyright (c) 2006, Intel Corporation
-// All rights reserved. This program and the accompanying materials
-// are licensed and made available under the terms and conditions of the BSD License
-// which accompanies this distribution. The full text of the license may be found at
-// http://opensource.org/licenses/bsd-license.php
-//
-// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-//
-// Module Name:
-//
-// Ds64Macros.i
-//
-// Abstract:
-//
-// This is set of macros used in calculating offsets in the IVT
-//
-// Revision History:
-//
-//--
+/// @file
+/// This is set of macros used in calculating offsets in the IVT.
+///
+/// Copyright (c) 2006, Intel Corporation
+/// All rights reserved. This program and the accompanying materials
+/// are licensed and made available under the terms and conditions of the BSD License
+/// which accompanies this distribution. The full text of the license may be found at
+/// http://opensource.org/licenses/bsd-license.php
+///
+/// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+/// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+///
+/// Module Name: Ds64Macros.i
+///
+///
+
#define EXCPT_EXTERNAL_INTERRUPT 12
#define MASK_0_4 0x000000000000001F // mask bits 0 through 4
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/ipf/common.i b/MdeModulePkg/Universal/DebugSupportDxe/ipf/common.i
index a7b571b308..77cfed2b57 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/ipf/common.i
+++ b/MdeModulePkg/Universal/DebugSupportDxe/ipf/common.i
@@ -1,24 +1,19 @@
-//++
-// Copyright (c) 2006, Intel Corporation
-// All rights reserved. This program and the accompanying materials
-// are licensed and made available under the terms and conditions of the BSD License
-// which accompanies this distribution. The full text of the license may be found at
-// http://opensource.org/licenses/bsd-license.php
-//
-// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-//
-// Module Name:
-//
-// Common.i
-//
-// Abstract:
-//
-// This is set of useful macros
-//
-// Revision History:
-//
-//--
+/// @file
+/// This is set of useful macros.
+///
+/// Copyright (c) 2006, Intel Corporation
+/// All rights reserved. This program and the accompanying materials
+/// are licensed and made available under the terms and conditions of the BSD License
+/// which accompanies this distribution. The full text of the license may be found at
+/// http://opensource.org/licenses/bsd-license.php
+///
+/// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+/// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+///
+/// Module Name: common.i
+///
+///
+
#define NESTED_SETUP(i,l,o,r) \
alloc loc1=ar##.##pfs,i,l,o,r ; \
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/x64/AsmFuncs.S b/MdeModulePkg/Universal/DebugSupportDxe/x64/AsmFuncs.S
index fb08ce0a69..087e5490bb 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/x64/AsmFuncs.S
+++ b/MdeModulePkg/Universal/DebugSupportDxe/x64/AsmFuncs.S
@@ -1,15 +1,16 @@
-#******************************************************************************
-#*
-#* Copyright (c) 2007, Intel Corporation
-#* All rights reserved. This program and the accompanying materials
-#* are licensed and made available under the terms and conditions of the BSD License
-#* which accompanies this distribution. The full text of the license may be found at
-#* http://opensource.org/licenses/bsd-license.php
-#*
-#* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-#* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#*
-#******************************************************************************
+#/**@file
+# Low leve x64 specific debug support functions.
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+#**/
.globl _OrigVector
.globl _InterruptEntryStub
@@ -27,31 +28,31 @@ _StubSize: .long _InterruptEntryStubEnd - _InterruptEntryStub
.globl _FxStorSupport
_FxStorSupport:
- ret
+ ret
.globl _GetIdtr
_GetIdtr:
- ret
+ ret
.globl _WriteInterruptFlag
_WriteInterruptFlag:
- ret
+ ret
.globl _Vect2Desc
_Vect2Desc:
- ret
+ ret
.globl _InterruptEntryStub
_InterruptEntryStub:
- ret
+ ret
.globl _InterruptEntryStubEnd
_InterruptEntryStubEnd:
- ret
+ ret
.globl _CommonIdtEntry
_CommonIdtEntry:
- ret
+ ret
PhonyIretd:
- iret
+ iret
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/x64/AsmFuncs.asm b/MdeModulePkg/Universal/DebugSupportDxe/x64/AsmFuncs.asm
index 810de909a8..5cc3e52bfe 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/x64/AsmFuncs.asm
+++ b/MdeModulePkg/Universal/DebugSupportDxe/x64/AsmFuncs.asm
@@ -1,15 +1,16 @@
-;******************************************************************************
-;*
-;* Copyright (c) 2006, Intel Corporation
-;* All rights reserved. This program and the accompanying materials
-;* are licensed and made available under the terms and conditions of the BSD License
-;* which accompanies this distribution. The full text of the license may be found at
-;* http://opensource.org/licenses/bsd-license.php
-;*
-;* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-;* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-;*
-;******************************************************************************
+;/** @file
+; Low level x64 routines used by the debug support driver.
+;
+; Copyright (c) 2007 - 2008, Intel Corporation. <BR>
+; All rights reserved. This program and the accompanying materials
+; are licensed and made available under the terms and conditions of the BSD License
+; which accompanies this distribution. The full text of the license may be found at
+; http://opensource.org/licenses/bsd-license.php
+;
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+;
+;**/
EXCPT64_DIVIDE_ERROR EQU 0
EXCPT64_DEBUG EQU 1
@@ -93,7 +94,7 @@ OrigVector dq 6666666666666666h ; ?
align 16
DebugStackEnd db "DbgStkEnd >>>>>>" ;; 16 byte long string - must be 16 bytes to preserve alignment
dd 1ffch dup (000000000h) ;; 32K should be enough stack
- ;; This allocation is coocked to insure
+ ;; This allocation is coocked to insure
;; that the the buffer for the FXSTORE instruction
;; will be 16 byte aligned also.
;;
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Inventory.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Inventory.vfr
index 79dcf18cbb..2e9cfa754d 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/Inventory.vfr
+++ b/MdeModulePkg/Universal/DriverSampleDxe/Inventory.vfr
@@ -1,25 +1,17 @@
-// *++
+///** @file
//
-// Copyright (c) 2007, Intel Corporation
-// All rights reserved. This program and the accompanying materials
-// are licensed and made available under the terms and conditions of the BSD License
-// which accompanies this distribution. The full text of the license may be found at
-// http://opensource.org/licenses/bsd-license.php
+// Sample Inventory Data
//
-// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+// Copyright (c) 2004 - 2008, Intel Corporation. <BR>
+// All rights reserved. This program and the accompanying materials
+// are licensed and made available under the terms and conditions of the BSD License
+// which accompanies this distribution. The full text of the license may be found at
+// http://opensource.org/licenses/bsd-license.php
//
-// Module Name:
+// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
-// Inventory.vfr
-//
-// Abstract:
-//
-// Sample Inventory Data.
-//
-// Revision History:
-//
-// --*/
+//**/
#define INVENTORY_GUID { 0xb3f56470, 0x6141, 0x4621, 0x8f, 0x19, 0x70, 0x4e, 0x57, 0x7a, 0xa9, 0xe8 }
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
index e88d708b2a..d63b8b9292 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
+++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
@@ -1,25 +1,17 @@
-// *++
+///** @file
//
-// Copyright (c) 2007, Intel Corporation
-// All rights reserved. This program and the accompanying materials
-// are licensed and made available under the terms and conditions of the BSD License
-// which accompanies this distribution. The full text of the license may be found at
-// http://opensource.org/licenses/bsd-license.php
+// Sample Setup formset.
//
-// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+// Copyright (c) 2004 - 2008, Intel Corporation. <BR>
+// All rights reserved. This program and the accompanying materials
+// are licensed and made available under the terms and conditions of the BSD License
+// which accompanies this distribution. The full text of the license may be found at
+// http://opensource.org/licenses/bsd-license.php
//
-// Module Name:
+// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
-// Vfr.vfr
-//
-// Abstract:
-//
-// Sample Setup formset
-//
-// Revision History:
-//
-// --*/
+//**/
#include "NVDataStruc.h"
@@ -328,7 +320,7 @@ formset
maximum = 243,
step = 1,
default = 18,
-
+
endnumeric;
endif;
diff --git a/MdeModulePkg/Universal/EbcDxe/Ia32/EbcLowLevel.S b/MdeModulePkg/Universal/EbcDxe/Ia32/EbcLowLevel.S
index 5e9828dc11..774692a76a 100644
--- a/MdeModulePkg/Universal/EbcDxe/Ia32/EbcLowLevel.S
+++ b/MdeModulePkg/Universal/EbcDxe/Ia32/EbcLowLevel.S
@@ -1,15 +1,17 @@
-#****************************************************************************
-#*
-#* Copyright (c) 2006, Intel Corporation
-#* All rights reserved. This program and the accompanying materials
-#* are licensed and made available under the terms and conditions of the BSD License
-#* which accompanies this distribution. The full text of the license may be found at
-#* http://opensource.org/licenses/bsd-license.php
-#*
-#* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-#* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#*
-#****************************************************************************
+##/**@file
+# Low level IA32 specific EBC support routines.
+#
+# Copyright (c) 2007 - 2008, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+#**/
+
.globl ASM_PFX(CopyMem)
.globl ASM_PFX(EbcLLCALLEXNative)
@@ -37,18 +39,18 @@ ASM_PFX(EbcLLCALLEXNative):
mov %ebp,%esp
pop %ebx
pop %ebp
- ret
+ ret
.globl ASM_PFX(EbcLLGetEbcEntryPoint)
ASM_PFX(EbcLLGetEbcEntryPoint):
- ret
+ ret
.globl ASM_PFX(EbcLLGetStackPointer)
ASM_PFX(EbcLLGetStackPointer):
mov %esp,%eax
add $0x4,%eax
- ret
+ ret
.globl ASM_PFX(EbcLLGetReturnValue)
ASM_PFX(EbcLLGetReturnValue):
- ret
+ ret
diff --git a/MdeModulePkg/Universal/EbcDxe/Ia32/EbcLowLevel.asm b/MdeModulePkg/Universal/EbcDxe/Ia32/EbcLowLevel.asm
index 4249241e7d..6b7672a837 100644
--- a/MdeModulePkg/Universal/EbcDxe/Ia32/EbcLowLevel.asm
+++ b/MdeModulePkg/Universal/EbcDxe/Ia32/EbcLowLevel.asm
@@ -1,31 +1,20 @@
- page ,132
- title VM ASSEMBLY LANGUAGE ROUTINES
-;****************************************************************************
-;*
-;* Copyright (c) 2006 - 2007, Intel Corporation
-;* All rights reserved. This program and the accompanying materials
-;* are licensed and made available under the terms and conditions of the BSD License
-;* which accompanies this distribution. The full text of the license may be found at
-;* http://opensource.org/licenses/bsd-license.php
-;*
-;* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-;* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-;*
-;****************************************************************************
-;****************************************************************************
-; REV 1.0
-;****************************************************************************
+;/** @file
+; This code provides low level routines that support the Virtual Machine
+; for option ROMs.
;
-; Rev Date Description
-; --- -------- ------------------------------------------------------------
-; 1.0 03/14/01 Initial creation of file.
+; Copyright (c) 2006 - 2008, Intel Corporation. <BR>
+; All rights reserved. This program and the accompanying materials
+; are licensed and made available under the terms and conditions of the BSD License
+; which accompanies this distribution. The full text of the license may be found at
+; http://opensource.org/licenses/bsd-license.php
;
-;****************************************************************************
-
-;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-; This code provides low level routines that support the Virtual Machine
-; for option ROMs.
-;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+;
+;**/
+
+ page ,132
+ title VM ASSEMBLY LANGUAGE ROUTINES
;---------------------------------------------------------------------------
; Equate files needed.
@@ -40,8 +29,8 @@
;---------------------------------------------------------------------------
.686p
-.model flat
-.code
+.model flat
+.code
;---------------------------------------------------------------------------
;;GenericPostSegment SEGMENT USE16
;---------------------------------------------------------------------------
@@ -51,9 +40,9 @@ CopyMem PROTO C Destination:PTR DWORD, Source:PTR DWORD, Count:DWORD
; EbcLLCALLEXNative
;
; This function is called to execute an EBC CALLEX instruction
-; to native code.
+; to native code.
; This instruction requires that we thunk out to external native
-; code. For IA32, we simply switch stacks and jump to the
+; code. For IA32, we simply switch stacks and jump to the
; specified function. On return, we restore the stack pointer
; to its original location.
;
@@ -64,17 +53,17 @@ _EbcLLCALLEXNative PROC NEAR PUBLIC
push ebp
push ebx
mov ebp, esp ; standard function prolog
-
+
; Get function address in a register
; mov ecx, FuncAddr => mov ecx, dword ptr [FuncAddr]
mov ecx, dword ptr [esp]+0Ch
-
+
; Set stack pointer to new value
; mov eax, NewStackPointer => mov eax, dword ptr [NewSp]
mov eax, dword ptr [esp] + 14h
mov edx, dword ptr [esp] + 10h
sub eax, edx
- sub esp, eax
+ sub esp, eax
mov ebx, esp
push ecx
push eax
@@ -88,7 +77,7 @@ _EbcLLCALLEXNative PROC NEAR PUBLIC
; Now call the external routine
call ecx
-
+
; ebp is preserved by the callee. In this function it
; equals the original esp, so set them equal
mov esp, ebp
@@ -105,7 +94,7 @@ _EbcLLCALLEXNative ENDP
; Routine Description:
; The VM thunk code stuffs an EBC entry point into a processor
; register. Since we can't use inline assembly to get it from
-; the interpreter C code, stuff it into the return value
+; the interpreter C code, stuff it into the return value
; register and return.
;
; Arguments:
@@ -121,7 +110,7 @@ _EbcLLGetEbcEntryPoint ENDP
;/*++
;
;Routine Description:
-;
+;
; Return the caller's value of the stack pointer.
;
;Arguments:
@@ -136,7 +125,7 @@ _EbcLLGetEbcEntryPoint ENDP
;
;--*/
-; UINTN EbcLLGetStackPointer()
+; UINTN EbcLLGetStackPointer()
_EbcLLGetStackPointer PROC NEAR PUBLIC
mov eax, esp ; get current stack pointer
add eax, 4 ; stack adjusted by this much when we were called
diff --git a/MdeModulePkg/Universal/EbcDxe/Ipf/EbcLowLevel.s b/MdeModulePkg/Universal/EbcDxe/Ipf/EbcLowLevel.s
index e329b68e66..36ae269575 100644
--- a/MdeModulePkg/Universal/EbcDxe/Ipf/EbcLowLevel.s
+++ b/MdeModulePkg/Universal/EbcDxe/Ipf/EbcLowLevel.s
@@ -1,24 +1,19 @@
-//++
-// Copyright (c) 2006, Intel Corporation
-// All rights reserved. This program and the accompanying materials
-// are licensed and made available under the terms and conditions of the BSD License
-// which accompanies this distribution. The full text of the license may be found at
-// http://opensource.org/licenses/bsd-license.php
-//
-// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-//
-// Module Name:
-//
-// EbcLowLevel.s
-//
-// Abstract:
-//
-// Contains low level routines for the Virtual Machine implementation
-// on an Itanium-based platform.
-//
-//
-//--
+/// @file
+/// Contains low level routines for the Virtual Machine implementation
+/// on an Itanium-based platform.
+///
+/// Copyright (c) 2006, Intel Corporation
+/// All rights reserved. This program and the accompanying materials
+/// are licensed and made available under the terms and conditions of the BSD License
+/// which accompanies this distribution. The full text of the license may be found at
+/// http://opensource.org/licenses/bsd-license.php
+///
+/// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+/// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+///
+/// Module Name: EbcLowLevel.s
+///
+///
.file "EbcLowLevel.s"
@@ -40,7 +35,7 @@ name::
mov ar##.##pfs=loc1 ;;\
br##.##ret##.##dpnt b0;;
-.type CopyMem, @function;
+.type CopyMem, @function;
//-----------------------------------------------------------------------------
//++
@@ -51,16 +46,16 @@ name::
// calls the native function. On return it restores the original
// stack pointer and returns to the caller.
//
-// Arguments :
+// Arguments :
//
// On Entry :
// in0 = Address of native code to call
// in1 = New stack pointer
//
-// Return Value:
-//
-// As per static calling conventions.
-//
+// Return Value:
+//
+// As per static calling conventions.
+//
//--
//---------------------------------------------------------------------------
;// void EbcAsmLLCALLEX (UINTN FunctionAddr, UINTN EbcStackPointer)
@@ -75,7 +70,7 @@ PROCEDURE_ENTRY(EbcAsmLLCALLEX)
mov r8 = in1;;
//
- // Copy stack arguments from EBC stack into registers.
+ // Copy stack arguments from EBC stack into registers.
// Assume worst case and copy 8.
//
ld8 out0 = [r8], 8;;
@@ -98,7 +93,7 @@ PROCEDURE_ENTRY(EbcAsmLLCALLEX)
or loc3 = r1, r0
//
- // Set the new aligned stack pointer. Reserve space for the required
+ // Set the new aligned stack pointer. Reserve space for the required
// 16-bytes of scratch area as well.
//
add r12 = 48, in1
@@ -129,13 +124,13 @@ PROCEDURE_EXIT(EbcAsmLLCALLEX)
PROCEDURE_ENTRY(EbcLLCALLEXNative)
NESTED_SETUP (3,6,3,0)
-
+
mov loc2 = in2;;
mov loc3 = in1;;
sub loc2 = loc2, loc3
mov loc4 = r12;;
or loc5 = r1, r0
-
+
sub r12 = r12, loc2
mov out2 = loc2;;
@@ -145,13 +140,13 @@ PROCEDURE_ENTRY(EbcLLCALLEXNative)
adds r12 = -0x8, r12
(p0) br.call.dptk.many b0 = CopyMem;;
adds r12 = 0x8, r12
-
+
mov out0 = in0;;
mov out1 = r12;;
(p0) br.call.dptk.many b0 = EbcAsmLLCALLEX;;
mov r12 = loc4;;
or r1 = loc5, r0
-
+
NESTED_RETURN
PROCEDURE_EXIT(EbcLLCALLEXNative)
@@ -186,7 +181,7 @@ PROCEDURE_EXIT(EbcLLGetReturnValue)
PROCEDURE_ENTRY(EbcLLGetStackPointer)
mov r8 = r12 ;;
br.ret.sptk b0 ;;
- br.sptk.few b6
+ br.sptk.few b6
PROCEDURE_EXIT(EbcLLGetStackPointer)
diff --git a/MdeModulePkg/Universal/EbcDxe/x64/EbcLowLevel.S b/MdeModulePkg/Universal/EbcDxe/x64/EbcLowLevel.S
index 538462575b..aa65bf6a5e 100644
--- a/MdeModulePkg/Universal/EbcDxe/x64/EbcLowLevel.S
+++ b/MdeModulePkg/Universal/EbcDxe/x64/EbcLowLevel.S
@@ -1,29 +1,17 @@
-#****************************************************************************
-#*
-#* Copyright (c) 2006, Intel Corporation
-#* All rights reserved. This program and the accompanying materials
-#* are licensed and made available under the terms and conditions of the BSD License
-#* which accompanies this distribution. The full text of the license may be found at
-#* http://opensource.org/licenses/bsd-license.php
-#*
-#* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-#* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#*
-#****************************************************************************
-#****************************************************************************
-# REV 1.0
-#****************************************************************************
+##/**@file
+# This code provides low level routines that support the Virtual Machine
+# for option ROMs.
#
-# Rev Date Description
-# --- -------- ------------------------------------------------------------
-# 1.0 05/09/12 Initial creation of file.
+# Copyright (c) 2007 - 2008, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
#
-#****************************************************************************
-
-#* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-# This code provides low level routines that support the Virtual Machine
-# for option ROMs.
-#* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+#**/
#---------------------------------------------------------------------------
# Equate files needed.
@@ -36,10 +24,10 @@
#****************************************************************************
# EbcLLCALLEX
#
-# This function is called to execute an EBC CALLEX instruction.
+# This function is called to execute an EBC CALLEX instruction.
# This instruction requires that we thunk out to external native
# code. For x64, we switch stacks, copy the arguments to the stack
-# and jump to the specified function.
+# and jump to the specified function.
# On return, we restore the stack pointer to its original location.
#
# Destroys no working registers.
@@ -62,7 +50,7 @@ _EbcLLCALLEXNative:
sub %rsp, %r8
mov %rsp, %rcx
sub %rsp, 0x20
- call _CopyMem
+ call _CopyMem
add %rsp, 0x20
# Considering the worst case, load 4 potiential arguments
@@ -86,7 +74,7 @@ _EbcLLCALLEXNative:
# Routine Description:
# The VM thunk code stuffs an EBC entry point into a processor
# register. Since we can't use inline assembly to get it from
-# the interpreter C code, stuff it into the return value
+# the interpreter C code, stuff it into the return value
# register and return.
#
# Arguments:
@@ -102,7 +90,7 @@ _EbcLLGetEbcEntryPoint:
#/*++
#
#Routine Description:
-#
+#
# Return the caller's value of the stack pointer.
#
#Arguments:
@@ -117,7 +105,7 @@ _EbcLLGetEbcEntryPoint:
#
#--*/
-# UINTN EbcLLGetStackPointer()
+# UINTN EbcLLGetStackPointer()
.global _EbcLLGetStackPointer;
_EbcLLGetStackPointer:
mov %rsp, %rax
diff --git a/MdeModulePkg/Universal/EbcDxe/x64/EbcLowLevel.asm b/MdeModulePkg/Universal/EbcDxe/x64/EbcLowLevel.asm
index 3262ea9378..51e80832b3 100644
--- a/MdeModulePkg/Universal/EbcDxe/x64/EbcLowLevel.asm
+++ b/MdeModulePkg/Universal/EbcDxe/x64/EbcLowLevel.asm
@@ -1,31 +1,21 @@
- page ,132
- title VM ASSEMBLY LANGUAGE ROUTINES
-;****************************************************************************
-;*
-;* Copyright (c) 2006, Intel Corporation
-;* All rights reserved. This program and the accompanying materials
-;* are licensed and made available under the terms and conditions of the BSD License
-;* which accompanies this distribution. The full text of the license may be found at
-;* http://opensource.org/licenses/bsd-license.php
-;*
-;* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-;* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-;*
-;****************************************************************************
-;****************************************************************************
-; REV 1.0
-;****************************************************************************
+;/** @file
+; This code provides low level routines that support the Virtual Machine.
+; for option ROMs.
;
-; Rev Date Description
-; --- -------- ------------------------------------------------------------
-; 1.0 05/09/12 Initial creation of file.
+; Copyright (c) 2006 - 2008, Intel Corporation. <BR>
+; All rights reserved. This program and the accompanying materials
+; are licensed and made available under the terms and conditions of the BSD License
+; which accompanies this distribution. The full text of the license may be found at
+; http://opensource.org/licenses/bsd-license.php
;
-;****************************************************************************
-
-;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-; This code provides low level routines that support the Virtual Machine
-; for option ROMs.
-;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+;
+;**/
+
+
+ page ,132
+ title VM ASSEMBLY LANGUAGE ROUTINES
;---------------------------------------------------------------------------
; Equate files needed.
@@ -40,10 +30,10 @@ text SEGMENT
;****************************************************************************
; EbcLLCALLEX
;
-; This function is called to execute an EBC CALLEX instruction.
+; This function is called to execute an EBC CALLEX instruction.
; This instruction requires that we thunk out to external native
; code. For x64, we switch stacks, copy the arguments to the stack
-; and jump to the specified function.
+; and jump to the specified function.
; On return, we restore the stack pointer to its original location.
;
; Destroys no working registers.
@@ -58,7 +48,7 @@ EbcLLCALLEXNative PROC PUBLIC
push rbx
mov rbp, rsp
; Function prolog
-
+
; Copy FuncAddr to a preserved register.
mov rbx, rcx
@@ -67,9 +57,9 @@ EbcLLCALLEXNative PROC PUBLIC
sub rsp, r8
mov rcx, rsp
sub rsp, 20h
- call CopyMem
+ call CopyMem
add rsp, 20h
-
+
; Considering the worst case, load 4 potiential arguments
; into registers.
mov rcx, qword ptr [rsp]
@@ -79,7 +69,7 @@ EbcLLCALLEXNative PROC PUBLIC
; Now call the external routine
call rbx
-
+
; Function epilog
mov rsp, rbp
pop rbx
@@ -92,7 +82,7 @@ EbcLLCALLEXNative ENDP
; Routine Description:
; The VM thunk code stuffs an EBC entry point into a processor
; register. Since we can't use inline assembly to get it from
-; the interpreter C code, stuff it into the return value
+; the interpreter C code, stuff it into the return value
; register and return.
;
; Arguments:
@@ -108,7 +98,7 @@ EbcLLGetEbcEntryPoint ENDP
;/*++
;
;Routine Description:
-;
+;
; Return the caller's value of the stack pointer.
;
;Arguments:
@@ -123,7 +113,7 @@ EbcLLGetEbcEntryPoint ENDP
;
;--*/
-; UINTN EbcLLGetStackPointer()
+; UINTN EbcLLGetStackPointer()
EbcLLGetStackPointer PROC PUBLIC
mov rax, rsp ; get current stack pointer
; Stack adjusted by this much when we were called,