]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Universal/StatusCode/Pei/PeiStatusCode.h
Modules clean up.
[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 // The package level header files this module uses
24 //
25 #include <FrameworkPei.h>
26 //
27 // The protocols, PPI and GUID defintions for this module
28 //
29 #include <Guid/MemoryStatusCodeRecord.h>
30 #include <Guid/StatusCodeDataTypeId.h>
31 #include <Ppi/StatusCode.h>
32 //
33 // The Library classes this module consumes
34 //
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>
46
47 /**
48 Convert status code value and extended data to readable ASCII string, send string to serial I/O device.
49
50 @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.
51
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.
58
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.
63
64
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.
68
69
70 @param Data This optional parameter may be used to pass additional data
71
72 @return The function always return EFI_SUCCESS.
73
74 **/
75 EFI_STATUS
76 SerialStatusCodeReportWorker (
77 IN EFI_STATUS_CODE_TYPE CodeType,
78 IN EFI_STATUS_CODE_VALUE Value,
79 IN UINT32 Instance,
80 IN EFI_GUID *CallerId,
81 IN EFI_STATUS_CODE_DATA *Data OPTIONAL
82 );
83
84
85 /**
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().
89
90 @return The function always return EFI_SUCCESS
91
92 **/
93 EFI_STATUS
94 MemoryStatusCodeInitializeWorker (
95 VOID
96 );
97
98 /**
99 Report status code into GUID'ed HOB.
100
101 @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.
102
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.
109
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.
114
115 @return The function always return EFI_SUCCESS.
116
117 **/
118 EFI_STATUS
119 MemoryStatusCodeReportWorker (
120 IN EFI_STATUS_CODE_TYPE CodeType,
121 IN EFI_STATUS_CODE_VALUE Value,
122 IN UINT32 Instance
123 );
124
125 /**
126 Report status code to all supported device.
127
128
129 @param PeiServices
130
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.
149
150 @return Always return EFI_SUCCESS.
151
152 **/
153 EFI_STATUS
154 EFIAPI
155 ReportDispatcher (
156 IN EFI_PEI_SERVICES **PeiServices,
157 IN EFI_STATUS_CODE_TYPE Type,
158 IN EFI_STATUS_CODE_VALUE Value,
159 IN UINT32 Instance,
160 IN EFI_GUID *CallerId OPTIONAL,
161 IN EFI_STATUS_CODE_DATA *Data OPTIONAL
162 );
163
164 #endif