]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Library/SmiHandlerProfileLib.h
MdePkg/ProcessorBind: add defines for page allocation granularity
[mirror_edk2.git] / MdePkg / Include / Library / SmiHandlerProfileLib.h
CommitLineData
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
15Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
16This program and the accompanying materials\r
17are licensed and made available under the terms and conditions of the BSD License\r
18which accompanies this distribution. The full text of the license may be found at\r
19http://opensource.org/licenses/bsd-license.php\r
20\r
21THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
22WITHOUT 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
51EFI_STATUS\r
52EFIAPI\r
53SmiHandlerProfileRegisterHandler (\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
69\r
70 @retval EFI_SUCCESS The original record is removed.\r
71 @retval EFI_UNSUPPORTED The feature is unsupported.\r
72 @retval EFI_NOT_FOUND There is no record for the HandlerGuid and handler.\r
73**/\r
74EFI_STATUS\r
75EFIAPI\r
76SmiHandlerProfileUnregisterHandler (\r
77 IN EFI_GUID *HandlerGuid,\r
78 IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler\r
79 );\r
80\r
81#endif\r