1. Advance IP in case of Break(3) in breakpoint exception
2. Add stack management algorithm to avoid pool allocation during EBC instruction interpretation. 3. Add multi EBC image support. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2519 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -22,11 +22,6 @@ Abstract:
|
||||
#include "EbcInt.h"
|
||||
#include "EbcExecute.h"
|
||||
|
||||
//
|
||||
// VM major/minor version
|
||||
//
|
||||
#define VM_MAJOR_VERSION 1
|
||||
#define VM_MINOR_VERSION 0
|
||||
|
||||
//
|
||||
// Define some useful data size constants to allow switch statements based on
|
||||
@ -763,10 +758,15 @@ Returns:
|
||||
EbcDebugSignalException (EXCEPT_EBC_STACK_FAULT, EXCEPTION_FLAG_FATAL, VmPtr);
|
||||
StackCorrupted = 1;
|
||||
}
|
||||
if (!StackCorrupted && ((UINT64)VmPtr->R[0] <= (UINT64)(UINTN) VmPtr->StackTop)) {
|
||||
EbcDebugSignalException (EXCEPT_EBC_STACK_FAULT, EXCEPTION_FLAG_FATAL, VmPtr);
|
||||
StackCorrupted = 1;
|
||||
}
|
||||
}
|
||||
|
||||
Done:
|
||||
mVmPtr = NULL;
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -1122,10 +1122,6 @@ Returns:
|
||||
EXCEPTION_FLAG_NONE,
|
||||
VmPtr
|
||||
);
|
||||
//
|
||||
// Don't advance the IP
|
||||
//
|
||||
return EFI_UNSUPPORTED;
|
||||
break;
|
||||
|
||||
//
|
||||
@ -4504,19 +4500,8 @@ Returns:
|
||||
adjust for the stack gap and return the modified address.
|
||||
|
||||
--*/
|
||||
{
|
||||
if ((Addr >= VmPtr->LowStackTop) && (Addr < VmPtr->HighStackBottom)) {
|
||||
//
|
||||
// In the stack gap -- now make sure it's not in the VM itself, which
|
||||
// would be the case if it's accessing VM register contents.
|
||||
//
|
||||
if ((Addr < (UINTN) VmPtr) || (Addr > (UINTN) VmPtr + sizeof (VM_CONTEXT))) {
|
||||
VmPtr->LastAddrConverted = Addr;
|
||||
VmPtr->LastAddrConvertedValue = Addr - VmPtr->LowStackTop + VmPtr->HighStackBottom;
|
||||
return Addr - VmPtr->LowStackTop + VmPtr->HighStackBottom;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
ASSERT(((Addr < VmPtr->LowStackTop) || (Addr > VmPtr->HighStackBottom)));
|
||||
return Addr;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user