diff options
author | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-03-18 02:01:32 +0000 |
---|---|---|
committer | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-03-18 02:01:32 +0000 |
commit | 18e78927637dade4139729bed721ad7b4aae25ed (patch) | |
tree | 0e5b66922b248af3a5504036b44a91b782e25dcb /EdkCompatibilityPkg/Compatibility | |
parent | 1d5cbb48c352d5baf10bfc3cd3a24f55063f68b4 (diff) | |
download | edk2-platforms-18e78927637dade4139729bed721ad7b4aae25ed.tar.xz |
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
Diffstat (limited to 'EdkCompatibilityPkg/Compatibility')
-rw-r--r-- | EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c b/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c index 1c52fa83b8..a30058bb5c 100644 --- a/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c +++ b/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c @@ -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.
///
|