]>
Commit | Line | Data |
---|---|---|
3cbfba02 DW |
1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r | |
4 | \r\r | |
5 | This program and the accompanying materials are licensed and made available under\r\r | |
6 | the terms and conditions of the BSD License that accompanies this distribution. \r\r | |
7 | The full text of the license may be found at \r\r | |
8 | http://opensource.org/licenses/bsd-license.php. \r\r | |
9 | \r\r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r\r | |
12 | \r\r | |
13 | \r | |
14 | Module Name:\r | |
15 | \r | |
16 | PlatformStatusCode.h\r | |
17 | \r | |
18 | Abstract:\r | |
19 | \r | |
20 | Contains Platform specific implementations required to use status codes.\r | |
21 | \r | |
22 | --*/\r | |
23 | \r | |
24 | #ifndef _PLATFORM_STATUS_CODE_H_\r | |
25 | #define _PLATFORM_STATUS_CODE_H_\r | |
26 | \r | |
27 | \r | |
28 | #define CONFIG_PORT0 0x4E\r | |
29 | #define INDEX_PORT0 0x4E\r | |
30 | #define DATA_PORT0 0x4F\r | |
31 | #define PCI_IDX 0xCF8\r | |
32 | #define PCI_DAT 0xCFC\r | |
33 | \r | |
34 | #include "MonoStatusCode.h"\r | |
35 | \r | |
36 | /*++\r | |
37 | \r | |
38 | Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved\r | |
39 | \r\r | |
40 | This program and the accompanying materials are licensed and made available under\r\r | |
41 | the terms and conditions of the BSD License that accompanies this distribution. \r\r | |
42 | The full text of the license may be found at \r\r | |
43 | http://opensource.org/licenses/bsd-license.php. \r\r | |
44 | \r\r | |
45 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r\r | |
46 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r\r | |
47 | \r\r | |
48 | This software and associated documentation (if any) is furnished\r | |
49 | under a license and may only be used or copied in accordance\r | |
50 | with the terms of the license. Except as permitted by such\r | |
51 | license, no part of this software or documentation may be\r | |
52 | reproduced, stored in a retrieval system, or transmitted in any\r | |
53 | form or by any means without the express written consent of\r | |
54 | Intel Corporation.\r | |
55 | \r | |
56 | \r | |
57 | Module Name:\r | |
58 | \r | |
59 | Port80StatusCodeLib.h\r | |
60 | \r | |
61 | Abstract:\r | |
62 | \r | |
63 | Lib to provide status code reporting via port 80.\r | |
64 | \r | |
65 | --*/\r | |
66 | \r | |
67 | #ifndef _PEI_PORT_80_STATUS_CODE_H_\r | |
68 | #define _PEI_PORT_80_STATUS_CODE_H_\r | |
69 | \r | |
70 | \r | |
71 | \r | |
72 | //\r | |
73 | // Status code reporting function\r | |
74 | //\r | |
75 | EFI_STATUS\r | |
76 | Port80ReportStatusCode (\r | |
77 | IN CONST EFI_PEI_SERVICES **PeiServices,\r | |
78 | IN EFI_STATUS_CODE_TYPE CodeType,\r | |
79 | IN EFI_STATUS_CODE_VALUE Value,\r | |
80 | IN UINT32 Instance,\r | |
81 | IN CONST EFI_GUID * CallerId,\r | |
82 | IN CONST EFI_STATUS_CODE_DATA * Data OPTIONAL\r | |
83 | );\r | |
84 | \r | |
85 | #endif\r | |
86 | \r | |
87 | /*++\r | |
88 | \r | |
89 | Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved\r | |
90 | \r\r | |
91 | This program and the accompanying materials are licensed and made available under\r\r | |
92 | the terms and conditions of the BSD License that accompanies this distribution. \r\r | |
93 | The full text of the license may be found at \r\r | |
94 | http://opensource.org/licenses/bsd-license.php. \r\r | |
95 | \r\r | |
96 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r\r | |
97 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r\r | |
98 | \r\r | |
99 | This software and associated documentation (if any) is furnished\r | |
100 | under a license and may only be used or copied in accordance\r | |
101 | with the terms of the license. Except as permitted by such\r | |
102 | license, no part of this software or documentation may be\r | |
103 | reproduced, stored in a retrieval system, or transmitted in any\r | |
104 | form or by any means without the express written consent of\r | |
105 | Intel Corporation.\r | |
106 | \r | |
107 | \r | |
108 | Module Name:\r | |
109 | \r | |
110 | SerialStatusCodeLib.h\r | |
111 | \r | |
112 | Abstract:\r | |
113 | \r | |
114 | Lib to provide Serial I/O status code reporting.\r | |
115 | \r | |
116 | --*/\r | |
117 | \r | |
118 | #ifndef _PEI_SERIAL_STATUS_CODE_LIB_H_\r | |
119 | #define _PEI_SERIAL_STATUS_CODE_LIB_H_\r | |
120 | \r | |
121 | \r | |
122 | #include <Guid/StatusCodeDataTypeId.h>\r | |
123 | #include <Guid/StatusCodeDataTypeDebug.h>\r | |
124 | #include <Library/ReportStatusCodeLib.h>\r | |
125 | #include <Library/PrintLib.h>\r | |
126 | #include <Library/BaseMemoryLib.h>\r | |
127 | \r | |
128 | //\r | |
129 | // Initialization function\r | |
130 | //\r | |
131 | VOID\r | |
132 | SerialInitializeStatusCode (\r | |
133 | VOID\r | |
134 | );\r | |
135 | \r | |
136 | //\r | |
137 | // Status code reporting function\r | |
138 | //\r | |
139 | EFI_STATUS\r | |
140 | SerialReportStatusCode (\r | |
141 | IN CONST EFI_PEI_SERVICES **PeiServices,\r | |
142 | IN EFI_STATUS_CODE_TYPE CodeType,\r | |
143 | IN EFI_STATUS_CODE_VALUE Value,\r | |
144 | IN UINT32 Instance,\r | |
145 | IN CONST EFI_GUID * CallerId,\r | |
146 | IN CONST EFI_STATUS_CODE_DATA * Data OPTIONAL\r | |
147 | );\r | |
148 | \r | |
149 | #endif\r | |
150 | \r | |
151 | extern EFI_PEI_PROGRESS_CODE_PPI mStatusCodePpi;\r | |
152 | extern EFI_PEI_PPI_DESCRIPTOR mPpiListStatusCode;\r | |
153 | #define EFI_SIGNATURE_16(A, B) ((A) | (B << 8))\r | |
154 | #define EFI_SIGNATURE_32(A, B, C, D) (EFI_SIGNATURE_16 (A, B) | (EFI_SIGNATURE_16 (C, D) << 16))\r | |
155 | #define STATUSCODE_PEIM_SIGNATURE EFI_SIGNATURE_32 ('p', 's', 't', 'c')\r | |
156 | \r | |
157 | typedef struct {\r | |
158 | UINT32 Signature;\r | |
159 | EFI_FFS_FILE_HEADER *FfsHeader;\r | |
160 | EFI_PEI_NOTIFY_DESCRIPTOR StatusCodeNotify;\r | |
161 | } STATUSCODE_CALLBACK_STATE_INFORMATION;\r | |
162 | \r | |
163 | #pragma pack(1)\r | |
164 | typedef struct {\r | |
165 | UINT16 Limit;\r | |
166 | UINT32 Base;\r | |
167 | } GDT_DSCRIPTOR;\r | |
168 | #pragma pack()\r | |
169 | \r | |
170 | #define STATUSCODE_PEIM_FROM_THIS(a) \\r | |
171 | BASE_CR ( \\r | |
172 | a, \\r | |
173 | STATUSCODE_CALLBACK_STATE_INFORMATION, \\r | |
174 | StatusCodeNotify \\r | |
175 | )\r | |
176 | \r | |
177 | VOID\r | |
178 | EFIAPI\r | |
179 | PlatformInitializeStatusCode (\r | |
180 | IN EFI_FFS_FILE_HEADER *FfsHeader,\r | |
181 | IN CONST EFI_PEI_SERVICES **PeiServices\r | |
182 | );\r | |
183 | \r | |
184 | \r | |
185 | //\r | |
186 | // Function declarations\r | |
187 | //\r | |
188 | /**\r | |
189 | Install Firmware Volume Hob's once there is main memory\r | |
190 | \r | |
191 | @param PeiServices General purpose services available to every PEIM.\r | |
192 | @param NotifyDescriptor Not Used\r | |
193 | @param Ppi Not Used\r | |
194 | \r | |
195 | @retval Status EFI_SUCCESS if the interface could be successfully\r | |
196 | installed\r | |
197 | \r | |
198 | **/\r | |
199 | EFI_STATUS\r | |
200 | EFIAPI\r | |
201 | MemoryDiscoveredPpiNotifyCallback (\r | |
202 | IN EFI_PEI_SERVICES **PeiServices,\r | |
203 | IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,\r | |
204 | IN VOID *Ppi\r | |
205 | );\r | |
206 | \r | |
207 | #endif\r |