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