]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/SmiHandlerProfileLibNull/SmiHandlerProfileLibNull.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdePkg / Library / SmiHandlerProfileLibNull / SmiHandlerProfileLibNull.c
1 /** @file
2 NULL instance of SmiHandlerProfile Library.
3
4 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #include <PiMm.h>
10 #include <Library/SmiHandlerProfileLib.h>
11
12 /**
13 This function is called by SmmChildDispatcher module to report
14 a new SMI handler is registered, to SmmCore.
15
16 @param HandlerGuid The GUID to identify the type of the handler.
17 For the SmmChildDispatch protocol, the HandlerGuid
18 must be the GUID of SmmChildDispatch protocol.
19 @param Handler The SMI handler.
20 @param CallerAddress The address of the module who registers the SMI handler.
21 @param Context The context of the SMI handler.
22 For the SmmChildDispatch protocol, the Context
23 must match the one defined for SmmChildDispatch protocol.
24 @param ContextSize The size of the context in bytes.
25 For the SmmChildDispatch protocol, the Context
26 must match the one defined for SmmChildDispatch protocol.
27
28 @retval EFI_SUCCESS The information is recorded.
29 @retval EFI_UNSUPPORTED The feature is unsupported.
30 @retval EFI_OUT_OF_RESOURCES There is no enough resource to record the information.
31 **/
32 EFI_STATUS
33 EFIAPI
34 SmiHandlerProfileRegisterHandler (
35 IN EFI_GUID *HandlerGuid,
36 IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
37 IN PHYSICAL_ADDRESS CallerAddress,
38 IN VOID *Context OPTIONAL,
39 IN UINTN ContextSize OPTIONAL
40 )
41 {
42 return EFI_UNSUPPORTED;
43 }
44
45 /**
46 This function is called by SmmChildDispatcher module to report
47 an existing SMI handler is unregistered, to SmmCore.
48
49 @param HandlerGuid The GUID to identify the type of the handler.
50 For the SmmChildDispatch protocol, the HandlerGuid
51 must be the GUID of SmmChildDispatch protocol.
52 @param Handler The SMI handler.
53 @param Context The context of the SMI handler.
54 If it is NOT NULL, it will be used to check what is registered.
55 @param ContextSize The size of the context in bytes.
56 If Context is NOT NULL, it will be used to check what is registered.
57
58 @retval EFI_SUCCESS The original record is removed.
59 @retval EFI_UNSUPPORTED The feature is unsupported.
60 @retval EFI_NOT_FOUND There is no record for the HandlerGuid and handler.
61 **/
62 EFI_STATUS
63 EFIAPI
64 SmiHandlerProfileUnregisterHandler (
65 IN EFI_GUID *HandlerGuid,
66 IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
67 IN VOID *Context OPTIONAL,
68 IN UINTN ContextSize OPTIONAL
69 )
70 {
71 return EFI_UNSUPPORTED;
72 }