]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg/SmiHandlerProfile: Add Context support in Unregister
authorJiewen Yao <jiewen.yao@intel.com>
Fri, 10 Mar 2017 03:42:53 +0000 (11:42 +0800)
committerJiewen Yao <jiewen.yao@intel.com>
Mon, 13 Mar 2017 08:04:11 +0000 (16:04 +0800)
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: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@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>
MdePkg/Include/Library/SmiHandlerProfileLib.h
MdePkg/Library/SmiHandlerProfileLibNull/SmiHandlerProfileLibNull.c

index 10b7323e03776d28745ef6077b7bbb27919496db..77d19f9a70b3e386626db583e5f71027704a6793 100644 (file)
@@ -66,6 +66,10 @@ SmiHandlerProfileRegisterHandler (
                          For the SmmChildDispatch protocol, the HandlerGuid\r
                          must be the GUID of SmmChildDispatch protocol.\r
   @param Handler         The SMI handler.\r
                          For the SmmChildDispatch protocol, the HandlerGuid\r
                          must be the GUID of SmmChildDispatch protocol.\r
   @param Handler         The SMI handler.\r
+  @param Context         The context of the SMI handler.\r
+                         If it is NOT NULL, it will be used to check what is registered.\r
+  @param ContextSize     The size of the context in bytes.\r
+                         If Context is NOT NULL, it will be used to check what is registered.\r
 \r
   @retval EFI_SUCCESS           The original record is removed.\r
   @retval EFI_UNSUPPORTED       The feature is unsupported.\r
 \r
   @retval EFI_SUCCESS           The original record is removed.\r
   @retval EFI_UNSUPPORTED       The feature is unsupported.\r
@@ -75,7 +79,9 @@ EFI_STATUS
 EFIAPI\r
 SmiHandlerProfileUnregisterHandler (\r
   IN EFI_GUID                       *HandlerGuid,\r
 EFIAPI\r
 SmiHandlerProfileUnregisterHandler (\r
   IN EFI_GUID                       *HandlerGuid,\r
-  IN EFI_SMM_HANDLER_ENTRY_POINT2   Handler\r
+  IN EFI_SMM_HANDLER_ENTRY_POINT2   Handler,\r
+  IN VOID                           *Context, OPTIONAL\r
+  IN UINTN                          ContextSize OPTIONAL\r
   );\r
 \r
 #endif\r
   );\r
 \r
 #endif\r
index 6ae47185c05fc4b5148f87a5630f798bb2b46fef..7f4855bd06688015f1a56ea95fba3aeee8d5ffd0 100644 (file)
@@ -56,6 +56,10 @@ SmiHandlerProfileRegisterHandler (
                          For the SmmChildDispatch protocol, the HandlerGuid\r
                          must be the GUID of SmmChildDispatch protocol.\r
   @param Handler         The SMI handler.\r
                          For the SmmChildDispatch protocol, the HandlerGuid\r
                          must be the GUID of SmmChildDispatch protocol.\r
   @param Handler         The SMI handler.\r
+  @param Context         The context of the SMI handler.\r
+                         If it is NOT NULL, it will be used to check what is registered.\r
+  @param ContextSize     The size of the context in bytes.\r
+                         If Context is NOT NULL, it will be used to check what is registered.\r
 \r
   @retval EFI_SUCCESS           The original record is removed.\r
   @retval EFI_UNSUPPORTED       The feature is unsupported.\r
 \r
   @retval EFI_SUCCESS           The original record is removed.\r
   @retval EFI_UNSUPPORTED       The feature is unsupported.\r
@@ -65,7 +69,9 @@ EFI_STATUS
 EFIAPI\r
 SmiHandlerProfileUnregisterHandler (\r
   IN EFI_GUID                       *HandlerGuid,\r
 EFIAPI\r
 SmiHandlerProfileUnregisterHandler (\r
   IN EFI_GUID                       *HandlerGuid,\r
-  IN EFI_SMM_HANDLER_ENTRY_POINT2   Handler\r
+  IN EFI_SMM_HANDLER_ENTRY_POINT2   Handler,\r
+  IN VOID                           *Context, OPTIONAL\r
+  IN UINTN                          ContextSize OPTIONAL\r
   )\r
 {\r
   return EFI_UNSUPPORTED;\r
   )\r
 {\r
   return EFI_UNSUPPORTED;\r