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