diff options
author | Jiewen Yao <jiewen.yao@intel.com> | 2017-03-10 11:44:38 +0800 |
---|---|---|
committer | Jiewen Yao <jiewen.yao@intel.com> | 2017-03-13 16:04:12 +0800 |
commit | cb716d292b05c65b74de193c6e5b270ca41d226c (patch) | |
tree | 960940484bcbbcd9f0e08c2a4f935a9c547226ee /MdeModulePkg/Library/SmmSmiHandlerProfileLib | |
parent | 091e902bd31f9d53f9c51c71d3772e11a8ea211a (diff) | |
download | edk2-cb716d292b05c65b74de193c6e5b270ca41d226c.tar.gz edk2-cb716d292b05c65b74de193c6e5b270ca41d226c.tar.bz2 edk2-cb716d292b05c65b74de193c6e5b270ca41d226c.zip |
MdeModulePkg/SmiHandlerProfile: Add Context support in Unregister
The reason is that we observe that a platform may use same Handler
for different context.
In order to support Unregister such handler, we have to input
context information as well.
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Diffstat (limited to 'MdeModulePkg/Library/SmmSmiHandlerProfileLib')
-rw-r--r-- | MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.c b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.c index 2edc71be3e..2911619971 100644 --- a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.c +++ b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.c @@ -63,6 +63,10 @@ SmiHandlerProfileRegisterHandler ( For the SmmChildDispatch protocol, the HandlerGuid
must be the GUID of SmmChildDispatch protocol.
@param Handler The SMI handler.
+ @param Context The context of the SMI handler.
+ If it is NOT NULL, it will be used to check what is registered.
+ @param ContextSize The size of the context in bytes.
+ If Context is NOT NULL, it will be used to check what is registered.
@retval EFI_SUCCESS The original record is removed.
@retval EFI_UNSUPPORTED The feature is unsupported.
@@ -72,11 +76,13 @@ EFI_STATUS EFIAPI
SmiHandlerProfileUnregisterHandler (
IN EFI_GUID *HandlerGuid,
- IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler
+ IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
+ IN VOID *Context, OPTIONAL
+ IN UINTN ContextSize OPTIONAL
)
{
if (mSmiHandlerProfile != NULL) {
- return mSmiHandlerProfile->UnregisterHandler (mSmiHandlerProfile, HandlerGuid, Handler);
+ return mSmiHandlerProfile->UnregisterHandler (mSmiHandlerProfile, HandlerGuid, Handler, Context, ContextSize);
}
return EFI_UNSUPPORTED;
}
|