]>
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 | |
9344f092 | 16 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
07458357 JY |
17 | \r |
18 | **/\r | |
19 | \r | |
20 | #ifndef __SMI_HANDLER_PROFILE_LIB_H__\r | |
21 | #define __SMI_HANDLER_PROFILE_LIB_H__\r | |
22 | \r | |
23 | #include <PiSmm.h>\r | |
24 | \r | |
25 | /**\r | |
26 | This function is called by SmmChildDispatcher module to report\r | |
27 | a new SMI handler is registered, to SmmCore.\r | |
28 | \r | |
29 | @param HandlerGuid The GUID to identify the type of the handler.\r | |
30 | For the SmmChildDispatch protocol, the HandlerGuid\r | |
31 | must be the GUID of SmmChildDispatch protocol.\r | |
32 | @param Handler The SMI handler.\r | |
33 | @param CallerAddress The address of the module who registers the SMI handler.\r | |
34 | @param Context The context of the SMI handler.\r | |
35 | For the SmmChildDispatch protocol, the Context\r | |
36 | must match the one defined for SmmChildDispatch protocol.\r | |
37 | @param ContextSize The size of the context in bytes.\r | |
38 | For the SmmChildDispatch protocol, the Context\r | |
39 | must match the one defined for SmmChildDispatch protocol.\r | |
40 | \r | |
41 | @retval EFI_SUCCESS The information is recorded.\r | |
42 | @retval EFI_UNSUPPORTED The feature is unsupported.\r | |
43 | @retval EFI_OUT_OF_RESOURCES There is no enough resource to record the information.\r | |
44 | **/\r | |
45 | EFI_STATUS\r | |
46 | EFIAPI\r | |
47 | SmiHandlerProfileRegisterHandler (\r | |
48 | IN EFI_GUID *HandlerGuid,\r | |
49 | IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,\r | |
50 | IN PHYSICAL_ADDRESS CallerAddress,\r | |
51 | IN VOID *Context, OPTIONAL\r | |
52 | IN UINTN ContextSize OPTIONAL\r | |
53 | );\r | |
54 | \r | |
55 | /**\r | |
56 | This function is called by SmmChildDispatcher module to report\r | |
57 | an existing SMI handler is unregistered, to SmmCore.\r | |
58 | \r | |
59 | @param HandlerGuid The GUID to identify the type of the handler.\r | |
60 | For the SmmChildDispatch protocol, the HandlerGuid\r | |
61 | must be the GUID of SmmChildDispatch protocol.\r | |
62 | @param Handler The SMI handler.\r | |
091e902b JY |
63 | @param Context The context of the SMI handler.\r |
64 | If it is NOT NULL, it will be used to check what is registered.\r | |
65 | @param ContextSize The size of the context in bytes.\r | |
66 | If Context is NOT NULL, it will be used to check what is registered.\r | |
07458357 JY |
67 | \r |
68 | @retval EFI_SUCCESS The original record is removed.\r | |
69 | @retval EFI_UNSUPPORTED The feature is unsupported.\r | |
70 | @retval EFI_NOT_FOUND There is no record for the HandlerGuid and handler.\r | |
71 | **/\r | |
72 | EFI_STATUS\r | |
73 | EFIAPI\r | |
74 | SmiHandlerProfileUnregisterHandler (\r | |
75 | IN EFI_GUID *HandlerGuid,\r | |
091e902b JY |
76 | IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,\r |
77 | IN VOID *Context, OPTIONAL\r | |
78 | IN UINTN ContextSize OPTIONAL\r | |
07458357 JY |
79 | );\r |
80 | \r | |
81 | #endif\r |