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