Provides auxiliary support routines for the VM. That is, routines\r
that are not particularly related to VM execution of EBC instructions.\r
\r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2011, 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
**/\r
EFI_STATUS\r
+EFIAPI\r
EbcVmTestUnsupported (\r
VOID\r
);\r
//\r
EFI_PERIODIC_CALLBACK mDebugPeriodicCallback = NULL;\r
EFI_EXCEPTION_CALLBACK mDebugExceptionCallback[MAX_EBC_EXCEPTION + 1] = {NULL};\r
-EFI_GUID mEfiEbcVmTestProtocolGuid = EFI_EBC_VM_TEST_PROTOCOL_GUID;\r
\r
VOID *mStackBuffer[MAX_STACK_NUM];\r
EFI_HANDLE mStackBufferIndex[MAX_STACK_NUM];\r
// Save the exception in the context passed in\r
//\r
VmPtr->ExceptionFlags |= ExceptionFlags;\r
- VmPtr->LastException = ExceptionType;\r
+ VmPtr->LastException = (UINTN) ExceptionType;\r
//\r
// If it's a fatal exception, then flag it in the VM context in case an\r
// attached debugger tries to return from it.\r
IN EFI_SYSTEM_CONTEXT SystemContext\r
)\r
{\r
+ //\r
+ // We print debug information to let user know what happen.\r
+ //\r
+ DEBUG ((\r
+ EFI_D_ERROR,\r
+ "EBC Interrupter Version - 0x%016lx\n",\r
+ (UINT64) (((VM_MAJOR_VERSION & 0xFFFF) << 16) | ((VM_MINOR_VERSION & 0xFFFF)))\r
+ ));\r
+ DEBUG ((\r
+ EFI_D_ERROR,\r
+ "Exception Type - 0x%016lx\n",\r
+ (UINT64)(UINTN)InterruptType\r
+ ));\r
+ DEBUG ((\r
+ EFI_D_ERROR,\r
+ " R0 - 0x%016lx, R1 - 0x%016lx\n",\r
+ SystemContext.SystemContextEbc->R0,\r
+ SystemContext.SystemContextEbc->R1\r
+ ));\r
+ DEBUG ((\r
+ EFI_D_ERROR,\r
+ " R2 - 0x%016lx, R3 - 0x%016lx\n",\r
+ SystemContext.SystemContextEbc->R2,\r
+ SystemContext.SystemContextEbc->R3\r
+ ));\r
+ DEBUG ((\r
+ EFI_D_ERROR,\r
+ " R4 - 0x%016lx, R5 - 0x%016lx\n",\r
+ SystemContext.SystemContextEbc->R4,\r
+ SystemContext.SystemContextEbc->R5\r
+ ));\r
+ DEBUG ((\r
+ EFI_D_ERROR,\r
+ " R6 - 0x%016lx, R7 - 0x%016lx\n",\r
+ SystemContext.SystemContextEbc->R6,\r
+ SystemContext.SystemContextEbc->R7\r
+ ));\r
+ DEBUG ((\r
+ EFI_D_ERROR,\r
+ " Flags - 0x%016lx\n",\r
+ SystemContext.SystemContextEbc->Flags\r
+ ));\r
+ DEBUG ((\r
+ EFI_D_ERROR,\r
+ " ControlFlags - 0x%016lx\n",\r
+ SystemContext.SystemContextEbc->ControlFlags\r
+ ));\r
+ DEBUG ((\r
+ EFI_D_ERROR,\r
+ " Ip - 0x%016lx\n\n",\r
+ SystemContext.SystemContextEbc->Ip\r
+ ));\r
+\r
//\r
// We deadloop here to make it easy to debug this issue.\r
//\r
- ASSERT (FALSE);\r
+ CpuDeadLoop ();\r
\r
return ;\r
}\r
// Publish the protocol\r
//\r
Handle = NULL;\r
- Status = gBS->InstallProtocolInterface (&Handle, &mEfiEbcVmTestProtocolGuid, EFI_NATIVE_INTERFACE, EbcVmTestProtocol);\r
+ Status = gBS->InstallProtocolInterface (&Handle, &gEfiEbcVmTestProtocolGuid, EFI_NATIVE_INTERFACE, EbcVmTestProtocol);\r
if (EFI_ERROR (Status)) {\r
FreePool (EbcVmTestProtocol);\r
}\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
EbcVmTestUnsupported (\r
VOID\r
)\r