]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.h
Clean up: update "EFI" to "UEFI" if applicable.
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / StatusCode / Pei / PeiStatusCode.h
CommitLineData
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
ed7748fe 22\r
ececc2eb 23#include <FrameworkPei.h>\r
551ed06f 24#include <FrameworkModulePei.h>\r
ececc2eb 25#include <Guid/MemoryStatusCodeRecord.h>\r
26#include <Guid/StatusCodeDataTypeId.h>\r
27#include <Ppi/StatusCode.h>\r
ed7748fe 28\r
ececc2eb 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
ad1a1798 40\r
41/**\r
42 Convert status code value and extended data to readable ASCII string, send string to serial I/O device.\r
ececc2eb 43\r
ad1a1798 44 @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.\r
ececc2eb 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
ad1a1798 51 Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.\r
ececc2eb 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
ad1a1798 56 not meaningful, or not relevant. Valid instance numbers start with 1.\r
57\r
58\r
ececc2eb 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
8a7d75b0 61 Type EFI_GUID is defined in InstallProtocolInterface() in the UEFI 2.0 Specification.\r
ad1a1798 62\r
63\r
64 @param Data This optional parameter may be used to pass additional data\r
ececc2eb 65\r
ad1a1798 66 @return The function always return EFI_SUCCESS.\r
67\r
68**/\r
69EFI_STATUS\r
70SerialStatusCodeReportWorker (\r
71 IN EFI_STATUS_CODE_TYPE CodeType,\r
72 IN EFI_STATUS_CODE_VALUE Value,\r
73 IN UINT32 Instance,\r
507b36ca 74 IN CONST EFI_GUID *CallerId,\r
75 IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL\r
ad1a1798 76 );\r
77\r
78\r
79/**\r
80 Initialize memory status code.\r
ececc2eb 81 Create one GUID'ed HOB with PCD defined size. If create required size\r
ad1a1798 82 GUID'ed HOB failed, then ASSERT().\r
ececc2eb 83\r
ad1a1798 84 @return The function always return EFI_SUCCESS\r
85\r
86**/\r
87EFI_STATUS\r
88MemoryStatusCodeInitializeWorker (\r
89 VOID\r
90 );\r
91\r
92/**\r
93 Report status code into GUID'ed HOB.\r
ececc2eb 94\r
ad1a1798 95 @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.\r
ececc2eb 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
ad1a1798 102 Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.\r
ececc2eb 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
ad1a1798 107 not meaningful, or not relevant. Valid instance numbers start with 1.\r
ececc2eb 108\r
ad1a1798 109 @return The function always return EFI_SUCCESS.\r
110\r
111**/\r
112EFI_STATUS\r
113MemoryStatusCodeReportWorker (\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
ececc2eb 121\r
122\r
ad1a1798 123 @param PeiServices\r
124\r
ececc2eb 125 @param Type Indicates the type of status code being reported.\r
ad1a1798 126 The type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.\r
ececc2eb 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
ad1a1798 132 Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.\r
ececc2eb 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
ad1a1798 136 information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1.\r
ececc2eb 137 @param CallerId This optional parameter may be used to identify the caller.\r
ad1a1798 138 This parameter allows the status code driver to apply different rules to different callers.\r
ececc2eb 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
ad1a1798 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
147EFI_STATUS\r
148EFIAPI\r
149ReportDispatcher (\r
507b36ca 150 IN CONST EFI_PEI_SERVICES **PeiServices,\r
ad1a1798 151 IN EFI_STATUS_CODE_TYPE Type,\r
152 IN EFI_STATUS_CODE_VALUE Value,\r
153 IN UINT32 Instance,\r
507b36ca 154 IN CONST EFI_GUID *CallerId OPTIONAL,\r
155 IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL\r
ad1a1798 156 );\r
157\r
158#endif\r