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