]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Common/EdkIIGlueDependencies.h
241333f29fc3bcf156fd4758f6e0cf862cb6d6a5
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Include / Common / EdkIIGlueDependencies.h
1 /*++
2
3 Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12
13 Module Name:
14
15 EdkIIGlueDepedencies.h
16
17 Abstract:
18
19 Header file that lists dependency relations among library instances
20
21 --*/
22
23 #ifndef __EDKII_GLUE_DEPENDENCIES_H__
24 #define __EDKII_GLUE_DEPENDENCIES_H__
25
26 #include "EdkIIGlueProcessorBind.h"
27
28 //
29 // Declarations of dependencies among EDKII Glue Library instances and EDK Libraries
30 // Pay attention to the order of following #define structures
31 //
32
33
34 //
35 // PeiDxeDebugLibReportStatusCode
36 // Actually almost every module and GlueLib instance needs this library, but GlueLib
37 // instances don't have to list this library in their own inf files. Module inf
38 // does this.
39 //
40 #ifdef __EDKII_GLUE_PEI_DXE_DEBUG_LIB_REPORT_STATUS_CODE__
41 #ifndef __EDKII_GLUE_BASE_LIB__
42 #define __EDKII_GLUE_BASE_LIB__
43 #endif
44 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
45 #define __EDKII_GLUE_BASE_MEMORY_LIB__
46 #endif
47 #endif
48
49 //
50 // BaseDebugLibNull
51 //
52 #ifdef __EDKII_GLUE_BASE_DEBUG_LIB_NULL__
53 #ifndef __EDKII_GLUE_BASE_LIB__
54 #define __EDKII_GLUE_BASE_LIB__
55 #endif
56 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
57 #define __EDKII_GLUE_BASE_MEMORY_LIB__
58 #endif
59 #ifndef __EDKII_GLUE_BASE_PRINT_LIB__
60 #define __EDKII_GLUE_BASE_PRINT_LIB__
61 #endif
62 #endif
63
64 //
65 // DxePerformanceLib
66 //
67 #ifdef __EDKII_GLUE_DXE_PERFORMANCE_LIB__
68 #ifndef __EDKII_GLUE_BASE_LIB__
69 #define __EDKII_GLUE_BASE_LIB__
70 #endif
71 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
72 #define __EDKII_GLUE_BASE_MEMORY_LIB__
73 #endif
74 #ifndef __EDKII_GLUE_DXE_MEMORY_ALLOCATION_LIB__
75 #define __EDKII_GLUE_DXE_MEMORY_ALLOCATION_LIB__
76 #endif
77 #ifndef __EDKII_GLUE_DXE_HOB_LIB__
78 #define __EDKII_GLUE_DXE_HOB_LIB__
79 #endif
80 #ifndef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
81 #define __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
82 #endif
83 #ifndef __EDKII_GLUE_UEFI_LIB__
84 #define __EDKII_GLUE_UEFI_LIB__
85 #endif
86 #endif
87
88 //
89 // PeiPerformanceLib
90 //
91 #ifdef __EDKII_GLUE_PEI_PERFORMANCE_LIB__
92 #ifndef __EDKII_GLUE_BASE_LIB__
93 #define __EDKII_GLUE_BASE_LIB__
94 #endif
95 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
96 #define __EDKII_GLUE_BASE_MEMORY_LIB__
97 #endif
98 #ifndef __EDKII_GLUE_PEI_SERVICES_LIB__
99 #define __EDKII_GLUE_PEI_SERVICES_LIB__
100 #endif
101 #endif
102
103 //
104 // EdkDxeRuntimeDriverLib
105 //
106 #ifdef __EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__
107 #ifndef __EDKII_GLUE_UEFI_LIB__
108 #define __EDKII_GLUE_UEFI_LIB__
109 #endif
110 #ifndef __EDKII_GLUE_BASE_LIB__
111 #define __EDKII_GLUE_BASE_LIB__
112 #endif
113 #ifndef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
114 #define __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
115 #endif
116 #endif
117
118 //
119 // EdkDxeSalLib
120 //
121 #ifdef __EDKII_GLUE_EDK_DXE_SAL_LIB__
122 #ifndef __EDKII_GLUE_BASE_LIB__
123 #define __EDKII_GLUE_BASE_LIB__
124 #endif
125 #ifndef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
126 #define __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
127 #endif
128 #endif
129
130 //
131 // BasePciLibCf8
132 //
133 #ifdef __EDKII_GLUE_BASE_PCI_LIB_CF8__
134 #ifndef __EDKII_GLUE_BASE_PCI_CF8_LIB__
135 #define __EDKII_GLUE_BASE_PCI_CF8_LIB__
136 #endif
137 #endif
138
139 //
140 // BasePciLibPciExpress
141 //
142 #ifdef __EDKII_GLUE_BASE_PCI_LIB_PCI_EXPRESS__
143 #ifndef __EDKII_GLUE_BASE_PCI_EXPRESS_LIB__
144 #define __EDKII_GLUE_BASE_PCI_EXPRESS_LIB__
145 #endif
146 #endif
147
148 //
149 // BasePciCf8Lib
150 //
151 #ifdef __EDKII_GLUE_BASE_PCI_CF8_LIB__
152 #ifndef MDE_CPU_EBC
153 #ifndef __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
154 #define __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
155 #endif
156 #else
157 #ifndef __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
158 #define __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
159 #endif
160 #endif
161 #endif
162
163 //
164 // BasePciExpressLib
165 //
166 #ifdef __EDKII_GLUE_BASE_PCI_EXPRESS_LIB__
167 #ifndef MDE_CPU_EBC
168 #ifndef __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
169 #define __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
170 #endif
171 #else
172 #ifndef __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
173 #define __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
174 #endif
175 #endif
176 #endif
177
178 //
179 // BaseTimerLibLocalApic
180 //
181 #ifdef __EDKII_GLUE_BASE_TIMER_LIB_LOCAL_APIC__
182 #ifndef __EDKII_GLUE_BASE_LIB__
183 #define __EDKII_GLUE_BASE_LIB__
184 #endif
185 #ifndef MDE_CPU_EBC
186 #ifndef __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
187 #define __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
188 #endif
189 #else
190 #ifndef __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
191 #define __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
192 #endif
193 #endif
194 #endif
195
196 //
197 // DxeReportStatusCodeLib
198 //
199 #ifdef __EDKII_GLUE_DXE_REPORT_STATUS_CODE_LIB__
200 #ifndef __EDKII_GLUE_BASE_LIB__
201 #define __EDKII_GLUE_BASE_LIB__
202 #endif
203 #ifndef MDE_CPU_EBC
204 #ifndef __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
205 #define __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
206 #endif
207 #else
208 #ifndef __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
209 #define __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
210 #endif
211 #endif
212 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
213 #define __EDKII_GLUE_BASE_MEMORY_LIB__
214 #endif
215 #ifndef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
216 #define __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
217 #endif
218 #ifndef __EDKII_GLUE_UEFI_RUNTIME_SERVICES_TABLE_LIB__
219 #define __EDKII_GLUE_UEFI_RUNTIME_SERVICES_TABLE_LIB__
220 #endif
221 #endif
222
223 //
224 // SmmRuntimeDxeReportStatusCodeLib - typically used by SMM driver and Runtime driver
225 //
226 #ifdef __EDKII_GLUE_SMM_RUNTIME_DXE_REPORT_STATUS_CODE_LIB__
227 #ifndef __EDKII_GLUE_BASE_LIB__
228 #define __EDKII_GLUE_BASE_LIB__
229 #endif
230 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
231 #define __EDKII_GLUE_BASE_MEMORY_LIB__
232 #endif
233 #ifndef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
234 #define __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
235 #endif
236 #ifndef __EDKII_GLUE_UEFI_RUNTIME_SERVICES_TABLE_LIB__
237 #define __EDKII_GLUE_UEFI_RUNTIME_SERVICES_TABLE_LIB__
238 #endif
239 #endif
240
241 //
242 // PeiReportStatusCodeLib
243 //
244 #ifdef __EDKII_GLUE_PEI_REPORT_STATUS_CODE_LIB__
245 #ifndef __EDKII_GLUE_BASE_LIB__
246 #define __EDKII_GLUE_BASE_LIB__
247 #endif
248 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
249 #define __EDKII_GLUE_BASE_MEMORY_LIB__
250 #endif
251 #ifndef MDE_CPU_EBC
252 #ifndef __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
253 #define __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
254 #endif
255 #else
256 #ifndef __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
257 #define __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
258 #endif
259 #endif
260 #if defined(MDE_CPU_IA32) || defined(MDE_CPU_X64)
261 #ifndef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
262 #define __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
263 #endif
264 #endif
265 //
266 // If necessary, __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__ or
267 // can be replaced with __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB__
268 //
269 #endif
270
271 //
272 // BasePeCoffLib
273 //
274 #ifdef __EDKII_GLUE_BASE_PE_COFF_LIB__
275 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
276 #define __EDKII_GLUE_BASE_MEMORY_LIB__
277 #endif
278 #endif
279
280 //
281 // BaseUefiDecompressLib
282 //
283 #ifdef __EDKII_GLUE_BASE_UEFI_DECOMPRESS_LIB__
284 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
285 #define __EDKII_GLUE_BASE_MEMORY_LIB__
286 #endif
287 #endif
288
289 //
290 // DxeHobLib
291 //
292 #ifdef __EDKII_GLUE_DXE_HOB_LIB__
293 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
294 #define __EDKII_GLUE_BASE_MEMORY_LIB__
295 #endif
296 #ifndef __EDKII_GLUE_UEFI_LIB__
297 #define __EDKII_GLUE_UEFI_LIB__
298 #endif
299 #endif
300
301 //
302 // HiiLib
303 //
304 #ifdef __EDKII_GLUE_HII_LIB__
305 #ifndef __EDKII_GLUE_DXE_MEMORY_ALLOCATION_LIB__
306 #define __EDKII_GLUE_DXE_MEMORY_ALLOCATION_LIB__
307 #endif
308 #endif
309
310 //
311 // UefiDevicePathLib
312 //
313 #ifdef __EDKII_GLUE_UEFI_DEVICE_PATH_LIB__
314 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
315 #define __EDKII_GLUE_BASE_MEMORY_LIB__
316 #endif
317 #ifndef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
318 #define __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
319 #endif
320 #ifndef __EDKII_GLUE_DXE_MEMORY_ALLOCATION_LIB__
321 #define __EDKII_GLUE_DXE_MEMORY_ALLOCATION_LIB__
322 #endif
323 #endif
324
325 //
326 // DxeServicesTableLib
327 //
328 #ifdef __EDKII_GLUE_DXE_SERVICES_TABLE_LIB__
329 #ifndef __EDKII_GLUE_UEFI_LIB__
330 #define __EDKII_GLUE_UEFI_LIB__
331 #endif
332 #endif
333
334 //
335 // UefiLib
336 //
337 #ifdef __EDKII_GLUE_UEFI_LIB__
338 #ifndef __EDKII_GLUE_BASE_LIB__
339 #define __EDKII_GLUE_BASE_LIB__
340 #endif
341 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
342 #define __EDKII_GLUE_BASE_MEMORY_LIB__
343 #endif
344 #ifndef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
345 #define __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
346 #endif
347 #ifndef __EDKII_GLUE_DXE_MEMORY_ALLOCATION_LIB__
348 #define __EDKII_GLUE_DXE_MEMORY_ALLOCATION_LIB__
349 #endif
350 #endif
351
352 //
353 // DxeMemoryAllocationLib
354 //
355 #ifdef __EDKII_GLUE_DXE_MEMORY_ALLOCATION_LIB__
356 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
357 #define __EDKII_GLUE_BASE_MEMORY_LIB__
358 #endif
359 #ifndef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
360 #define __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
361 #endif
362 #endif
363
364 //
365 // DxeSmbusLib
366 //
367 #ifdef __EDKII_GLUE_DXE_SMBUS_LIB__
368 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
369 #define __EDKII_GLUE_BASE_MEMORY_LIB__
370 #endif
371 #ifndef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
372 #define __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
373 #endif
374 #endif
375
376 //
377 // PeiHobLib
378 //
379 #ifdef __EDKII_GLUE_PEI_HOB_LIB__
380 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
381 #define __EDKII_GLUE_BASE_MEMORY_LIB__
382 #endif
383 #ifndef __EDKII_GLUE_PEI_SERVICES_LIB__
384 #define __EDKII_GLUE_PEI_SERVICES_LIB__
385 #endif
386 #endif
387
388 //
389 // PeiMemoryAllocationLib
390 //
391 #ifdef __EDKII_GLUE_PEI_MEMORY_ALLOCATION_LIB__
392 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
393 #define __EDKII_GLUE_BASE_MEMORY_LIB__
394 #endif
395 #if defined(MDE_CPU_IA32) || defined(MDE_CPU_X64)
396 #ifndef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
397 #define __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
398 #endif
399 #endif
400 //
401 // If necessary, __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__ or
402 // can be replaced with __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB__
403 //
404 #endif
405
406 //
407 // PeiResourcePublicationLib
408 //
409 #ifdef __EDKII_GLUE_PEI_RESOURCE_PUBLICATION_LIB__
410 #ifndef __EDKII_GLUE_PEI_SERVICES_LIB__
411 #define __EDKII_GLUE_PEI_SERVICES_LIB__
412 #endif
413 #endif
414
415 //
416 // PeiServicesLib
417 //
418 #ifdef __EDKII_GLUE_PEI_SERVICES_LIB__
419 #if defined(MDE_CPU_IA32) || defined(MDE_CPU_X64)
420 #ifndef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
421 #define __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
422 #endif
423 #endif
424 //
425 // If necessary, __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__ or
426 // can be replaced with __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB__
427 //
428 #endif
429
430 //
431 // PeiSmbusLib
432 //
433 #ifdef __EDKII_GLUE_PEI_SMBUS_LIB__
434 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
435 #define __EDKII_GLUE_BASE_MEMORY_LIB__
436 #endif
437 #if defined(MDE_CPU_IA32) || defined(MDE_CPU_X64)
438 #ifndef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
439 #define __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
440 #endif
441 #endif
442 //
443 // If necessary, __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__ or
444 // can be replaced with __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB__
445 //
446 #endif
447
448 //
449 // PeiServicesTablePointerLibMm7
450 //
451 #ifdef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
452 #ifndef __EDKII_GLUE_BASE_LIB__
453 #define __EDKII_GLUE_BASE_LIB__
454 #endif
455 #endif
456
457 //
458 // PeiServicesTablePointerLibKr1
459 //
460 #ifdef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__
461 #ifndef __EDKII_GLUE_BASE_LIB__
462 #define __EDKII_GLUE_BASE_LIB__
463 #endif
464 #endif
465
466
467 //
468 // UefiDriverModelLib
469 //
470 #ifdef __EDKII_GLUE_UEFI_DRIVER_MODEL_LIB__
471 #ifndef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
472 #define __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
473 #endif
474 #endif
475
476 //
477 // BasePrintLib
478 //
479 #ifdef __EDKII_GLUE_BASE_PRINT_LIB__
480 #ifndef __EDKII_GLUE_BASE_LIB__
481 #define __EDKII_GLUE_BASE_LIB__
482 #endif
483 #endif
484
485 //
486 // BaseMemoryLib
487 //
488 #ifdef __EDKII_GLUE_BASE_MEMORY_LIB__
489 #ifndef __EDKII_GLUE_BASE_LIB__
490 #define __EDKII_GLUE_BASE_LIB__
491 #endif
492 #endif
493
494 //
495 // BasePostCodeLibPort80
496 //
497 #ifdef __EDKII_GLUE_BASE_POST_CODE_LIB_PORT_80__
498 #ifndef MDE_CPU_EBC
499 #ifndef __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
500 #define __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
501 #endif
502 #else
503 #ifndef __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
504 #define __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
505 #endif
506 #endif
507 #endif
508
509 //
510 // BaseIoLibIntrinsic
511 //
512 #ifdef __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
513 #ifndef __EDKII_GLUE_BASE_LIB__
514 #define __EDKII_GLUE_BASE_LIB__
515 #endif
516 #endif
517
518 //
519 // DxeIoLibCpuIo
520 //
521 #ifdef __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
522 #ifndef __EDKII_GLUE_BASE_LIB__
523 #define __EDKII_GLUE_BASE_LIB__
524 #endif
525 #ifndef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
526 #define __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
527 #endif
528 #endif
529
530 //
531 // UefiBootServicesTableLib
532 //
533 #ifdef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
534 #endif
535
536 //
537 // BaseCacheMaintenanceLib
538 //
539 #ifdef __EDKII_GLUE_BASE_CACHE_MAINTENANCE_LIB__
540 #ifndef __EDKII_GLUE_BASE_LIB__
541 #define __EDKII_GLUE_BASE_LIB__
542 #endif
543 #endif
544
545 //
546 // BaseLib
547 //
548 #ifdef __EDKII_GLUE_BASE_LIB__
549 #endif
550
551 //
552 // UefiRuntimeServicesTableLib
553 //
554 #ifdef __EDKII_GLUE_UEFI_RUNTIME_SERVICES_TABLE_LIB__
555 #endif
556
557 //
558 // BasePeCoffGetEntryPointLib
559 //
560 #ifdef __EDKII_GLUE_BASE_PE_COFF_GET_ENTRY_POINT_LIB__
561 #endif
562
563 //
564 // PeiServicesTablePointerLib
565 //
566 #ifdef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB__
567 #endif
568
569 //
570 // BasePostCodeLibDebug
571 //
572 #ifdef __EDKII_GLUE_BASE_POST_CODE_LIB_DEBUG__
573 //
574 // A DebugLib instance
575 // Usually EdkIIGluePeiDxeDebugLibReportStatusCodeLib is listed in module inf
576 //
577 #endif
578
579 //
580 // PeiDxePostCodeLibReportStatusCode
581 //
582 #ifdef __EDKII_GLUE_PEI_DXE_POST_CODE_LIB_REPORT_STATUS_CODE__
583 //
584 // PEI or DXE ReportStatusCodeLib instance
585 // Usually EdkIIGluePei/DxeReportStatusCodeLib is listed in module inf
586 //
587 #endif
588
589 //
590 // Whether _gDriverExitBootServicesEvent[] contains effective handler
591 //
592 #if defined(__EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__) || defined(__EDKII_GLUE_EXIT_BOOT_SERVICES_EVENT_HANDLER__)
593 #define __EDKII_GLUE_HAVE_DRIVER_EXIT_BOOT_SERVICES_EVENT__ 1
594 #else
595 #define __EDKII_GLUE_HAVE_DRIVER_EXIT_BOOT_SERVICES_EVENT__ 0
596 #endif
597
598 //
599 // Check against multiple instances of same library class being used
600 //
601 #if defined(__EDKII_GLUE_PEI_DXE_DEBUG_LIB_REPORT_STATUS_CODE__) && defined(__EDKII_GLUE_BASE_DEBUG_LIB_NULL__)
602 #error EdkIIGluePeiDxeDebugLibReportStatusCode and EdkIIGlueBaseDebugLibNull: can only be mutual exclusively used.
603 #endif
604
605 #if defined(__EDKII_GLUE_BASE_PCI_LIB_PCI_EXPRESS__) && defined(__EDKII_GLUE_BASE_PCI_LIB_CF8__)
606 #error EdkIIGluePciLibPciExpress and EdkIIGluePciLibCf8: can only be mutual exclusively used.
607 #endif
608
609 #if defined(__EDKII_GLUE_DXE_HOB_LIB__) && defined(__EDKII_GLUE_PEI_HOB_LIB__)
610 #error EdkIIGlueDxeHobLib and EdkIIGluePeiHobLib: can only be mutual exclusively used.
611 #endif
612
613 #if defined(__EDKII_GLUE_BASE_POST_CODE_LIB_PORT_80__) && defined(__EDKII_GLUE_BASE_POST_CODE_LIB_DEBUG__)
614 #error EdkIIGlueBasePostCodeLibPort80 and EdkIIGlueBasePostCodeLibDebug: can only be mutual exclusively used.
615 #endif
616
617 #if defined(__EDKII_GLUE_BASE_POST_CODE_LIB_PORT_80__) && defined(__EDKII_GLUE_PEI_DXE_POST_CODE_LIB_REPORT_STATUS_CODE__)
618 #error EdkIIGlueBasePostCodeLibPort80 and EdkIIGluePeiDxePostCodeLibReportStatusCode: can only be mutual exclusively used.
619 #endif
620
621 #if defined(__EDKII_GLUE_BASE_POST_CODE_LIB_DEBUG__) && defined(__EDKII_GLUE_PEI_DXE_POST_CODE_LIB_REPORT_STATUS_CODE__)
622 #error EdkIIGlueBasePostCodeLibDebug and EdkIIGluePeiDxePostCodeLibReportStatusCode: can only be mutual exclusively used.
623 #endif
624
625 #if defined(__EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB__) && defined(__EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__)
626 #error EdkIIGluePeiServicesTablePointerLib and EdkIIGluePeiServicesTablePointerLibMm7: can only be mutual exclusively used.
627 #endif
628
629 #if defined(__EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB__) && defined(__EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__)
630 #error EdkIIGluePeiServicesTablePointerLib and EdkIIGluePeiServicesTablePointerLibKr1: can only be mutual exclusively used.
631 #endif
632
633 #if defined(__EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__) && defined(__EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__)
634 #error EdkIIGluePeiServicesTablePointerLibMm7 and EdkIIGluePeiServicesTablePointerLibKr1: can only be mutual exclusively used.
635 #endif
636
637 #if defined(__EDKII_GLUE_DXE_REPORT_STATUS_CODE_LIB__) && defined(__EDKII_GLUE_PEI_REPORT_STATUS_CODE_LIB__)
638 #error EdkIIGlueDxeReportStatusCodeLib and EdkIIGluePeiReportStatusCodeLib: can only be mutual exclusively used.
639 #endif
640
641 #if defined(__EDKII_GLUE_SMM_RUNTIME_DXE_REPORT_STATUS_CODE_LIB__) && defined(__EDKII_GLUE_PEI_REPORT_STATUS_CODE_LIB__)
642 #error EdkIIGlueSmmRuntimeDxeReportStatusCodeLib and EdkIIGluePeiReportStatusCodeLib: can only be mutual exclusively used.
643 #endif
644
645 #if defined(__EDKII_GLUE_DXE_REPORT_STATUS_CODE_LIB__) && defined(__EDKII_GLUE_SMM_RUNTIME_DXE_REPORT_STATUS_CODE_LIB__)
646 #error EdkIIGlueDxeReportStatusCodeLib and EdkIIGlueSmmRuntimeDxeReportStatusCodeLib: can only be mutual exclusively used.
647 #endif
648
649 #if defined(__EDKII_GLUE_DXE_MEMORY_ALLOCATION_LIB__) && defined(__EDKII_GLUE_PEI_MEMORY_ALLOCATION_LIB__)
650 #error EdkIIGlueDxeMemoryAllocationLib and EdkIIGluePeiMemoryAllocationLib: can only be mutual exclusively used.
651 #endif
652
653 #if defined(__EDKII_GLUE_DXE_SMBUS_LIB__) && defined(__EDKII_GLUE_PEI_SMBUS_LIB__)
654 #error EdkIIGlueDxeSmbusLib and EdkIIGluePeiSmbusLib: can only be mutual exclusively used.
655 #endif
656
657 #if defined(__EDKII_GLUE_BASE_IO_LIB_INTRINSIC__) && defined(__EDKII_GLUE_DXE_IO_LIB_CPU_IO__)
658 #error EdkIIGlueBaseIoLibIntrinsic and EdkIIGlueDxeIoLibCpuIo: can only be mutual exclusively used.
659 #endif
660
661 //
662 // Some instances must be supplied
663 //
664 #ifdef __EDKII_GLUE_PEI_DXE_DEBUG_LIB_REPORT_STATUS_CODE__
665 #if !defined(__EDKII_GLUE_DXE_REPORT_STATUS_CODE_LIB__) \
666 && !defined(__EDKII_GLUE_PEI_REPORT_STATUS_CODE_LIB__) \
667 && !defined(__EDKII_GLUE_SMM_RUNTIME_DXE_REPORT_STATUS_CODE_LIB__)
668 #error You use EdkIIGluePeiDxeDebugLibReportStatusCode, \
669 so either EdkIIGlueDxeReportStatusCodeLib, EdkIIGluePeiReportStatusCodeLib, \
670 or EdkIIGlueSmmRuntimeDxeReportStatusCodeLib must be supplied
671 #endif
672 #endif
673
674 #ifdef __EDKII_GLUE_BASE_POST_CODE_LIB_DEBUG__
675 #if !defined(__EDKII_GLUE_PEI_DXE_DEBUG_LIB_REPORT_STATUS_CODE__) && !defined(__EDKII_GLUE_BASE_DEBUG_LIB_NULL__)
676 #error You use EdkIIGlueBasePostCodeLibDebug, so either EdkIIGluePeiDxeDebugLibReportStatusCode or EdkIIGlueBaseDebugLibNull must be supplied
677 #endif
678 #endif
679
680 //
681 // EdkIIGlueUefiDriverModelLib used, but no Driver Binding Protocol defined
682 //
683 #ifdef __EDKII_GLUE_UEFI_DRIVER_MODEL_LIB__
684 #ifndef __EDKII_GLUE_DRIVER_BINDING_PROTOCOL_INSTANCE__
685 #error "EdkIIGlueUefiDriverModelLib used, but no Driver Binding Protocol defined. Please define __EDKII_GLUE_DRIVER_BINDING_PROTOCOL_INSTANCE__."
686 #endif
687 #endif
688
689 //
690 // EdkII Glue Library Constructors:
691 // NOTE: the constructors must be called according to dependency order
692 //
693 // UefiBootServicesTableLib UefiBootServicesTableLibConstructor()
694 // DxeIoLibCpuIo IoLibConstructor()
695 // UefiRuntimeServicesTableLib UefiRuntimeServicesTableLibConstructor()
696 // EdkDxeRuntimeDriverLib RuntimeDriverLibConstruct()
697 // SmmRuntimeDxeReportStatusCodeLib ReportStatusCodeLibConstruct()
698 // DxeHobLib HobLibConstructor()
699 // UefiDriverModelLib UefiDriverModelLibConstructor()
700 // PeiServicesTablePointerLib PeiServicesTablePointerLibConstructor()
701 // PeiServicesTablePointerLibMm7 PeiServicesTablePointerLibConstructor()
702 // PeiServicesTablePointerLibKr1 PeiServicesTablePointerLibConstructor()
703 // DxeSmbusLib SmbusLibConstructor()
704 // DxeServicesTableLib DxeServicesTableLibConstructor()
705 // DxeSalLib DxeSalLibConstructor()
706 //
707
708 #ifdef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
709 EFI_STATUS
710 EFIAPI
711 UefiBootServicesTableLibConstructor (
712 IN EFI_HANDLE ImageHandle,
713 IN EFI_SYSTEM_TABLE *SystemTable
714 );
715 #endif
716
717 #ifdef __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
718 EFI_STATUS
719 EFIAPI
720 IoLibConstructor (
721 IN EFI_HANDLE ImageHandle,
722 IN EFI_SYSTEM_TABLE *SystemTable
723 );
724 #endif
725
726 #ifdef __EDKII_GLUE_UEFI_RUNTIME_SERVICES_TABLE_LIB__
727 EFI_STATUS
728 EFIAPI
729 UefiRuntimeServicesTableLibConstructor (
730 IN EFI_HANDLE ImageHandle,
731 IN EFI_SYSTEM_TABLE *SystemTable
732 );
733 #endif
734
735 #ifdef __EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__
736 EFI_STATUS
737 EFIAPI
738 RuntimeDriverLibConstruct (
739 IN EFI_HANDLE ImageHandle,
740 IN EFI_SYSTEM_TABLE *SystemTable
741 );
742 #endif
743
744 #ifdef __EDKII_GLUE_SMM_RUNTIME_DXE_REPORT_STATUS_CODE_LIB__
745 EFI_STATUS
746 EFIAPI
747 ReportStatusCodeLibConstruct (
748 IN EFI_HANDLE ImageHandle,
749 IN EFI_SYSTEM_TABLE *SystemTable
750 );
751 #endif
752
753 #ifdef __EDKII_GLUE_DXE_HOB_LIB__
754 EFI_STATUS
755 EFIAPI
756 HobLibConstructor (
757 IN EFI_HANDLE ImageHandle,
758 IN EFI_SYSTEM_TABLE *SystemTable
759 );
760 #endif
761
762 #ifdef __EDKII_GLUE_UEFI_DRIVER_MODEL_LIB__
763 EFI_STATUS
764 EFIAPI
765 UefiDriverModelLibConstructor (
766 IN EFI_HANDLE ImageHandle,
767 IN EFI_SYSTEM_TABLE *SystemTable
768 );
769 #endif
770
771 #ifdef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB__
772 EFI_STATUS
773 EFIAPI
774 PeiServicesTablePointerLibConstructor (
775 IN EFI_FFS_FILE_HEADER *FfsHeader,
776 IN EFI_PEI_SERVICES **PeiServices
777 );
778 #endif
779
780 #ifdef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
781 EFI_STATUS
782 EFIAPI
783 PeiServicesTablePointerLibConstructor (
784 IN EFI_FFS_FILE_HEADER *FfsHeader,
785 IN EFI_PEI_SERVICES **PeiServices
786 );
787 #endif
788
789 #ifdef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__
790 EFI_STATUS
791 EFIAPI
792 PeiServicesTablePointerLibConstructor (
793 IN EFI_FFS_FILE_HEADER *FfsHeader,
794 IN EFI_PEI_SERVICES **PeiServices
795 );
796 #endif
797
798 #ifdef __EDKII_GLUE_DXE_SMBUS_LIB__
799 EFI_STATUS
800 EFIAPI
801 SmbusLibConstructor (
802 IN EFI_HANDLE ImageHandle,
803 IN EFI_SYSTEM_TABLE *SystemTable
804 );
805 #endif
806
807 #ifdef __EDKII_GLUE_DXE_SERVICES_TABLE_LIB__
808 EFI_STATUS
809 EFIAPI
810 DxeServicesTableLibConstructor (
811 IN EFI_HANDLE ImageHandle,
812 IN EFI_SYSTEM_TABLE *SystemTable
813 );
814 #endif
815
816 #ifdef __EDKII_GLUE_EDK_DXE_SAL_LIB__
817 EFI_STATUS
818 EFIAPI
819 DxeSalLibConstructor (
820 IN EFI_HANDLE ImageHandle,
821 IN EFI_SYSTEM_TABLE *SystemTable
822 );
823 #endif
824
825 //
826 // EdkII Glue Library Destructors:
827 // NOTE: the destructors must be called according to dependency order
828 //
829 // UefiDriverModelLibDestructor UefiDriverModelLibDestructor()
830 // SmmRuntimeDxeReportStatusCodeLib ReportStatusCodeLibDestruct()
831 // EdkDxeRuntimeDriverLib RuntimeDriverLibDeconstruct()
832 //
833 #ifdef __EDKII_GLUE_UEFI_DRIVER_MODEL_LIB__
834 EFI_STATUS
835 EFIAPI
836 UefiDriverModelLibDestructor (
837 IN EFI_HANDLE ImageHandle,
838 IN EFI_SYSTEM_TABLE *SystemTable
839 );
840 #endif
841
842 #ifdef __EDKII_GLUE_SMM_RUNTIME_DXE_REPORT_STATUS_CODE_LIB__
843 EFI_STATUS
844 EFIAPI
845 ReportStatusCodeLibDestruct (
846 IN EFI_HANDLE ImageHandle,
847 IN EFI_SYSTEM_TABLE *SystemTable
848 );
849 #endif
850
851 #ifdef __EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__
852 EFI_STATUS
853 EFIAPI
854 RuntimeDriverLibDeconstruct (
855 IN EFI_HANDLE ImageHandle,
856 IN EFI_SYSTEM_TABLE *SystemTable
857 );
858 #endif
859
860 #endif