]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.h
Retire <FrameworkModuleBase.h>, <FrameworkModuleDxe.h>, and <FrameworkModulePei.h>
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / StatusCode / Pei / StatusCodePei.h
1 /** @file
2 Internal include file for Status Code PEIM.
3
4 Copyright (c) 2006 - 2009, 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 <Guid/MemoryStatusCodeRecord.h>
22 #include <Guid/StatusCodeDataTypeId.h>
23 #include <Guid/StatusCodeDataTypeDebug.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.
42 @param Value Describes the current status of a hardware or
43 software entity. This includes information about the class and
44 subclass that is used to classify the entity as well as an operation.
45 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 @param Instance The enumeration of a hardware or software entity within
48 the system. A system may contain multiple entities that match a class/subclass
49 pairing. The instance differentiates between them. An instance of 0 indicates
50 that instance information is unavailable, not meaningful, or not relevant.
51 Valid instance numbers start with 1.
52 @param CallerId This optional parameter may be used to identify the caller.
53 This parameter allows the status code driver to apply different rules to
54 different callers.
55 @param Data This optional parameter may be used to pass additional data.
56
57 @retval EFI_SUCCESS Status code reported to serial I/O successfully.
58
59 **/
60 EFI_STATUS
61 SerialStatusCodeReportWorker (
62 IN EFI_STATUS_CODE_TYPE CodeType,
63 IN EFI_STATUS_CODE_VALUE Value,
64 IN UINT32 Instance,
65 IN CONST EFI_GUID *CallerId,
66 IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL
67 );
68
69
70 /**
71 Create the first memory status code GUID'ed HOB as initialization for memory status code worker.
72
73 @retval EFI_SUCCESS The GUID'ed HOB is created successfully.
74
75 **/
76 EFI_STATUS
77 MemoryStatusCodeInitializeWorker (
78 VOID
79 );
80
81 /**
82 Report status code into GUID'ed HOB.
83
84 This function reports status code into GUID'ed HOB. If not all packets are full, then
85 write status code into available entry. Otherwise, create a new packet for it.
86
87 @param CodeType Indicates the type of status code being reported.
88 @param Value Describes the current status of a hardware or
89 software entity. This includes information about the class and
90 subclass that is used to classify the entity as well as an operation.
91 For progress codes, the operation is the current activity.
92 For error codes, it is the exception.For debug codes,it is not defined at this time.
93 @param Instance The enumeration of a hardware or software entity within
94 the system. A system may contain multiple entities that match a class/subclass
95 pairing. The instance differentiates between them. An instance of 0 indicates
96 that instance information is unavailable, not meaningful, or not relevant.
97 Valid instance numbers start with 1.
98
99 @retval EFI_SUCCESS The function always return EFI_SUCCESS.
100
101 **/
102 EFI_STATUS
103 MemoryStatusCodeReportWorker (
104 IN EFI_STATUS_CODE_TYPE CodeType,
105 IN EFI_STATUS_CODE_VALUE Value,
106 IN UINT32 Instance
107 );
108
109 /**
110 Publishes an interface that allows PEIMs to report status codes.
111
112 This function implements EFI_PEI_PROGRESS_CODE_PPI.ReportStatusCode().
113 It publishes an interface that allows PEIMs to report status codes.
114
115 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
116 @param CodeType Indicates the type of status code being reported.
117 @param Value Describes the current status of a hardware or
118 software entity. This includes information about the class and
119 subclass that is used to classify the entity as well as an operation.
120 For progress codes, the operation is the current activity.
121 For error codes, it is the exception.For debug codes,it is not defined at this time.
122 @param Instance The enumeration of a hardware or software entity within
123 the system. A system may contain multiple entities that match a class/subclass
124 pairing. The instance differentiates between them. An instance of 0 indicates
125 that instance information is unavailable, not meaningful, or not relevant.
126 Valid instance numbers start with 1.
127 @param CallerId This optional parameter may be used to identify the caller.
128 This parameter allows the status code driver to apply different rules to
129 different callers.
130 @param Data This optional parameter may be used to pass additional data.
131
132 @retval EFI_SUCCESS The function completed successfully.
133
134 **/
135 EFI_STATUS
136 EFIAPI
137 ReportDispatcher (
138 IN CONST EFI_PEI_SERVICES **PeiServices,
139 IN EFI_STATUS_CODE_TYPE CodeType,
140 IN EFI_STATUS_CODE_VALUE Value,
141 IN UINT32 Instance,
142 IN CONST EFI_GUID *CallerId OPTIONAL,
143 IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL
144 );
145
146 #endif
147
148