]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Internal include file for Status Code PEIM.\r | |
3 | \r | |
4 | Copyright (c) 2006 - 2009, Intel Corporation\r | |
5 | All rights reserved. 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 __PEI_STATUS_CODE_H__\r | |
16 | #define __PEI_STATUS_CODE_H__\r | |
17 | \r | |
18 | \r | |
19 | \r | |
20 | #include <FrameworkPei.h>\r | |
21 | #include <Guid/MemoryStatusCodeRecord.h>\r | |
22 | #include <Guid/StatusCodeDataTypeId.h>\r | |
23 | #include <Guid/StatusCodeDataTypeDebug.h>\r | |
24 | #include <Ppi/StatusCode.h>\r | |
25 | \r | |
26 | #include <Library/BaseLib.h>\r | |
27 | #include <Library/BaseMemoryLib.h>\r | |
28 | #include <Library/DebugLib.h>\r | |
29 | #include <Library/PrintLib.h>\r | |
30 | #include <Library/ReportStatusCodeLib.h>\r | |
31 | #include <Library/SerialPortLib.h>\r | |
32 | #include <Library/HobLib.h>\r | |
33 | #include <Library/PcdLib.h>\r | |
34 | #include <Library/PeiServicesLib.h>\r | |
35 | #include <Library/OemHookStatusCodeLib.h>\r | |
36 | #include <Library/PeimEntryPoint.h>\r | |
37 | \r | |
38 | /**\r | |
39 | Convert status code value and extended data to readable ASCII string, send string to serial I/O device.\r | |
40 | \r | |
41 | @param CodeType Indicates the type of status code being reported.\r | |
42 | @param Value Describes the current status of a hardware or\r | |
43 | software entity. This includes information about the class and\r | |
44 | subclass that is used to classify the entity as well as an operation.\r | |
45 | For progress codes, the operation is the current activity.\r | |
46 | For error codes, it is the exception.For debug codes,it is not defined at this time.\r | |
47 | @param Instance The enumeration of a hardware or software entity within\r | |
48 | the system. A system may contain multiple entities that match a class/subclass\r | |
49 | pairing. The instance differentiates between them. An instance of 0 indicates\r | |
50 | that instance information is unavailable, not meaningful, or not relevant.\r | |
51 | Valid instance numbers start with 1.\r | |
52 | @param CallerId This optional parameter may be used to identify the caller.\r | |
53 | This parameter allows the status code driver to apply different rules to\r | |
54 | different callers.\r | |
55 | @param Data This optional parameter may be used to pass additional data.\r | |
56 | \r | |
57 | @retval EFI_SUCCESS Status code reported to serial I/O successfully.\r | |
58 | \r | |
59 | **/\r | |
60 | EFI_STATUS\r | |
61 | SerialStatusCodeReportWorker (\r | |
62 | IN EFI_STATUS_CODE_TYPE CodeType,\r | |
63 | IN EFI_STATUS_CODE_VALUE Value,\r | |
64 | IN UINT32 Instance,\r | |
65 | IN CONST EFI_GUID *CallerId,\r | |
66 | IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL\r | |
67 | );\r | |
68 | \r | |
69 | \r | |
70 | /**\r | |
71 | Create the first memory status code GUID'ed HOB as initialization for memory status code worker.\r | |
72 | \r | |
73 | @retval EFI_SUCCESS The GUID'ed HOB is created successfully.\r | |
74 | \r | |
75 | **/\r | |
76 | EFI_STATUS\r | |
77 | MemoryStatusCodeInitializeWorker (\r | |
78 | VOID\r | |
79 | );\r | |
80 | \r | |
81 | /**\r | |
82 | Report status code into GUID'ed HOB.\r | |
83 | \r | |
84 | This function reports status code into GUID'ed HOB. If not all packets are full, then\r | |
85 | write status code into available entry. Otherwise, create a new packet for it.\r | |
86 | \r | |
87 | @param CodeType Indicates the type of status code being reported.\r | |
88 | @param Value Describes the current status of a hardware or\r | |
89 | software entity. This includes information about the class and\r | |
90 | subclass that is used to classify the entity as well as an operation.\r | |
91 | For progress codes, the operation is the current activity.\r | |
92 | For error codes, it is the exception.For debug codes,it is not defined at this time.\r | |
93 | @param Instance The enumeration of a hardware or software entity within\r | |
94 | the system. A system may contain multiple entities that match a class/subclass\r | |
95 | pairing. The instance differentiates between them. An instance of 0 indicates\r | |
96 | that instance information is unavailable, not meaningful, or not relevant.\r | |
97 | Valid instance numbers start with 1.\r | |
98 | \r | |
99 | @retval EFI_SUCCESS The function always return EFI_SUCCESS.\r | |
100 | \r | |
101 | **/\r | |
102 | EFI_STATUS\r | |
103 | MemoryStatusCodeReportWorker (\r | |
104 | IN EFI_STATUS_CODE_TYPE CodeType,\r | |
105 | IN EFI_STATUS_CODE_VALUE Value,\r | |
106 | IN UINT32 Instance\r | |
107 | );\r | |
108 | \r | |
109 | /**\r | |
110 | Publishes an interface that allows PEIMs to report status codes.\r | |
111 | \r | |
112 | This function implements EFI_PEI_PROGRESS_CODE_PPI.ReportStatusCode().\r | |
113 | It publishes an interface that allows PEIMs to report status codes.\r | |
114 | \r | |
115 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
116 | @param CodeType Indicates the type of status code being reported.\r | |
117 | @param Value Describes the current status of a hardware or\r | |
118 | software entity. This includes information about the class and\r | |
119 | subclass that is used to classify the entity as well as an operation.\r | |
120 | For progress codes, the operation is the current activity.\r | |
121 | For error codes, it is the exception.For debug codes,it is not defined at this time.\r | |
122 | @param Instance The enumeration of a hardware or software entity within\r | |
123 | the system. A system may contain multiple entities that match a class/subclass\r | |
124 | pairing. The instance differentiates between them. An instance of 0 indicates\r | |
125 | that instance information is unavailable, not meaningful, or not relevant.\r | |
126 | Valid instance numbers start with 1.\r | |
127 | @param CallerId This optional parameter may be used to identify the caller.\r | |
128 | This parameter allows the status code driver to apply different rules to\r | |
129 | different callers.\r | |
130 | @param Data This optional parameter may be used to pass additional data.\r | |
131 | \r | |
132 | @retval EFI_SUCCESS The function completed successfully.\r | |
133 | \r | |
134 | **/\r | |
135 | EFI_STATUS\r | |
136 | EFIAPI\r | |
137 | ReportDispatcher (\r | |
138 | IN CONST EFI_PEI_SERVICES **PeiServices,\r | |
139 | IN EFI_STATUS_CODE_TYPE CodeType,\r | |
140 | IN EFI_STATUS_CODE_VALUE Value,\r | |
141 | IN UINT32 Instance,\r | |
142 | IN CONST EFI_GUID *CallerId OPTIONAL,\r | |
143 | IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL\r | |
144 | );\r | |
145 | \r | |
146 | #endif\r | |
147 | \r | |
148 | \r |