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
This commit is contained in:
@@ -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
|
||||
|
@@ -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.
|
||||
;;
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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 ; \
|
||||
|
@@ -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
|
||||
|
@@ -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.
|
||||
;;
|
||||
|
@@ -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 }
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -1,31 +1,20 @@
|
||||
;/** @file
|
||||
; This code provides low level routines that support the Virtual Machine
|
||||
; for option ROMs.
|
||||
;
|
||||
; 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
|
||||
;
|
||||
; 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
|
||||
;****************************************************************************
|
||||
;*
|
||||
;* 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
|
||||
;****************************************************************************
|
||||
;
|
||||
; Rev Date Description
|
||||
; --- -------- ------------------------------------------------------------
|
||||
; 1.0 03/14/01 Initial creation of file.
|
||||
;
|
||||
;****************************************************************************
|
||||
|
||||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
; This code provides low level routines that support the Virtual Machine
|
||||
; for option ROMs.
|
||||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
|
||||
;---------------------------------------------------------------------------
|
||||
; 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
|
||||
|
@@ -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)
|
||||
|
||||
|
||||
|
@@ -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
|
||||
#****************************************************************************
|
||||
#
|
||||
# Rev Date Description
|
||||
# --- -------- ------------------------------------------------------------
|
||||
# 1.0 05/09/12 Initial creation of file.
|
||||
#
|
||||
#****************************************************************************
|
||||
|
||||
#* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
##/**@file
|
||||
# This code provides low level routines that support the Virtual Machine
|
||||
# for option ROMs.
|
||||
#* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
# for option ROMs.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
#**/
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# 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
|
||||
|
@@ -1,31 +1,21 @@
|
||||
;/** @file
|
||||
; This code provides low level routines that support the Virtual Machine.
|
||||
; for option ROMs.
|
||||
;
|
||||
; 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
|
||||
;
|
||||
; 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
|
||||
;****************************************************************************
|
||||
;*
|
||||
;* Copyright (c) 2006, Intel Corporation
|
||||
;* All rights reserved. This program and the accompanying materials
|
||||
;* are licensed and made available under the terms and conditions of the BSD License
|
||||
;* which accompanies this distribution. The full text of the license may be found at
|
||||
;* http://opensource.org/licenses/bsd-license.php
|
||||
;*
|
||||
;* 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
|
||||
;****************************************************************************
|
||||
;
|
||||
; Rev Date Description
|
||||
; --- -------- ------------------------------------------------------------
|
||||
; 1.0 05/09/12 Initial creation of file.
|
||||
;
|
||||
;****************************************************************************
|
||||
|
||||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
; This code provides low level routines that support the Virtual Machine
|
||||
; for option ROMs.
|
||||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
|
||||
;---------------------------------------------------------------------------
|
||||
; 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,
|
||||
|
Reference in New Issue
Block a user