mirror of https://github.com/acidanthera/audk.git
Code scrub for EBC module.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5568 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
42eedea958
commit
34e4e297bf
|
@ -1,7 +1,5 @@
|
|||
#/** @file
|
||||
#
|
||||
# Component description file for Ebc module.
|
||||
#
|
||||
# This module for the EBC virtual machine implementation produces
|
||||
# EBC and EBC debug support protocols.
|
||||
#
|
||||
|
@ -59,7 +57,6 @@
|
|||
MdePkg/MdePkg.dec
|
||||
|
||||
|
||||
|
||||
[LibraryClasses]
|
||||
MemoryAllocationLib
|
||||
UefiBootServicesTableLib
|
||||
|
|
|
@ -1250,7 +1250,7 @@ ExecuteEXTNDD (
|
|||
// Once we retrieve the operands for the data manipulation instructions,
|
||||
// call these functions to perform the operation.
|
||||
//
|
||||
STATIC CONST DATA_MANIP_EXEC_FUNCTION mDataManipDispatchTable[] = {
|
||||
CONST DATA_MANIP_EXEC_FUNCTION mDataManipDispatchTable[] = {
|
||||
ExecuteNOT,
|
||||
ExecuteNEG,
|
||||
ExecuteADD,
|
||||
|
@ -1272,7 +1272,7 @@ STATIC CONST DATA_MANIP_EXEC_FUNCTION mDataManipDispatchTable[] = {
|
|||
ExecuteEXTNDD,
|
||||
};
|
||||
|
||||
STATIC CONST VM_TABLE_ENTRY mVmOpcodeTable[] = {
|
||||
CONST VM_TABLE_ENTRY mVmOpcodeTable[] = {
|
||||
{ ExecuteBREAK }, // opcode 0x00
|
||||
{ ExecuteJMP }, // opcode 0x01
|
||||
{ ExecuteJMP8 }, // opcode 0x02
|
||||
|
@ -1336,7 +1336,7 @@ STATIC CONST VM_TABLE_ENTRY mVmOpcodeTable[] = {
|
|||
//
|
||||
// Length of JMP instructions, depending on upper two bits of opcode.
|
||||
//
|
||||
STATIC CONST UINT8 mJMPLen[] = { 2, 2, 6, 10 };
|
||||
CONST UINT8 mJMPLen[] = { 2, 2, 6, 10 };
|
||||
|
||||
//
|
||||
// Simple Debugger Protocol GUID
|
||||
|
@ -4862,7 +4862,7 @@ VmWriteMemN (
|
|||
MemoryFence ();
|
||||
Status = VmWriteMem32 (VmPtr, Addr + Index * sizeof (UINT32), (UINT32) Data);
|
||||
MemoryFence ();
|
||||
Data = (UINTN)RShiftU64 ((UINT64)Data, 32);
|
||||
Data = (UINTN) RShiftU64 ((UINT64)Data, 32);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4970,7 +4970,7 @@ VmReadImmed32 (
|
|||
// Return unaligned data
|
||||
//
|
||||
Data = (UINT32) VmReadCode16 (VmPtr, Offset);
|
||||
Data |= (UINT32) (VmReadCode16 (VmPtr, Offset + 2) << 16);
|
||||
Data |= (UINT32)(VmReadCode16 (VmPtr, Offset + 2) << 16);
|
||||
return Data;
|
||||
}
|
||||
|
||||
|
|
|
@ -322,28 +322,28 @@ EbcDebugInvalidateInstructionCache (
|
|||
// also be global since the execution of an EBC image does not provide
|
||||
// a This pointer.
|
||||
//
|
||||
STATIC EBC_IMAGE_LIST *mEbcImageList = NULL;
|
||||
EBC_IMAGE_LIST *mEbcImageList = NULL;
|
||||
|
||||
//
|
||||
// Callback function to flush the icache after thunk creation
|
||||
//
|
||||
STATIC EBC_ICACHE_FLUSH mEbcICacheFlush;
|
||||
EBC_ICACHE_FLUSH mEbcICacheFlush;
|
||||
|
||||
//
|
||||
// These get set via calls by the debug agent
|
||||
//
|
||||
STATIC EFI_PERIODIC_CALLBACK mDebugPeriodicCallback = NULL;
|
||||
STATIC EFI_EXCEPTION_CALLBACK mDebugExceptionCallback[MAX_EBC_EXCEPTION + 1] = {NULL};
|
||||
STATIC EFI_GUID mEfiEbcVmTestProtocolGuid = EFI_EBC_VM_TEST_PROTOCOL_GUID;
|
||||
EFI_PERIODIC_CALLBACK mDebugPeriodicCallback = NULL;
|
||||
EFI_EXCEPTION_CALLBACK mDebugExceptionCallback[MAX_EBC_EXCEPTION + 1] = {NULL};
|
||||
EFI_GUID mEfiEbcVmTestProtocolGuid = EFI_EBC_VM_TEST_PROTOCOL_GUID;
|
||||
|
||||
STATIC VOID* mStackBuffer[MAX_STACK_NUM];
|
||||
STATIC EFI_HANDLE mStackBufferIndex[MAX_STACK_NUM];
|
||||
STATIC UINTN mStackNum = 0;
|
||||
VOID *mStackBuffer[MAX_STACK_NUM];
|
||||
EFI_HANDLE mStackBufferIndex[MAX_STACK_NUM];
|
||||
UINTN mStackNum = 0;
|
||||
|
||||
//
|
||||
// Event for Periodic callback
|
||||
//
|
||||
STATIC EFI_EVENT mEbcPeriodicEvent;
|
||||
EFI_EVENT mEbcPeriodicEvent;
|
||||
VM_CONTEXT *mVmPtr = NULL;
|
||||
|
||||
|
||||
|
|
|
@ -316,6 +316,8 @@ EFI_STATUS
|
|||
ReturnEBCStackByHandle(
|
||||
IN EFI_HANDLE Handle
|
||||
);
|
||||
|
||||
|
||||
//
|
||||
// Defines for a simple EBC debugger interface
|
||||
//
|
||||
|
@ -329,23 +331,23 @@ typedef struct _EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL EFI_EBC_SIMPLE_DEBUGGER_PROTOCO
|
|||
typedef
|
||||
EFI_STATUS
|
||||
(*EBC_DEBUGGER_SIGNAL_EXCEPTION) (
|
||||
IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL * This,
|
||||
IN VM_CONTEXT * VmPtr,
|
||||
IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL *This,
|
||||
IN VM_CONTEXT *VmPtr,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType
|
||||
);
|
||||
|
||||
typedef
|
||||
VOID
|
||||
(*EBC_DEBUGGER_DEBUG) (
|
||||
IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL * This,
|
||||
IN VM_CONTEXT * VmPtr
|
||||
IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL *This,
|
||||
IN VM_CONTEXT *VmPtr
|
||||
);
|
||||
|
||||
typedef
|
||||
UINT32
|
||||
(*EBC_DEBUGGER_DASM) (
|
||||
IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL * This,
|
||||
IN VM_CONTEXT * VmPtr,
|
||||
IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL *This,
|
||||
IN VM_CONTEXT *VmPtr,
|
||||
IN UINT16 *DasmString OPTIONAL,
|
||||
IN UINT32 DasmStringSize
|
||||
);
|
||||
|
@ -359,7 +361,7 @@ UINT32
|
|||
typedef
|
||||
EFI_STATUS
|
||||
(*EBC_DEBUGGER_CONFIGURE) (
|
||||
IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL * This,
|
||||
IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL *This,
|
||||
IN UINT32 ConfigId,
|
||||
IN UINTN ConfigValue
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue