X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FEbcDxe%2FEbcExecute.c;h=69aee07ea9f3414b1d43333c92726ff2a7de8cee;hb=4e1005eca7186cbe61aaae09108f6fdf29959f22;hp=48f7dcebdb728923b94b7c8a69287a422bed8d67;hpb=c9325700d0ef25eaf45077928af3f93b15ac5fe0;p=mirror_edk2.git diff --git a/MdeModulePkg/Universal/EbcDxe/EbcExecute.c b/MdeModulePkg/Universal/EbcDxe/EbcExecute.c index 48f7dcebdb..69aee07ea9 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcExecute.c +++ b/MdeModulePkg/Universal/EbcDxe/EbcExecute.c @@ -1,7 +1,7 @@ /** @file Contains code that implements the virtual machine. -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2014, 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 @@ -1344,12 +1344,6 @@ CONST VM_TABLE_ENTRY mVmOpcodeTable[] = { // CONST UINT8 mJMPLen[] = { 2, 2, 6, 10 }; -// -// Simple Debugger Protocol GUID -// -EFI_GUID mEbcSimpleDebuggerProtocolGuid = EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL_GUID; - - /** Given a pointer to a new VM context, execute one or more instructions. This function is only used for test purposes via the EBC VM test protocol. @@ -1365,6 +1359,7 @@ EFI_GUID mEbcSimpleDebuggerProtocolGuid = EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL_GUID; **/ EFI_STATUS +EFIAPI EbcExecuteInstructions ( IN EFI_EBC_VM_TEST_PROTOCOL *This, IN VM_CONTEXT *VmPtr, @@ -1452,7 +1447,7 @@ EbcExecute ( // DEBUG_CODE_BEGIN (); Status = gBS->LocateProtocol ( - &mEbcSimpleDebuggerProtocolGuid, + &gEfiEbcSimpleDebuggerProtocolGuid, NULL, (VOID **) &EbcSimpleDebugger ); @@ -1832,6 +1827,7 @@ ExecuteBREAK ( UINT64 U64EbcEntryPoint; INT32 Offset; + Thunk = NULL; Operands = GETOPERANDS (VmPtr); switch (Operands) { // @@ -2367,7 +2363,7 @@ ExecuteMOVIn ( // Get the address // Op1 = (UINT64) VmPtr->Gpr[OPERAND1_REGNUM (Operands)] + Index16; - VmWriteMemN (VmPtr, (UINTN) Op1, (INTN) ImmedIndex64); + VmWriteMemN (VmPtr, (UINTN) Op1, (UINTN)(INTN) ImmedIndex64); } // // Advance the instruction pointer @@ -2551,9 +2547,9 @@ ExecuteMOVsnw ( // // Get the data from the source. // - Op2 = (UINT64) (VmPtr->Gpr[OPERAND2_REGNUM (Operands)] + Op2Index); + Op2 = (UINT64)(INT64)(INTN)(VmPtr->Gpr[OPERAND2_REGNUM (Operands)] + Op2Index); if (OPERAND2_INDIRECT (Operands)) { - Op2 = (UINT64) VmReadMemN (VmPtr, (UINTN) Op2); + Op2 = (UINT64)(INT64)(INTN)VmReadMemN (VmPtr, (UINTN) Op2); } // // Now write back the result. @@ -2644,9 +2640,9 @@ ExecuteMOVsnd ( // // Get the data from the source. // - Op2 = (UINT64) (VmPtr->Gpr[OPERAND2_REGNUM (Operands)] + Op2Index); + Op2 = (UINT64)(INT64)(INTN)(INT64)(VmPtr->Gpr[OPERAND2_REGNUM (Operands)] + Op2Index); if (OPERAND2_INDIRECT (Operands)) { - Op2 = (UINT64) VmReadMemN (VmPtr, (UINTN) Op2); + Op2 = (UINT64)(INT64)(INTN)(INT64)VmReadMemN (VmPtr, (UINTN) Op2); } // // Now write back the result.