2 Internal include file for Status Code Handler PEIM.
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
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.
15 #ifndef __STATUS_CODE_HANDLER_PEI_H__
16 #define __STATUS_CODE_HANDLER_PEI_H__
19 #include <Ppi/ReportStatusCodeHandler.h>
21 #include <Guid/MemoryStatusCodeRecord.h>
22 #include <Guid/StatusCodeDataTypeId.h>
23 #include <Guid/StatusCodeDataTypeDebug.h>
25 #include <Library/DebugLib.h>
26 #include <Library/PrintLib.h>
27 #include <Library/ReportStatusCodeLib.h>
28 #include <Library/SerialPortLib.h>
29 #include <Library/HobLib.h>
30 #include <Library/PcdLib.h>
31 #include <Library/PeiServicesLib.h>
32 #include <Library/PeimEntryPoint.h>
35 Convert status code value and extended data to readable ASCII string, send string to serial I/O device.
37 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
38 @param CodeType Indicates the type of status code being reported.
39 @param Value Describes the current status of a hardware or
40 software entity. This includes information about the class and
41 subclass that is used to classify the entity as well as an operation.
42 For progress codes, the operation is the current activity.
43 For error codes, it is the exception.For debug codes,it is not defined at this time.
44 @param Instance The enumeration of a hardware or software entity within
45 the system. A system may contain multiple entities that match a class/subclass
46 pairing. The instance differentiates between them. An instance of 0 indicates
47 that instance information is unavailable, not meaningful, or not relevant.
48 Valid instance numbers start with 1.
49 @param CallerId This optional parameter may be used to identify the caller.
50 This parameter allows the status code driver to apply different rules to
52 @param Data This optional parameter may be used to pass additional data.
54 @retval EFI_SUCCESS Status code reported to serial I/O successfully.
58 SerialStatusCodeReportWorker (
59 IN CONST EFI_PEI_SERVICES
**PeiServices
,
60 IN EFI_STATUS_CODE_TYPE CodeType
,
61 IN EFI_STATUS_CODE_VALUE Value
,
63 IN CONST EFI_GUID
*CallerId
,
64 IN CONST EFI_STATUS_CODE_DATA
*Data OPTIONAL
69 Create the first memory status code GUID'ed HOB as initialization for memory status code worker.
71 @retval EFI_SUCCESS The GUID'ed HOB is created successfully.
75 MemoryStatusCodeInitializeWorker (
80 Report status code into GUID'ed HOB.
82 This function reports status code into GUID'ed HOB. If not all packets are full, then
83 write status code into available entry. Otherwise, create a new packet for it.
85 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
86 @param CodeType Indicates the type of status code being reported.
87 @param Value Describes the current status of a hardware or
88 software entity. This includes information about the class and
89 subclass that is used to classify the entity as well as an operation.
90 For progress codes, the operation is the current activity.
91 For error codes, it is the exception.For debug codes,it is not defined at this time.
92 @param Instance The enumeration of a hardware or software entity within
93 the system. A system may contain multiple entities that match a class/subclass
94 pairing. The instance differentiates between them. An instance of 0 indicates
95 that instance information is unavailable, not meaningful, or not relevant.
96 Valid instance numbers start with 1.
97 @param CallerId This optional parameter may be used to identify the caller.
98 This parameter allows the status code driver to apply different rules to
100 @param Data This optional parameter may be used to pass additional data.
102 @retval EFI_SUCCESS The function always return EFI_SUCCESS.
106 MemoryStatusCodeReportWorker (
107 IN CONST EFI_PEI_SERVICES
**PeiServices
,
108 IN EFI_STATUS_CODE_TYPE CodeType
,
109 IN EFI_STATUS_CODE_VALUE Value
,
111 IN CONST EFI_GUID
*CallerId
,
112 IN CONST EFI_STATUS_CODE_DATA
*Data OPTIONAL