]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.h
Enable Report Status Code Router introduced in PI 1.2 for PEI and DXE.
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / StatusCodeHandler / Pei / StatusCodeHandlerPei.h
1 /** @file
2 Internal include file for Status Code Handler 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 __STATUS_CODE_HANDLER_PEI_H__
16 #define __STATUS_CODE_HANDLER_PEI_H__
17
18
19 #include <Ppi/ReportStatusCodeHandler.h>
20
21 #include <Guid/MemoryStatusCodeRecord.h>
22 #include <Guid/StatusCodeDataTypeId.h>
23 #include <Guid/StatusCodeDataTypeDebug.h>
24
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>
33
34 /**
35 Convert status code value and extended data to readable ASCII string, send string to serial I/O device.
36
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
51 different callers.
52 @param Data This optional parameter may be used to pass additional data.
53
54 @retval EFI_SUCCESS Status code reported to serial I/O successfully.
55
56 **/
57 EFI_STATUS
58 SerialStatusCodeReportWorker (
59 IN CONST EFI_PEI_SERVICES **PeiServices,
60 IN EFI_STATUS_CODE_TYPE CodeType,
61 IN EFI_STATUS_CODE_VALUE Value,
62 IN UINT32 Instance,
63 IN CONST EFI_GUID *CallerId,
64 IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL
65 );
66
67
68 /**
69 Create the first memory status code GUID'ed HOB as initialization for memory status code worker.
70
71 @retval EFI_SUCCESS The GUID'ed HOB is created successfully.
72
73 **/
74 EFI_STATUS
75 MemoryStatusCodeInitializeWorker (
76 VOID
77 );
78
79 /**
80 Report status code into GUID'ed HOB.
81
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.
84
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
99 different callers.
100 @param Data This optional parameter may be used to pass additional data.
101
102 @retval EFI_SUCCESS The function always return EFI_SUCCESS.
103
104 **/
105 EFI_STATUS
106 MemoryStatusCodeReportWorker (
107 IN CONST EFI_PEI_SERVICES **PeiServices,
108 IN EFI_STATUS_CODE_TYPE CodeType,
109 IN EFI_STATUS_CODE_VALUE Value,
110 IN UINT32 Instance,
111 IN CONST EFI_GUID *CallerId,
112 IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL
113 );
114
115 #endif
116
117