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