]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/MmReportStatusCodeHandler.h
MdePkg/Include/Protocol/Tls.h: pack structures from the TLS RFC
[mirror_edk2.git] / MdePkg / Include / Protocol / MmReportStatusCodeHandler.h
CommitLineData
07c6a47e
ED
1/** @file\r
2 This protocol provides registering and unregistering services to status code consumers while in DXE MM.\r
3\r
4 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef __MM_REPORT_STATUS_CODE_HANDLER_PROTOCOL_H__\r
16#define __MM_REPORT_STATUS_CODE_HANDLER_PROTOCOL_H__\r
17\r
18#define EFI_MM_RSC_HANDLER_PROTOCOL_GUID \\r
19 { \\r
20 0x2ff29fa7, 0x5e80, 0x4ed9, {0xb3, 0x80, 0x1, 0x7d, 0x3c, 0x55, 0x4f, 0xf4} \\r
21 }\r
22\r
23typedef\r
24EFI_STATUS\r
25(EFIAPI *EFI_MM_RSC_HANDLER_CALLBACK)(\r
26 IN EFI_STATUS_CODE_TYPE CodeType,\r
27 IN EFI_STATUS_CODE_VALUE Value,\r
28 IN UINT32 Instance,\r
29 IN EFI_GUID *CallerId,\r
30 IN EFI_STATUS_CODE_DATA *Data\r
31);\r
32\r
33/**\r
34 Register the callback function for ReportStatusCode() notification.\r
35\r
36 When this function is called the function pointer is added to an internal list and any future calls to\r
37 ReportStatusCode() will be forwarded to the Callback function.\r
38\r
39 @param[in] Callback A pointer to a function of type EFI_MM_RSC_HANDLER_CALLBACK that is\r
40 called when a call to ReportStatusCode() occurs.\r
41\r
42 @retval EFI_SUCCESS Function was successfully registered.\r
43 @retval EFI_INVALID_PARAMETER The callback function was NULL.\r
44 @retval EFI_OUT_OF_RESOURCES The internal buffer ran out of space. No more functions can be\r
45 registered.\r
46 @retval EFI_ALREADY_STARTED The function was already registered. It can't be registered again.\r
47**/\r
48typedef\r
49EFI_STATUS\r
50(EFIAPI *EFI_MM_RSC_HANDLER_REGISTER)(\r
51 IN EFI_MM_RSC_HANDLER_CALLBACK Callback\r
52);\r
53\r
54/**\r
55 Remove a previously registered callback function from the notification list.\r
56\r
57 A callback function must be unregistered before it is deallocated. It is important that any registered\r
58 callbacks that are not runtime complaint be unregistered when ExitBootServices() is called.\r
59\r
60 @param[in] Callback A pointer to a function of type EFI_MM_RSC_HANDLER_CALLBACK that is to be\r
61 unregistered.\r
62\r
63 @retval EFI_SUCCESS The function was successfully unregistered.\r
64 @retval EFI_INVALID_PARAMETER The callback function was NULL.\r
65 @retval EFI_NOT_FOUND The callback function was not found to be unregistered.\r
66\r
67**/\r
68typedef\r
69EFI_STATUS\r
70(EFIAPI *EFI_MM_RSC_HANDLER_UNREGISTER)(\r
71 IN EFI_MM_RSC_HANDLER_CALLBACK Callback\r
72);\r
73\r
74typedef struct _EFI_MM_RSC_HANDLER_PROTOCOL {\r
75 EFI_MM_RSC_HANDLER_REGISTER Register;\r
76 EFI_MM_RSC_HANDLER_UNREGISTER Unregister;\r
77} EFI_MM_RSC_HANDLER_PROTOCOL;\r
78\r
79extern EFI_GUID gEfiMmRscHandlerProtocolGuid;\r
80\r
81#endif\r