]>
Commit | Line | Data |
---|---|---|
ad1a1798 | 1 | \r |
2 | /** @file\r | |
3 | Heade file of status code PEIM\r | |
4 | \r | |
ececc2eb | 5 | Copyright (c) 2006, Intel Corporation\r |
6 | All rights reserved. This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
ad1a1798 | 13 | \r |
14 | Module Name: PeiStatusCode.h\r | |
15 | \r | |
16 | **/\r | |
17 | \r | |
18 | #ifndef __PEI_STATUS_CODE_H__\r | |
19 | #define __PEI_STATUS_CODE_H__\r | |
20 | \r | |
21 | \r | |
22 | //\r | |
ececc2eb | 23 | // The package level header files this module uses\r |
24 | //\r | |
25 | #include <FrameworkPei.h>\r | |
26 | //\r | |
27 | // The protocols, PPI and GUID defintions for this module\r | |
28 | //\r | |
29 | #include <Guid/MemoryStatusCodeRecord.h>\r | |
30 | #include <Guid/StatusCodeDataTypeId.h>\r | |
31 | #include <Ppi/StatusCode.h>\r | |
32 | //\r | |
33 | // The Library classes this module consumes\r | |
ad1a1798 | 34 | //\r |
ececc2eb | 35 | #include <Library/BaseLib.h>\r |
36 | #include <Library/BaseMemoryLib.h>\r | |
37 | #include <Library/DebugLib.h>\r | |
38 | #include <Library/PrintLib.h>\r | |
39 | #include <Library/ReportStatusCodeLib.h>\r | |
40 | #include <Library/SerialPortLib.h>\r | |
41 | #include <Library/HobLib.h>\r | |
42 | #include <Library/PcdLib.h>\r | |
43 | #include <Library/PeiServicesLib.h>\r | |
44 | #include <Library/OemHookStatusCodeLib.h>\r | |
45 | #include <Library/PeimEntryPoint.h>\r | |
ad1a1798 | 46 | \r |
47 | /**\r | |
48 | Convert status code value and extended data to readable ASCII string, send string to serial I/O device.\r | |
ececc2eb | 49 | \r |
ad1a1798 | 50 | @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.\r |
ececc2eb | 51 | \r |
52 | @param Value Describes the current status of a hardware or software entity.\r | |
53 | This included information about the class and subclass that is used to classify the entity\r | |
54 | as well as an operation. For progress codes, the operation is the current activity.\r | |
55 | For error codes, it is the exception. For debug codes, it is not defined at this time.\r | |
56 | Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.\r | |
ad1a1798 | 57 | Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.\r |
ececc2eb | 58 | \r |
59 | @param Instance The enumeration of a hardware or software entity within the system.\r | |
60 | A system may contain multiple entities that match a class/subclass pairing.\r | |
61 | The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,\r | |
ad1a1798 | 62 | not meaningful, or not relevant. Valid instance numbers start with 1.\r |
63 | \r | |
64 | \r | |
ececc2eb | 65 | @param CallerId This optional parameter may be used to identify the caller.\r |
66 | This parameter allows the status code driver to apply different rules to different callers.\r | |
ad1a1798 | 67 | Type EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Specification.\r |
68 | \r | |
69 | \r | |
70 | @param Data This optional parameter may be used to pass additional data\r | |
ececc2eb | 71 | \r |
ad1a1798 | 72 | @return The function always return EFI_SUCCESS.\r |
73 | \r | |
74 | **/\r | |
75 | EFI_STATUS\r | |
76 | SerialStatusCodeReportWorker (\r | |
77 | IN EFI_STATUS_CODE_TYPE CodeType,\r | |
78 | IN EFI_STATUS_CODE_VALUE Value,\r | |
79 | IN UINT32 Instance,\r | |
80 | IN EFI_GUID *CallerId,\r | |
81 | IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r | |
82 | );\r | |
83 | \r | |
84 | \r | |
85 | /**\r | |
86 | Initialize memory status code.\r | |
ececc2eb | 87 | Create one GUID'ed HOB with PCD defined size. If create required size\r |
ad1a1798 | 88 | GUID'ed HOB failed, then ASSERT().\r |
ececc2eb | 89 | \r |
ad1a1798 | 90 | @return The function always return EFI_SUCCESS\r |
91 | \r | |
92 | **/\r | |
93 | EFI_STATUS\r | |
94 | MemoryStatusCodeInitializeWorker (\r | |
95 | VOID\r | |
96 | );\r | |
97 | \r | |
98 | /**\r | |
99 | Report status code into GUID'ed HOB.\r | |
ececc2eb | 100 | \r |
ad1a1798 | 101 | @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.\r |
ececc2eb | 102 | \r |
103 | @param Value Describes the current status of a hardware or software entity.\r | |
104 | This included information about the class and subclass that is used to classify the entity\r | |
105 | as well as an operation. For progress codes, the operation is the current activity.\r | |
106 | For error codes, it is the exception. For debug codes, it is not defined at this time.\r | |
107 | Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.\r | |
ad1a1798 | 108 | Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.\r |
ececc2eb | 109 | \r |
110 | @param Instance The enumeration of a hardware or software entity within the system.\r | |
111 | A system may contain multiple entities that match a class/subclass pairing.\r | |
112 | The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,\r | |
ad1a1798 | 113 | not meaningful, or not relevant. Valid instance numbers start with 1.\r |
ececc2eb | 114 | \r |
ad1a1798 | 115 | @return The function always return EFI_SUCCESS.\r |
116 | \r | |
117 | **/\r | |
118 | EFI_STATUS\r | |
119 | MemoryStatusCodeReportWorker (\r | |
120 | IN EFI_STATUS_CODE_TYPE CodeType,\r | |
121 | IN EFI_STATUS_CODE_VALUE Value,\r | |
122 | IN UINT32 Instance\r | |
123 | );\r | |
124 | \r | |
125 | /**\r | |
126 | Report status code to all supported device.\r | |
ececc2eb | 127 | \r |
128 | \r | |
ad1a1798 | 129 | @param PeiServices\r |
130 | \r | |
ececc2eb | 131 | @param Type Indicates the type of status code being reported.\r |
ad1a1798 | 132 | The type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.\r |
ececc2eb | 133 | @param Value Describes the current status of a hardware or software entity.\r |
134 | This includes information about the class and subclass that is used to classify the entity\r | |
135 | as well as an operation. For progress codes, the operation is the current activity.\r | |
136 | For error codes, it is the exception. For debug codes, it is not defined at this time.\r | |
137 | Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.\r | |
ad1a1798 | 138 | Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.\r |
ececc2eb | 139 | @param Instance The enumeration of a hardware or software entity within the system.\r |
140 | A system may contain multiple entities that match a class/subclass pairing.\r | |
141 | The instance differentiates between them. An instance of 0 indicates that instance\r | |
ad1a1798 | 142 | information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1.\r |
ececc2eb | 143 | @param CallerId This optional parameter may be used to identify the caller.\r |
ad1a1798 | 144 | This parameter allows the status code driver to apply different rules to different callers.\r |
ececc2eb | 145 | @param Data This optional parameter may be used to pass additional data.\r |
146 | Type EFI_STATUS_CODE_DATA is defined in "Related Definitions" below.\r | |
147 | The contents of this data type may have additional GUID-specific data. The standard GUIDs and\r | |
ad1a1798 | 148 | their associated data structures are defined in the Intel? Platform Innovation Framework for EFI Status Codes Specification.\r |
149 | \r | |
150 | @return Always return EFI_SUCCESS.\r | |
151 | \r | |
152 | **/\r | |
153 | EFI_STATUS\r | |
154 | EFIAPI\r | |
155 | ReportDispatcher (\r | |
156 | IN EFI_PEI_SERVICES **PeiServices,\r | |
157 | IN EFI_STATUS_CODE_TYPE Type,\r | |
158 | IN EFI_STATUS_CODE_VALUE Value,\r | |
159 | IN UINT32 Instance,\r | |
160 | IN EFI_GUID *CallerId OPTIONAL,\r | |
161 | IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r | |
162 | );\r | |
163 | \r | |
164 | #endif\r |