This module contains EBC support routines that are customized based on\r
the target x64 processor.\r
\r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, 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
\r
#include "EbcInt.h"\r
#include "EbcExecute.h"\r
+#include "EbcDebuggerHook.h"\r
\r
//\r
// NOTE: This is the stack size allocated for the interpreter\r
// These 8 bytes of the thunk entry is the address of the EBC\r
// entry point.\r
//\r
- 0x49, 0xBA, \r
+ 0x49, 0xBA,\r
(UINT8)(EBC_ENTRYPOINT_SIGNATURE & 0xFF),\r
(UINT8)((EBC_ENTRYPOINT_SIGNATURE >> 8) & 0xFF),\r
(UINT8)((EBC_ENTRYPOINT_SIGNATURE >> 16) & 0xFF),\r
//\r
// Align the stack on a natural boundary.\r
//\r
- VmContext.Gpr[0] &= ~(sizeof (UINTN) - 1);\r
+ VmContext.Gpr[0] &= ~(VM_REGISTER)(sizeof (UINTN) - 1);\r
\r
//\r
// Put a magic value in the stack gap, then adjust down again.\r
//\r
// Begin executing the EBC code\r
//\r
+ EbcDebuggerHookEbcInterpret (&VmContext);\r
EbcExecute (&VmContext);\r
\r
//\r
- // Return the value in R[7] unless there was an error\r
+ // Return the value in Gpr[7] unless there was an error\r
//\r
ReturnEBCStack(StackIndex);\r
return (UINT64) VmContext.Gpr[7];\r
\r
//\r
// Align the stack on a natural boundary\r
- VmContext.Gpr[0] &= ~(sizeof(UINTN) - 1);\r
+ VmContext.Gpr[0] &= ~(VM_REGISTER)(sizeof(UINTN) - 1);\r
//\r
VmContext.LowStackTop = (UINTN) VmContext.Gpr[0];\r
\r
//\r
// Begin executing the EBC code\r
//\r
+ EbcDebuggerHookExecuteEbcImageEntryPoint (&VmContext);\r
EbcExecute (&VmContext);\r
\r
//\r
- // Return the value in R[7] unless there was an error\r
+ // Return the value in Gpr[7] unless there was an error\r
//\r
ReturnEBCStack(StackIndex);\r
return (UINT64) VmContext.Gpr[7];\r
\r
ThunkSize = sizeof(mInstructionBufferTemplate);\r
\r
- Ptr = AllocatePool (sizeof(mInstructionBufferTemplate));\r
+ Ptr = EbcAllocatePoolForThunk (sizeof(mInstructionBufferTemplate));\r
\r
if (Ptr == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r