]>
Commit | Line | Data |
---|---|---|
1 | \r | |
2 | /** @file\r | |
3 | Heade file of status code PEIM\r | |
4 | \r | |
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 | |
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 | |
23 | #include <FrameworkPei.h>\r | |
24 | #include <FrameworkModulePei.h>\r | |
25 | #include <Guid/MemoryStatusCodeRecord.h>\r | |
26 | #include <Guid/StatusCodeDataTypeId.h>\r | |
27 | #include <Ppi/StatusCode.h>\r | |
28 | \r | |
29 | #include <Library/BaseLib.h>\r | |
30 | #include <Library/BaseMemoryLib.h>\r | |
31 | #include <Library/DebugLib.h>\r | |
32 | #include <Library/PrintLib.h>\r | |
33 | #include <Library/ReportStatusCodeLib.h>\r | |
34 | #include <Library/SerialPortLib.h>\r | |
35 | #include <Library/HobLib.h>\r | |
36 | #include <Library/PcdLib.h>\r | |
37 | #include <Library/PeiServicesLib.h>\r | |
38 | #include <Library/OemHookStatusCodeLib.h>\r | |
39 | #include <Library/PeimEntryPoint.h>\r | |
40 | \r | |
41 | /**\r | |
42 | Convert status code value and extended data to readable ASCII string, send string to serial I/O device.\r | |
43 | \r | |
44 | @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.\r | |
45 | \r | |
46 | @param Value Describes the current status of a hardware or software entity.\r | |
47 | This included information about the class and subclass that is used to classify the entity\r | |
48 | as well as an operation. For progress codes, the operation is the current activity.\r | |
49 | For error codes, it is the exception. For debug codes, it is not defined at this time.\r | |
50 | Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.\r | |
51 | Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.\r | |
52 | \r | |
53 | @param Instance The enumeration of a hardware or software entity within the system.\r | |
54 | A system may contain multiple entities that match a class/subclass pairing.\r | |
55 | The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,\r | |
56 | not meaningful, or not relevant. Valid instance numbers start with 1.\r | |
57 | \r | |
58 | \r | |
59 | @param CallerId This optional parameter may be used to identify the caller.\r | |
60 | This parameter allows the status code driver to apply different rules to different callers.\r | |
61 | Type EFI_GUID is defined in InstallProtocolInterface() in the UEFI 2.0 Specification.\r | |
62 | \r | |
63 | \r | |
64 | @param Data This optional parameter may be used to pass additional data\r | |
65 | \r | |
66 | @return The function always return EFI_SUCCESS.\r | |
67 | \r | |
68 | **/\r | |
69 | EFI_STATUS\r | |
70 | SerialStatusCodeReportWorker (\r | |
71 | IN EFI_STATUS_CODE_TYPE CodeType,\r | |
72 | IN EFI_STATUS_CODE_VALUE Value,\r | |
73 | IN UINT32 Instance,\r | |
74 | IN CONST EFI_GUID *CallerId,\r | |
75 | IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL\r | |
76 | );\r | |
77 | \r | |
78 | \r | |
79 | /**\r | |
80 | Initialize memory status code.\r | |
81 | Create one GUID'ed HOB with PCD defined size. If create required size\r | |
82 | GUID'ed HOB failed, then ASSERT().\r | |
83 | \r | |
84 | @return The function always return EFI_SUCCESS\r | |
85 | \r | |
86 | **/\r | |
87 | EFI_STATUS\r | |
88 | MemoryStatusCodeInitializeWorker (\r | |
89 | VOID\r | |
90 | );\r | |
91 | \r | |
92 | /**\r | |
93 | Report status code into GUID'ed HOB.\r | |
94 | \r | |
95 | @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.\r | |
96 | \r | |
97 | @param Value Describes the current status of a hardware or software entity.\r | |
98 | This included information about the class and subclass that is used to classify the entity\r | |
99 | as well as an operation. For progress codes, the operation is the current activity.\r | |
100 | For error codes, it is the exception. For debug codes, it is not defined at this time.\r | |
101 | Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.\r | |
102 | Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.\r | |
103 | \r | |
104 | @param Instance The enumeration of a hardware or software entity within the system.\r | |
105 | A system may contain multiple entities that match a class/subclass pairing.\r | |
106 | The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,\r | |
107 | not meaningful, or not relevant. Valid instance numbers start with 1.\r | |
108 | \r | |
109 | @return The function always return EFI_SUCCESS.\r | |
110 | \r | |
111 | **/\r | |
112 | EFI_STATUS\r | |
113 | MemoryStatusCodeReportWorker (\r | |
114 | IN EFI_STATUS_CODE_TYPE CodeType,\r | |
115 | IN EFI_STATUS_CODE_VALUE Value,\r | |
116 | IN UINT32 Instance\r | |
117 | );\r | |
118 | \r | |
119 | /**\r | |
120 | Report status code to all supported device.\r | |
121 | \r | |
122 | \r | |
123 | @param PeiServices\r | |
124 | \r | |
125 | @param Type Indicates the type of status code being reported.\r | |
126 | The type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.\r | |
127 | @param Value Describes the current status of a hardware or software entity.\r | |
128 | This includes information about the class and subclass that is used to classify the entity\r | |
129 | as well as an operation. For progress codes, the operation is the current activity.\r | |
130 | For error codes, it is the exception. For debug codes, it is not defined at this time.\r | |
131 | Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.\r | |
132 | Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.\r | |
133 | @param Instance The enumeration of a hardware or software entity within the system.\r | |
134 | A system may contain multiple entities that match a class/subclass pairing.\r | |
135 | The instance differentiates between them. An instance of 0 indicates that instance\r | |
136 | information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1.\r | |
137 | @param CallerId This optional parameter may be used to identify the caller.\r | |
138 | This parameter allows the status code driver to apply different rules to different callers.\r | |
139 | @param Data This optional parameter may be used to pass additional data.\r | |
140 | Type EFI_STATUS_CODE_DATA is defined in "Related Definitions" below.\r | |
141 | The contents of this data type may have additional GUID-specific data. The standard GUIDs and\r | |
142 | their associated data structures are defined in the Intel? Platform Innovation Framework for EFI Status Codes Specification.\r | |
143 | \r | |
144 | @return Always return EFI_SUCCESS.\r | |
145 | \r | |
146 | **/\r | |
147 | EFI_STATUS\r | |
148 | EFIAPI\r | |
149 | ReportDispatcher (\r | |
150 | IN CONST EFI_PEI_SERVICES **PeiServices,\r | |
151 | IN EFI_STATUS_CODE_TYPE Type,\r | |
152 | IN EFI_STATUS_CODE_VALUE Value,\r | |
153 | IN UINT32 Instance,\r | |
154 | IN CONST EFI_GUID *CallerId OPTIONAL,\r | |
155 | IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL\r | |
156 | );\r | |
157 | \r | |
158 | #endif\r |