diff --git a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.c b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.c index aa8f6c5de1..129eee6b2c 100644 --- a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.c +++ b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.c @@ -268,10 +268,10 @@ InterruptDistrubutionHub ( { if (IdtEntryTable[ExceptionType].RegisteredCallback != NULL) { if (ExceptionType != SYSTEM_TIMER_VECTOR) { - ((EFI_EXCEPTION_CALLBACK)(IdtEntryTable[ExceptionType].RegisteredCallback))(ExceptionType, (EFI_SYSTEM_CONTEXT)ContextRecord); + ((EFI_EXCEPTION_CALLBACK)(IdtEntryTable[ExceptionType].RegisteredCallback))(ExceptionType, *(EFI_SYSTEM_CONTEXT *) &ContextRecord); } else { OrigVector = IdtEntryTable[ExceptionType].OrigVector; - ((EFI_PERIODIC_CALLBACK)(IdtEntryTable[ExceptionType].RegisteredCallback))((EFI_SYSTEM_CONTEXT)ContextRecord); + ((EFI_PERIODIC_CALLBACK)(IdtEntryTable[ExceptionType].RegisteredCallback))(*(EFI_SYSTEM_CONTEXT *) &ContextRecord); } } }