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