]>
Commit | Line | Data |
---|---|---|
3af9b388 | 1 | /** @file\r |
2 | Internal include file for Status Code Handler PEIM.\r | |
3 | \r | |
90eaa3c1 | 4 | Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r |
9d510e61 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
3af9b388 | 6 | \r |
7 | **/\r | |
8 | \r | |
9 | #ifndef __STATUS_CODE_HANDLER_PEI_H__\r | |
10 | #define __STATUS_CODE_HANDLER_PEI_H__\r | |
11 | \r | |
12 | \r | |
13 | #include <Ppi/ReportStatusCodeHandler.h>\r | |
14 | \r | |
15 | #include <Guid/MemoryStatusCodeRecord.h>\r | |
16 | #include <Guid/StatusCodeDataTypeId.h>\r | |
17 | #include <Guid/StatusCodeDataTypeDebug.h>\r | |
18 | \r | |
19 | #include <Library/DebugLib.h>\r | |
20 | #include <Library/PrintLib.h>\r | |
21 | #include <Library/ReportStatusCodeLib.h>\r | |
22 | #include <Library/SerialPortLib.h>\r | |
23 | #include <Library/HobLib.h>\r | |
24 | #include <Library/PcdLib.h>\r | |
25 | #include <Library/PeiServicesLib.h>\r | |
26 | #include <Library/PeimEntryPoint.h>\r | |
96a25163 | 27 | #include <Library/BaseMemoryLib.h>\r |
3af9b388 | 28 | \r |
90eaa3c1 SZ |
29 | //\r |
30 | // Define the maximum message length\r | |
31 | //\r | |
32 | #define MAX_DEBUG_MESSAGE_LENGTH 0x100\r | |
33 | \r | |
3af9b388 | 34 | /**\r |
35 | Convert status code value and extended data to readable ASCII string, send string to serial I/O device.\r | |
36 | \r | |
37 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
38 | @param CodeType Indicates the type of status code being reported.\r | |
39 | @param Value Describes the current status of a hardware or\r | |
40 | software entity. This includes information about the class and\r | |
41 | subclass that is used to classify the entity as well as an operation.\r | |
42 | For progress codes, the operation is the current activity.\r | |
43 | For error codes, it is the exception.For debug codes,it is not defined at this time.\r | |
44 | @param Instance The enumeration of a hardware or software entity within\r | |
45 | the system. A system may contain multiple entities that match a class/subclass\r | |
46 | pairing. The instance differentiates between them. An instance of 0 indicates\r | |
47 | that instance information is unavailable, not meaningful, or not relevant.\r | |
48 | Valid instance numbers start with 1.\r | |
49 | @param CallerId This optional parameter may be used to identify the caller.\r | |
50 | This parameter allows the status code driver to apply different rules to\r | |
51 | different callers.\r | |
52 | @param Data This optional parameter may be used to pass additional data.\r | |
53 | \r | |
54 | @retval EFI_SUCCESS Status code reported to serial I/O successfully.\r | |
55 | \r | |
56 | **/\r | |
57 | EFI_STATUS\r | |
4a5b245a | 58 | EFIAPI\r |
3af9b388 | 59 | SerialStatusCodeReportWorker (\r |
60 | IN CONST EFI_PEI_SERVICES **PeiServices,\r | |
61 | IN EFI_STATUS_CODE_TYPE CodeType,\r | |
62 | IN EFI_STATUS_CODE_VALUE Value,\r | |
63 | IN UINT32 Instance,\r | |
64 | IN CONST EFI_GUID *CallerId,\r | |
65 | IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL\r | |
66 | );\r | |
67 | \r | |
68 | \r | |
69 | /**\r | |
70 | Create the first memory status code GUID'ed HOB as initialization for memory status code worker.\r | |
71 | \r | |
72 | @retval EFI_SUCCESS The GUID'ed HOB is created successfully.\r | |
73 | \r | |
74 | **/\r | |
75 | EFI_STATUS\r | |
76 | MemoryStatusCodeInitializeWorker (\r | |
77 | VOID\r | |
78 | );\r | |
79 | \r | |
80 | /**\r | |
81 | Report status code into GUID'ed HOB.\r | |
82 | \r | |
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 | |
85 | \r | |
86 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
87 | @param CodeType Indicates the type of status code being reported.\r | |
88 | @param Value Describes the current status of a hardware or\r | |
89 | software entity. This includes information about the class and\r | |
90 | subclass that is used to classify the entity as well as an operation.\r | |
91 | For progress codes, the operation is the current activity.\r | |
92 | For error codes, it is the exception.For debug codes,it is not defined at this time.\r | |
93 | @param Instance The enumeration of a hardware or software entity within\r | |
94 | the system. A system may contain multiple entities that match a class/subclass\r | |
95 | pairing. The instance differentiates between them. An instance of 0 indicates\r | |
96 | that instance information is unavailable, not meaningful, or not relevant.\r | |
97 | Valid instance numbers start with 1.\r | |
98 | @param CallerId This optional parameter may be used to identify the caller.\r | |
99 | This parameter allows the status code driver to apply different rules to\r | |
100 | different callers.\r | |
101 | @param Data This optional parameter may be used to pass additional data.\r | |
102 | \r | |
103 | @retval EFI_SUCCESS The function always return EFI_SUCCESS.\r | |
104 | \r | |
105 | **/\r | |
106 | EFI_STATUS\r | |
4a5b245a | 107 | EFIAPI\r |
3af9b388 | 108 | MemoryStatusCodeReportWorker (\r |
109 | IN CONST EFI_PEI_SERVICES **PeiServices,\r | |
110 | IN EFI_STATUS_CODE_TYPE CodeType,\r | |
111 | IN EFI_STATUS_CODE_VALUE Value,\r | |
112 | IN UINT32 Instance,\r | |
113 | IN CONST EFI_GUID *CallerId,\r | |
114 | IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL\r | |
115 | );\r | |
116 | \r | |
117 | #endif\r | |
118 | \r | |
119 | \r |