]>
Commit | Line | Data |
---|---|---|
07458357 JY |
1 | /** @file\r |
2 | Provides services to log the SMI handler registration.\r | |
3 | \r | |
4 | This API provides services for the SMM Child Dispatch Protocols provider,\r | |
5 | to register SMI handler information to SmmCore.\r | |
6 | \r | |
7 | NOTE:\r | |
8 | There is no need to update the consumers of SMST->SmiHandlerRegister() or\r | |
9 | the consumers of SMM Child Dispatch Protocols.\r | |
10 | The SmmCore (who produces SMST) should have ability to register such\r | |
11 | information directly.\r | |
12 | The SmmChildDispatcher (who produces SMM Child Dispatch Protocols) should\r | |
13 | be responsible to call the services to register information to SMM Core.\r | |
14 | \r | |
15 | Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r | |
16 | This program and the accompanying materials\r | |
17 | are licensed and made available under the terms and conditions of the BSD License\r | |
18 | which accompanies this distribution. The full text of the license may be found at\r | |
19 | http://opensource.org/licenses/bsd-license.php\r | |
20 | \r | |
21 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
22 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
23 | \r | |
24 | **/\r | |
25 | \r | |
26 | #ifndef __SMI_HANDLER_PROFILE_LIB_H__\r | |
27 | #define __SMI_HANDLER_PROFILE_LIB_H__\r | |
28 | \r | |
29 | #include <PiSmm.h>\r | |
30 | \r | |
31 | /**\r | |
32 | This function is called by SmmChildDispatcher module to report\r | |
33 | a new SMI handler is registered, to SmmCore.\r | |
34 | \r | |
35 | @param HandlerGuid The GUID to identify the type of the handler.\r | |
36 | For the SmmChildDispatch protocol, the HandlerGuid\r | |
37 | must be the GUID of SmmChildDispatch protocol.\r | |
38 | @param Handler The SMI handler.\r | |
39 | @param CallerAddress The address of the module who registers the SMI handler.\r | |
40 | @param Context The context of the SMI handler.\r | |
41 | For the SmmChildDispatch protocol, the Context\r | |
42 | must match the one defined for SmmChildDispatch protocol.\r | |
43 | @param ContextSize The size of the context in bytes.\r | |
44 | For the SmmChildDispatch protocol, the Context\r | |
45 | must match the one defined for SmmChildDispatch protocol.\r | |
46 | \r | |
47 | @retval EFI_SUCCESS The information is recorded.\r | |
48 | @retval EFI_UNSUPPORTED The feature is unsupported.\r | |
49 | @retval EFI_OUT_OF_RESOURCES There is no enough resource to record the information.\r | |
50 | **/\r | |
51 | EFI_STATUS\r | |
52 | EFIAPI\r | |
53 | SmiHandlerProfileRegisterHandler (\r | |
54 | IN EFI_GUID *HandlerGuid,\r | |
55 | IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,\r | |
56 | IN PHYSICAL_ADDRESS CallerAddress,\r | |
57 | IN VOID *Context, OPTIONAL\r | |
58 | IN UINTN ContextSize OPTIONAL\r | |
59 | );\r | |
60 | \r | |
61 | /**\r | |
62 | This function is called by SmmChildDispatcher module to report\r | |
63 | an existing SMI handler is unregistered, to SmmCore.\r | |
64 | \r | |
65 | @param HandlerGuid The GUID to identify the type of the handler.\r | |
66 | For the SmmChildDispatch protocol, the HandlerGuid\r | |
67 | must be the GUID of SmmChildDispatch protocol.\r | |
68 | @param Handler The SMI handler.\r | |
091e902b JY |
69 | @param Context The context of the SMI handler.\r |
70 | If it is NOT NULL, it will be used to check what is registered.\r | |
71 | @param ContextSize The size of the context in bytes.\r | |
72 | If Context is NOT NULL, it will be used to check what is registered.\r | |
07458357 JY |
73 | \r |
74 | @retval EFI_SUCCESS The original record is removed.\r | |
75 | @retval EFI_UNSUPPORTED The feature is unsupported.\r | |
76 | @retval EFI_NOT_FOUND There is no record for the HandlerGuid and handler.\r | |
77 | **/\r | |
78 | EFI_STATUS\r | |
79 | EFIAPI\r | |
80 | SmiHandlerProfileUnregisterHandler (\r | |
81 | IN EFI_GUID *HandlerGuid,\r | |
091e902b JY |
82 | IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,\r |
83 | IN VOID *Context, OPTIONAL\r | |
84 | IN UINTN ContextSize OPTIONAL\r | |
07458357 JY |
85 | );\r |
86 | \r | |
87 | #endif\r |