mirror of https://github.com/acidanthera/audk.git
Update SmmBase Communicate Thunk behaivor to be compatible with Framework implemenation.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10271 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
1d5cbb48c3
commit
18e7892763
|
@ -42,6 +42,8 @@ typedef struct {
|
|||
EFI_HANDLE DispatchHandle;
|
||||
EFI_HANDLE SmmImageHandle;
|
||||
EFI_SMM_CALLBACK_ENTRY_POINT CallbackAddress;
|
||||
VOID *CommunicationBuffer;
|
||||
UINTN *SourceSize;
|
||||
} CALLBACK_INFO;
|
||||
|
||||
typedef struct {
|
||||
|
@ -410,8 +412,8 @@ CallbackThunk (
|
|||
///
|
||||
Status = (CallbackInfo->CallbackAddress) (
|
||||
CallbackInfo->SmmImageHandle,
|
||||
CommBuffer,
|
||||
CommBufferSize
|
||||
CallbackInfo->CommunicationBuffer,
|
||||
CallbackInfo->SourceSize
|
||||
);
|
||||
///
|
||||
/// Save CPU Save States in case any of them was modified
|
||||
|
@ -466,7 +468,7 @@ RegisterCallback (
|
|||
///
|
||||
/// Allocate buffer for callback thunk information
|
||||
///
|
||||
Buffer = (CALLBACK_INFO *)AllocatePool (sizeof (CALLBACK_INFO));
|
||||
Buffer = (CALLBACK_INFO *)AllocateZeroPool (sizeof (CALLBACK_INFO));
|
||||
if (Buffer == NULL) {
|
||||
FunctionData->Status = EFI_OUT_OF_RESOURCES;
|
||||
return;
|
||||
|
@ -552,14 +554,9 @@ HelperCommunicate (
|
|||
CallbackInfo = (CALLBACK_INFO *)Node;
|
||||
|
||||
if (FunctionData->Args.Communicate.ImageHandle == CallbackInfo->SmmImageHandle) {
|
||||
///
|
||||
/// Thunk into original Framwork SMI handler
|
||||
///
|
||||
(CallbackInfo->CallbackAddress) (
|
||||
CallbackInfo->SmmImageHandle,
|
||||
FunctionData->Args.Communicate.CommunicationBuffer,
|
||||
FunctionData->Args.Communicate.SourceSize
|
||||
);
|
||||
CallbackInfo->CommunicationBuffer = FunctionData->Args.Communicate.CommunicationBuffer;
|
||||
CallbackInfo->SourceSize = FunctionData->Args.Communicate.SourceSize;
|
||||
|
||||
///
|
||||
/// The message was successfully posted.
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue