]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.h
Update the copyright notice format
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / StatusCode / Pei / StatusCodePei.h
CommitLineData
ad1a1798 1/** @file\r
d5aea10c 2 Internal include file for Status Code PEIM.\r
ad1a1798 3\r
180a5a35
HT
4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials\r
ececc2eb 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
ececc2eb 18#include <FrameworkPei.h>\r
79bc7a89 19\r
ececc2eb 20#include <Guid/MemoryStatusCodeRecord.h>\r
21#include <Guid/StatusCodeDataTypeId.h>\r
785e0c07 22#include <Guid/StatusCodeDataTypeDebug.h>\r
ececc2eb 23#include <Ppi/StatusCode.h>\r
ed7748fe 24\r
ececc2eb 25#include <Library/BaseLib.h>\r
26#include <Library/BaseMemoryLib.h>\r
27#include <Library/DebugLib.h>\r
28#include <Library/PrintLib.h>\r
29#include <Library/ReportStatusCodeLib.h>\r
30#include <Library/SerialPortLib.h>\r
31#include <Library/HobLib.h>\r
32#include <Library/PcdLib.h>\r
33#include <Library/PeiServicesLib.h>\r
34#include <Library/OemHookStatusCodeLib.h>\r
35#include <Library/PeimEntryPoint.h>\r
ad1a1798 36\r
37/**\r
38 Convert status code value and extended data to readable ASCII string, send string to serial I/O device.\r
ececc2eb 39\r
d5aea10c 40 @param CodeType Indicates the type of status code being reported.\r
41 @param Value Describes the current status of a hardware or\r
42 software entity. This includes information about the class and\r
43 subclass that is used to classify the entity as well as an operation.\r
44 For progress codes, the operation is the current activity.\r
45 For error codes, it is the exception.For debug codes,it is not defined at this time.\r
46 @param Instance The enumeration of a hardware or software entity within\r
47 the system. A system may contain multiple entities that match a class/subclass\r
48 pairing. The instance differentiates between them. An instance of 0 indicates\r
49 that instance information is unavailable, not meaningful, or not relevant.\r
50 Valid instance numbers start with 1.\r
51 @param CallerId This optional parameter may be used to identify the caller.\r
52 This parameter allows the status code driver to apply different rules to\r
53 different callers.\r
54 @param Data This optional parameter may be used to pass additional data.\r
55\r
56 @retval EFI_SUCCESS Status code reported to serial I/O successfully.\r
ad1a1798 57\r
58**/\r
59EFI_STATUS\r
60SerialStatusCodeReportWorker (\r
d5aea10c 61 IN EFI_STATUS_CODE_TYPE CodeType,\r
62 IN EFI_STATUS_CODE_VALUE Value,\r
63 IN UINT32 Instance,\r
507b36ca 64 IN CONST EFI_GUID *CallerId,\r
65 IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL\r
ad1a1798 66 );\r
67\r
68\r
69/**\r
d5aea10c 70 Create the first memory status code GUID'ed HOB as initialization for memory status code worker.\r
ececc2eb 71\r
d5aea10c 72 @retval EFI_SUCCESS The GUID'ed HOB is created successfully.\r
ad1a1798 73\r
74**/\r
75EFI_STATUS\r
76MemoryStatusCodeInitializeWorker (\r
77 VOID\r
78 );\r
79\r
80/**\r
81 Report status code into GUID'ed HOB.\r
ececc2eb 82\r
d5aea10c 83 This function reports status code into GUID'ed HOB. If not all packets are full, then\r
84 write status code into available entry. Otherwise, create a new packet for it.\r
ececc2eb 85\r
d5aea10c 86 @param CodeType Indicates the type of status code being reported.\r
87 @param Value Describes the current status of a hardware or\r
88 software entity. This includes information about the class and\r
89 subclass that is used to classify the entity as well as an operation.\r
90 For progress codes, the operation is the current activity.\r
91 For error codes, it is the exception.For debug codes,it is not defined at this time.\r
92 @param Instance The enumeration of a hardware or software entity within\r
93 the system. A system may contain multiple entities that match a class/subclass\r
94 pairing. The instance differentiates between them. An instance of 0 indicates\r
95 that instance information is unavailable, not meaningful, or not relevant.\r
96 Valid instance numbers start with 1.\r
ececc2eb 97\r
d5aea10c 98 @retval EFI_SUCCESS The function always return EFI_SUCCESS.\r
ad1a1798 99\r
100**/\r
101EFI_STATUS\r
102MemoryStatusCodeReportWorker (\r
103 IN EFI_STATUS_CODE_TYPE CodeType,\r
104 IN EFI_STATUS_CODE_VALUE Value,\r
105 IN UINT32 Instance\r
106 );\r
107\r
108/**\r
d5aea10c 109 Publishes an interface that allows PEIMs to report status codes.\r
110\r
111 This function implements EFI_PEI_PROGRESS_CODE_PPI.ReportStatusCode().\r
112 It publishes an interface that allows PEIMs to report status codes.\r
113\r
114 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
115 @param CodeType Indicates the type of status code being reported.\r
116 @param Value Describes the current status of a hardware or\r
117 software entity. This includes information about the class and\r
118 subclass that is used to classify the entity as well as an operation.\r
119 For progress codes, the operation is the current activity.\r
120 For error codes, it is the exception.For debug codes,it is not defined at this time.\r
121 @param Instance The enumeration of a hardware or software entity within\r
122 the system. A system may contain multiple entities that match a class/subclass\r
123 pairing. The instance differentiates between them. An instance of 0 indicates\r
124 that instance information is unavailable, not meaningful, or not relevant.\r
125 Valid instance numbers start with 1.\r
126 @param CallerId This optional parameter may be used to identify the caller.\r
127 This parameter allows the status code driver to apply different rules to\r
128 different callers.\r
129 @param Data This optional parameter may be used to pass additional data.\r
130\r
131 @retval EFI_SUCCESS The function completed successfully.\r
ad1a1798 132\r
133**/\r
134EFI_STATUS\r
135EFIAPI\r
136ReportDispatcher (\r
507b36ca 137 IN CONST EFI_PEI_SERVICES **PeiServices,\r
d5aea10c 138 IN EFI_STATUS_CODE_TYPE CodeType,\r
139 IN EFI_STATUS_CODE_VALUE Value,\r
140 IN UINT32 Instance,\r
507b36ca 141 IN CONST EFI_GUID *CallerId OPTIONAL,\r
142 IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL\r
ad1a1798 143 );\r
144\r
d5aea10c 145#endif\r
bcd70414 146\r
147\r