MdeModulePkg/SmmCore: Add Context in SmiHandlerProfileUnregister.

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>
This commit is contained in:
Jiewen Yao
2017-03-10 11:45:32 +08:00
parent cb716d292b
commit 1c3ac4b91e
2 changed files with 89 additions and 22 deletions

View File

@@ -1139,6 +1139,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_NOT_FOUND There is no record for the HandlerGuid and handler.
@@ -1148,7 +1152,9 @@ EFIAPI
SmiHandlerProfileUnregisterHandler (
IN SMI_HANDLER_PROFILE_PROTOCOL *This,
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
);
extern UINTN mFullSmramRangeCount;