]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.h
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Universal / ReportStatusCodeRouter / Smm / ReportStatusCodeRouterSmm.h
CommitLineData
202c3279 1/** @file\r
2 Internal include file for Report Status Code Router Driver.\r
3\r
e5eed7d3
HT
4 Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials\r
202c3279 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 __REPORT_STATUS_CODE_ROUTER_SMM_H__\r
16#define __REPORT_STATUS_CODE_ROUTER_SMM_H__\r
17\r
18\r
19#include <Protocol/SmmReportStatusCodeHandler.h>\r
20#include <Protocol/SmmStatusCode.h>\r
21\r
22#include <Library/BaseLib.h>\r
23#include <Library/SynchronizationLib.h>\r
24#include <Library/DebugLib.h>\r
25#include <Library/PcdLib.h>\r
26#include <Library/UefiDriverEntryPoint.h>\r
27#include <Library/SmmServicesTableLib.h>\r
d3308de7 28#include <Library/MemoryAllocationLib.h>\r
202c3279 29\r
30#define SMM_RSC_HANDLER_CALLBACK_ENTRY_SIGNATURE SIGNATURE_32 ('s', 'h', 'c', 'e')\r
31\r
32typedef struct {\r
33 UINTN Signature;\r
34 EFI_SMM_RSC_HANDLER_CALLBACK RscHandlerCallback;\r
35 LIST_ENTRY Node;\r
36} SMM_RSC_HANDLER_CALLBACK_ENTRY;\r
37\r
38/**\r
39 Register the callback function for ReportStatusCode() notification.\r
40 \r
41 When this function is called the function pointer is added to an internal list and any future calls to\r
42 ReportStatusCode() will be forwarded to the Callback function.\r
43\r
44 @param[in] Callback A pointer to a function of type EFI_PEI_RSC_HANDLER_CALLBACK that is called\r
45 when a call to ReportStatusCode() occurs.\r
46 \r
47 @retval EFI_SUCCESS Function was successfully registered.\r
48 @retval EFI_INVALID_PARAMETER The callback function was NULL.\r
49 @retval EFI_OUT_OF_RESOURCES The internal buffer ran out of space. No more functions can be\r
50 registered.\r
51 @retval EFI_ALREADY_STARTED The function was already registered. It can't be registered again.\r
52 \r
53**/\r
54EFI_STATUS\r
55EFIAPI\r
56Register (\r
57 IN EFI_SMM_RSC_HANDLER_CALLBACK Callback\r
58 );\r
59\r
60/**\r
61 Remove a previously registered callback function from the notification list.\r
62 \r
63 ReportStatusCode() messages will no longer be forwarded to the Callback function.\r
64 \r
65 @param[in] Callback A pointer to a function of type EFI_PEI_RSC_HANDLER_CALLBACK that is to be\r
66 unregistered.\r
67\r
68 @retval EFI_SUCCESS The function was successfully unregistered.\r
69 @retval EFI_INVALID_PARAMETER The callback function was NULL.\r
70 @retval EFI_NOT_FOUND The callback function was not found to be unregistered.\r
71 \r
72**/\r
73EFI_STATUS\r
74EFIAPI\r
75Unregister (\r
76 IN EFI_SMM_RSC_HANDLER_CALLBACK Callback\r
77 );\r
78\r
79/**\r
80 Provides an interface that a software module can call to report a status code.\r
81\r
82 @param This EFI_SMM_STATUS_CODE_PROTOCOL instance.\r
83 @param Type Indicates the type of status code being reported.\r
84 @param Value Describes the current status of a hardware or software entity.\r
85 This included information about the class and subclass that is used to\r
86 classify the entity as well as an operation.\r
87 @param Instance The enumeration of a hardware or software entity within\r
88 the system. Valid instance numbers start with 1.\r
89 @param CallerId This optional parameter may be used to identify the caller.\r
90 This parameter allows the status code driver to apply different rules to\r
91 different callers.\r
92 @param Data This optional parameter may be used to pass additional data.\r
93\r
94 @retval EFI_SUCCESS The function completed successfully\r
95 @retval EFI_DEVICE_ERROR The function should not be completed due to a device error.\r
96\r
97**/\r
98EFI_STATUS\r
99EFIAPI\r
100ReportDispatcher (\r
101 IN CONST EFI_SMM_STATUS_CODE_PROTOCOL *This,\r
102 IN EFI_STATUS_CODE_TYPE Type,\r
103 IN EFI_STATUS_CODE_VALUE Value,\r
104 IN UINT32 Instance,\r
105 IN CONST EFI_GUID *CallerId OPTIONAL,\r
106 IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r
107 );\r
108\r
109#endif\r