]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Common/EdkIIGlueDependencies.h
c28debd6f118c8156796906de40974b784a971f2
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Include / Common / EdkIIGlueDependencies.h
1 /*++
2
3 Copyright (c) 2004 - 2006, Intel Corporation
4 All rights reserved. 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 R8 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 #ifdef MDE_CPU_IPF // IPF
117 #ifndef __EDKII_GLUE_EDK_DXE_SAL_LIB__
118 #define __EDKII_GLUE_EDK_DXE_SAL_LIB__
119 #endif
120 #endif // IPF
121 #endif
122
123 //
124 // EdkDxeSalLib
125 //
126 #ifdef __EDKII_GLUE_EDK_DXE_SAL_LIB__
127 #ifndef __EDKII_GLUE_BASE_LIB__
128 #define __EDKII_GLUE_BASE_LIB__
129 #endif
130 #ifndef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
131 #define __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
132 #endif
133 #endif
134
135 //
136 // BasePciLibCf8
137 //
138 #ifdef __EDKII_GLUE_BASE_PCI_LIB_CF8__
139 #ifndef __EDKII_GLUE_BASE_PCI_CF8_LIB__
140 #define __EDKII_GLUE_BASE_PCI_CF8_LIB__
141 #endif
142 #endif
143
144 //
145 // BasePciLibPciExpress
146 //
147 #ifdef __EDKII_GLUE_BASE_PCI_LIB_PCI_EXPRESS__
148 #ifndef __EDKII_GLUE_BASE_PCI_EXPRESS_LIB__
149 #define __EDKII_GLUE_BASE_PCI_EXPRESS_LIB__
150 #endif
151 #endif
152
153 //
154 // BasePciCf8Lib
155 //
156 #ifdef __EDKII_GLUE_BASE_PCI_CF8_LIB__
157 #ifndef MDE_CPU_EBC
158 #ifndef __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
159 #define __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
160 #endif
161 #else
162 #ifndef __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
163 #define __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
164 #endif
165 #endif
166 #endif
167
168 //
169 // BasePciExpressLib
170 //
171 #ifdef __EDKII_GLUE_BASE_PCI_EXPRESS_LIB__
172 #ifndef MDE_CPU_EBC
173 #ifndef __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
174 #define __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
175 #endif
176 #else
177 #ifndef __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
178 #define __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
179 #endif
180 #endif
181 #endif
182
183 //
184 // BaseTimerLibLocalApic
185 //
186 #ifdef __EDKII_GLUE_BASE_TIMER_LIB_LOCAL_APIC__
187 #ifndef __EDKII_GLUE_BASE_LIB__
188 #define __EDKII_GLUE_BASE_LIB__
189 #endif
190 #ifndef MDE_CPU_EBC
191 #ifndef __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
192 #define __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
193 #endif
194 #else
195 #ifndef __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
196 #define __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
197 #endif
198 #endif
199 #endif
200
201 //
202 // DxeReportStatusCodeLib
203 //
204 #ifdef __EDKII_GLUE_DXE_REPORT_STATUS_CODE_LIB__
205 #ifndef __EDKII_GLUE_BASE_LIB__
206 #define __EDKII_GLUE_BASE_LIB__
207 #endif
208 #ifndef MDE_CPU_EBC
209 #ifndef __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
210 #define __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
211 #endif
212 #else
213 #ifndef __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
214 #define __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
215 #endif
216 #endif
217 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
218 #define __EDKII_GLUE_BASE_MEMORY_LIB__
219 #endif
220 #ifndef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
221 #define __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
222 #endif
223 #ifndef __EDKII_GLUE_UEFI_RUNTIME_SERVICES_TABLE_LIB__
224 #define __EDKII_GLUE_UEFI_RUNTIME_SERVICES_TABLE_LIB__
225 #endif
226 #endif
227
228 //
229 // PeiReportStatusCodeLib
230 //
231 #ifdef __EDKII_GLUE_PEI_REPORT_STATUS_CODE_LIB__
232 #ifndef __EDKII_GLUE_BASE_LIB__
233 #define __EDKII_GLUE_BASE_LIB__
234 #endif
235 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
236 #define __EDKII_GLUE_BASE_MEMORY_LIB__
237 #endif
238 #ifndef MDE_CPU_EBC
239 #ifndef __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
240 #define __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
241 #endif
242 #else
243 #ifndef __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
244 #define __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
245 #endif
246 #endif
247 #if defined(MDE_CPU_IA32) || defined(MDE_CPU_X64)
248 #ifndef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
249 #define __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
250 #endif
251 #elif defined(MDE_CPU_IPF)
252 #ifndef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__
253 #define __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__
254 #endif
255 #endif
256 //
257 // If necessary, __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__ or
258 // __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__ can be
259 // replaced with __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB__
260 //
261 #endif
262
263 //
264 // BasePeCoffLib
265 //
266 #ifdef __EDKII_GLUE_BASE_PE_COFF_LIB__
267 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
268 #define __EDKII_GLUE_BASE_MEMORY_LIB__
269 #endif
270 #endif
271
272 //
273 // BaseUefiDecompressLib
274 //
275 #ifdef __EDKII_GLUE_BASE_UEFI_DECOMPRESS_LIB__
276 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
277 #define __EDKII_GLUE_BASE_MEMORY_LIB__
278 #endif
279 #endif
280
281 //
282 // DxeHobLib
283 //
284 #ifdef __EDKII_GLUE_DXE_HOB_LIB__
285 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
286 #define __EDKII_GLUE_BASE_MEMORY_LIB__
287 #endif
288 #ifndef __EDKII_GLUE_UEFI_LIB__
289 #define __EDKII_GLUE_UEFI_LIB__
290 #endif
291 #endif
292
293 //
294 // HiiLib
295 //
296 #ifdef __EDKII_GLUE_HII_LIB__
297 #ifndef __EDKII_GLUE_DXE_MEMORY_ALLOCATION_LIB__
298 #define __EDKII_GLUE_DXE_MEMORY_ALLOCATION_LIB__
299 #endif
300 #endif
301
302 //
303 // UefiDevicePathLib
304 //
305 #ifdef __EDKII_GLUE_UEFI_DEVICE_PATH_LIB__
306 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
307 #define __EDKII_GLUE_BASE_MEMORY_LIB__
308 #endif
309 #ifndef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
310 #define __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
311 #endif
312 #ifndef __EDKII_GLUE_DXE_MEMORY_ALLOCATION_LIB__
313 #define __EDKII_GLUE_DXE_MEMORY_ALLOCATION_LIB__
314 #endif
315 #endif
316
317 //
318 // UefiLib
319 //
320 #ifdef __EDKII_GLUE_UEFI_LIB__
321 #ifndef __EDKII_GLUE_BASE_LIB__
322 #define __EDKII_GLUE_BASE_LIB__
323 #endif
324 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
325 #define __EDKII_GLUE_BASE_MEMORY_LIB__
326 #endif
327 #ifndef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
328 #define __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
329 #endif
330 #ifndef __EDKII_GLUE_DXE_MEMORY_ALLOCATION_LIB__
331 #define __EDKII_GLUE_DXE_MEMORY_ALLOCATION_LIB__
332 #endif
333 #endif
334
335 //
336 // DxeMemoryAllocationLib
337 //
338 #ifdef __EDKII_GLUE_DXE_MEMORY_ALLOCATION_LIB__
339 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
340 #define __EDKII_GLUE_BASE_MEMORY_LIB__
341 #endif
342 #ifndef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
343 #define __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
344 #endif
345 #endif
346
347 //
348 // DxeSmbusLib
349 //
350 #ifdef __EDKII_GLUE_DXE_SMBUS_LIB__
351 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
352 #define __EDKII_GLUE_BASE_MEMORY_LIB__
353 #endif
354 #ifndef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
355 #define __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
356 #endif
357 #endif
358
359 //
360 // PeiHobLib
361 //
362 #ifdef __EDKII_GLUE_PEI_HOB_LIB__
363 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
364 #define __EDKII_GLUE_BASE_MEMORY_LIB__
365 #endif
366 #ifndef __EDKII_GLUE_PEI_SERVICES_LIB__
367 #define __EDKII_GLUE_PEI_SERVICES_LIB__
368 #endif
369 #endif
370
371 //
372 // PeiMemoryAllocationLib
373 //
374 #ifdef __EDKII_GLUE_PEI_MEMORY_ALLOCATION_LIB__
375 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
376 #define __EDKII_GLUE_BASE_MEMORY_LIB__
377 #endif
378 #if defined(MDE_CPU_IA32) || defined(MDE_CPU_X64)
379 #ifndef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
380 #define __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
381 #endif
382 #elif defined(MDE_CPU_IPF)
383 #ifndef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__
384 #define __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__
385 #endif
386 #endif
387 //
388 // If necessary, __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__ or
389 // __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__ can be
390 // replaced with __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB__
391 //
392 #endif
393
394 //
395 // PeiResourcePublicationLib
396 //
397 #ifdef __EDKII_GLUE_PEI_RESOURCE_PUBLICATION_LIB__
398 #ifndef __EDKII_GLUE_PEI_SERVICES_LIB__
399 #define __EDKII_GLUE_PEI_SERVICES_LIB__
400 #endif
401 #endif
402
403 //
404 // PeiServicesLib
405 //
406 #ifdef __EDKII_GLUE_PEI_SERVICES_LIB__
407 #if defined(MDE_CPU_IA32) || defined(MDE_CPU_X64)
408 #ifndef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
409 #define __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
410 #endif
411 #elif defined(MDE_CPU_IPF)
412 #ifndef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__
413 #define __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__
414 #endif
415 #endif
416 //
417 // If necessary, __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__ or
418 // __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__ can be
419 // replaced with __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB__
420 //
421 #endif
422
423 //
424 // PeiSmbusLib
425 //
426 #ifdef __EDKII_GLUE_PEI_SMBUS_LIB__
427 #ifndef __EDKII_GLUE_BASE_MEMORY_LIB__
428 #define __EDKII_GLUE_BASE_MEMORY_LIB__
429 #endif
430 #if defined(MDE_CPU_IA32) || defined(MDE_CPU_X64)
431 #ifndef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
432 #define __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
433 #endif
434 #elif defined(MDE_CPU_IPF)
435 #ifndef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__
436 #define __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__
437 #endif
438 #endif
439 //
440 // If necessary, __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__ or
441 // __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__ can be
442 // replaced with __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB__
443 //
444 #endif
445
446 //
447 // PeiServicesTablePointerLibMm7
448 //
449 #ifdef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
450 #ifndef __EDKII_GLUE_BASE_LIB__
451 #define __EDKII_GLUE_BASE_LIB__
452 #endif
453 #endif
454
455 //
456 // PeiServicesTablePointerLibKr1
457 //
458 #ifdef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__
459 #ifndef __EDKII_GLUE_BASE_LIB__
460 #define __EDKII_GLUE_BASE_LIB__
461 #endif
462 #endif
463
464
465 //
466 // UefiDriverModelLib
467 //
468 #ifdef __EDKII_GLUE_UEFI_DRIVER_MODEL_LIB__
469 #ifndef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
470 #define __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
471 #endif
472 #endif
473
474 //
475 // DxeServicesTableLib
476 //
477 #ifdef __EDKII_GLUE_DXE_SERVICES_TABLE_LIB__
478 #ifndef __EDKII_GLUE_UEFI_LIB__
479 #define __EDKII_GLUE_UEFI_LIB__
480 #endif
481 #endif
482
483 //
484 // BasePrintLib
485 //
486 #ifdef __EDKII_GLUE_BASE_PRINT_LIB__
487 #ifndef __EDKII_GLUE_BASE_LIB__
488 #define __EDKII_GLUE_BASE_LIB__
489 #endif
490 #endif
491
492 //
493 // BaseMemoryLib
494 //
495 #ifdef __EDKII_GLUE_BASE_MEMORY_LIB__
496 #ifndef __EDKII_GLUE_BASE_LIB__
497 #define __EDKII_GLUE_BASE_LIB__
498 #endif
499 #endif
500
501 //
502 // BasePostCodeLibPort80
503 //
504 #ifdef __EDKII_GLUE_BASE_POST_CODE_LIB_PORT_80__
505 #ifndef MDE_CPU_EBC
506 #ifndef __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
507 #define __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
508 #endif
509 #else
510 #ifndef __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
511 #define __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
512 #endif
513 #endif
514 #endif
515
516 //
517 // BaseIoLibIntrinsic
518 //
519 #ifdef __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__
520 #ifndef __EDKII_GLUE_BASE_LIB__
521 #define __EDKII_GLUE_BASE_LIB__
522 #endif
523 #endif
524
525 //
526 // DxeIoLibCpuIo
527 //
528 #ifdef __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
529 #ifndef __EDKII_GLUE_BASE_LIB__
530 #define __EDKII_GLUE_BASE_LIB__
531 #endif
532 #ifndef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
533 #define __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
534 #endif
535 #endif
536
537 //
538 // UefiBootServicesTableLib
539 //
540 #ifdef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
541 #endif
542
543 //
544 // BaseCacheMaintenanceLib
545 //
546 #ifdef __EDKII_GLUE_BASE_CACHE_MAINTENANCE_LIB__
547 #ifndef __EDKII_GLUE_BASE_LIB__
548 #define __EDKII_GLUE_BASE_LIB__
549 #endif
550 #endif
551
552 //
553 // BaseLib
554 //
555 #ifdef __EDKII_GLUE_BASE_LIB__
556 #endif
557
558 //
559 // UefiRuntimeServicesTableLib
560 //
561 #ifdef __EDKII_GLUE_UEFI_RUNTIME_SERVICES_TABLE_LIB__
562 #endif
563
564 //
565 // BasePeCoffGetEntryPointLib
566 //
567 #ifdef __EDKII_GLUE_BASE_PE_COFF_GET_ENTRY_POINT_LIB__
568 #endif
569
570 //
571 // PeiServicesTablePointerLib
572 //
573 #ifdef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB__
574 #endif
575
576 //
577 // BasePostCodeLibDebug
578 //
579 #ifdef __EDKII_GLUE_BASE_POST_CODE_LIB_DEBUG__
580 //
581 // A DebugLib instance
582 // Usually EdkIIGluePeiDxeDebugLibReportStatusCodeLib is listed in module inf
583 //
584 #endif
585
586 //
587 // PeiDxePostCodeLibReportStatusCode
588 //
589 #ifdef __EDKII_GLUE_PEI_DXE_POST_CODE_LIB_REPORT_STATUS_CODE__
590 //
591 // PEI or DXE ReportStatusCodeLib instance
592 // Usually EdkIIGluePei/DxeReportStatusCodeLib is listed in module inf
593 //
594 #endif
595
596 //
597 // Whether _gDriverExitBootServicesEvent[] contains effective handler
598 //
599 #if defined(__EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__) || defined(__EDKII_GLUE_EXIT_BOOT_SERVICES_EVENT_HANDLER__)
600 #define __EDKII_GLUE_HAVE_DRIVER_EXIT_BOOT_SERVICES_EVENT__ 1
601 #else
602 #define __EDKII_GLUE_HAVE_DRIVER_EXIT_BOOT_SERVICES_EVENT__ 0
603 #endif
604
605 //
606 // Check against multiple instances of same library class being used
607 //
608 #if defined(__EDKII_GLUE_PEI_DXE_DEBUG_LIB_REPORT_STATUS_CODE__) && defined(__EDKII_GLUE_BASE_DEBUG_LIB_NULL__)
609 #error EdkIIGluePeiDxeDebugLibReportStatusCode and EdkIIGlueBaseDebugLibNull: can only be mutual exclusively used.
610 #endif
611
612 #if defined(__EDKII_GLUE_BASE_PCI_LIB_PCI_EXPRESS__) && defined(__EDKII_GLUE_BASE_PCI_LIB_CF8__)
613 #error EdkIIGluePciLibPciExpress and EdkIIGluePciLibCf8: can only be mutual exclusively used.
614 #endif
615
616 #if defined (__EDKII_GLUE_DXE_HOB_LIB__) && (__EDKII_GLUE_PEI_HOB_LIB__)
617 #error EdkIIGlueDxeHobLib and EdkIIGluePeiHobLib: can only be mutual exclusively used.
618 #endif
619
620 #if defined(__EDKII_GLUE_BASE_POST_CODE_LIB_PORT_80__) && defined(__EDKII_GLUE_BASE_POST_CODE_LIB_DEBUG__)
621 #error EdkIIGlueBasePostCodeLibPort80 and EdkIIGlueBasePostCodeLibDebug: can only be mutual exclusively used.
622 #endif
623
624 #if defined(__EDKII_GLUE_BASE_POST_CODE_LIB_PORT_80__) && defined(__EDKII_GLUE_PEI_DXE_POST_CODE_LIB_REPORT_STATUS_CODE__)
625 #error EdkIIGlueBasePostCodeLibPort80 and EdkIIGluePeiDxePostCodeLibReportStatusCode: can only be mutual exclusively used.
626 #endif
627
628 #if defined(__EDKII_GLUE_BASE_POST_CODE_LIB_DEBUG__) && defined(__EDKII_GLUE_PEI_DXE_POST_CODE_LIB_REPORT_STATUS_CODE__)
629 #error EdkIIGlueBasePostCodeLibDebug and EdkIIGluePeiDxePostCodeLibReportStatusCode: can only be mutual exclusively used.
630 #endif
631
632 #if defined(__EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB__) && defined(__EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__)
633 #error EdkIIGluePeiServicesTablePointerLib and EdkIIGluePeiServicesTablePointerLibMm7: can only be mutual exclusively used.
634 #endif
635
636 #if defined(__EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB__) && defined(__EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__)
637 #error EdkIIGluePeiServicesTablePointerLib and EdkIIGluePeiServicesTablePointerLibKr1: can only be mutual exclusively used.
638 #endif
639
640 #if defined(__EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__) && defined(__EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__)
641 #error EdkIIGluePeiServicesTablePointerLibMm7 and EdkIIGluePeiServicesTablePointerLibKr1: can only be mutual exclusively used.
642 #endif
643
644 #if defined(__EDKII_GLUE_DXE_REPORT_STATUS_CODE_LIB__) && defined(__EDKII_GLUE_PEI_REPORT_STATUS_CODE_LIB__)
645 #error EdkIIGlueDxeReportStatusCodeLib and EdkIIGluePeiReportStatusCodeLib: can only be mutual exclusively used.
646 #endif
647
648 #if defined(__EDKII_GLUE_DXE_MEMORY_ALLOCATION_LIB__) && defined(__EDKII_GLUE_PEI_MEMORY_ALLOCATION_LIB__)
649 #error EdkIIGlueDxeMemoryAllocationLib and EdkIIGluePeiMemoryAllocationLib: can only be mutual exclusively used.
650 #endif
651
652 #if defined(__EDKII_GLUE_DXE_SMBUS_LIB__) && defined(__EDKII_GLUE_PEI_SMBUS_LIB__)
653 #error EdkIIGlueDxeSmbusLib and EdkIIGluePeiSmbusLib: can only be mutual exclusively used.
654 #endif
655
656 #if defined(__EDKII_GLUE_BASE_IO_LIB_INTRINSIC__) && defined(__EDKII_GLUE_DXE_IO_LIB_CPU_IO__)
657 #error EdkIIGlueBaseIoLibIntrinsic and EdkIIGlueDxeIoLibCpuIo: can only be mutual exclusively used.
658 #endif
659
660 //
661 // Some instances must be supplied
662 //
663 #ifdef __EDKII_GLUE_PEI_DXE_DEBUG_LIB_REPORT_STATUS_CODE__
664 #if !defined(__EDKII_GLUE_DXE_REPORT_STATUS_CODE_LIB__) && !defined(__EDKII_GLUE_PEI_REPORT_STATUS_CODE_LIB__)
665 #error You use EdkIIGluePeiDxeDebugLibReportStatusCode, so either EdkIIGlueDxeReportStatusCodeLib or EdkIIGluePeiReportStatusCodeLib must be supplied
666 #endif
667 #endif
668
669 #ifdef __EDKII_GLUE_BASE_POST_CODE_LIB_DEBUG__
670 #if !defined(__EDKII_GLUE_PEI_DXE_DEBUG_LIB_REPORT_STATUS_CODE__) && !defined(__EDKII_GLUE_BASE_DEBUG_LIB_NULL__)
671 #error You use EdkIIGlueBasePostCodeLibDebug, so either EdkIIGluePeiDxeDebugLibReportStatusCode or EdkIIGlueBaseDebugLibNull must be supplied
672 #endif
673 #endif
674
675 //
676 // EdkIIGlueUefiDriverModelLib used, but no Driver Binding Protocol defined
677 //
678 #ifdef __EDKII_GLUE_UEFI_DRIVER_MODEL_LIB__
679 #ifndef __EDKII_GLUE_DRIVER_BINDING_PROTOCOL_INSTANCE__
680 #error "EdkIIGlueUefiDriverModelLib used, but no Driver Binding Protocol defined. Please define __EDKII_GLUE_DRIVER_BINDING_PROTOCOL_INSTANCE__."
681 #endif
682 #endif
683
684 //
685 // EdkII Glue Library Constructors:
686 // NOTE: the constructors must be called according to dependency order
687 //
688 // UefiBootServicesTableLib UefiBootServicesTableLibConstructor()
689 // DxeIoLibCpuIo IoLibConstructor()
690 // UefiRuntimeServicesTableLib UefiRuntimeServicesTableLibConstructor()
691 // EdkDxeRuntimeDriverLib RuntimeDriverLibConstruct()
692 // DxeHobLib HobLibConstructor()
693 // UefiDriverModelLib UefiDriverModelLibConstructor()
694 // PeiServicesTablePointerLib PeiServicesTablePointerLibConstructor()
695 // PeiServicesTablePointerLibMm7 PeiServicesTablePointerLibConstructor()
696 // PeiServicesTablePointerLibKr1 PeiServicesTablePointerLibConstructor()
697 // DxeSmbusLib SmbusLibConstructor()
698 // DxeServicesTableLib DxeServicesTableLibConstructor()
699 // DxeSalLib DxeSalLibConstructor()
700 //
701
702 #ifdef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
703 EFI_STATUS
704 EFIAPI
705 UefiBootServicesTableLibConstructor (
706 IN EFI_HANDLE ImageHandle,
707 IN EFI_SYSTEM_TABLE *SystemTable
708 );
709 #endif
710
711 #ifdef __EDKII_GLUE_DXE_IO_LIB_CPU_IO__
712 EFI_STATUS
713 EFIAPI
714 IoLibConstructor (
715 IN EFI_HANDLE ImageHandle,
716 IN EFI_SYSTEM_TABLE *SystemTable
717 );
718 #endif
719
720 #ifdef __EDKII_GLUE_UEFI_RUNTIME_SERVICES_TABLE_LIB__
721 EFI_STATUS
722 EFIAPI
723 UefiRuntimeServicesTableLibConstructor (
724 IN EFI_HANDLE ImageHandle,
725 IN EFI_SYSTEM_TABLE *SystemTable
726 );
727 #endif
728
729 #ifdef __EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__
730 EFI_STATUS
731 EFIAPI
732 RuntimeDriverLibConstruct (
733 IN EFI_HANDLE ImageHandle,
734 IN EFI_SYSTEM_TABLE *SystemTable
735 );
736 #endif
737
738 #ifdef __EDKII_GLUE_DXE_HOB_LIB__
739 EFI_STATUS
740 EFIAPI
741 HobLibConstructor (
742 IN EFI_HANDLE ImageHandle,
743 IN EFI_SYSTEM_TABLE *SystemTable
744 );
745 #endif
746
747 #ifdef __EDKII_GLUE_UEFI_DRIVER_MODEL_LIB__
748 EFI_STATUS
749 EFIAPI
750 UefiDriverModelLibConstructor (
751 IN EFI_HANDLE ImageHandle,
752 IN EFI_SYSTEM_TABLE *SystemTable
753 );
754 #endif
755
756 #ifdef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB__
757 EFI_STATUS
758 EFIAPI
759 PeiServicesTablePointerLibConstructor (
760 IN EFI_FFS_FILE_HEADER *FfsHeader,
761 IN EFI_PEI_SERVICES **PeiServices
762 );
763 #endif
764
765 #ifdef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_MM7__
766 EFI_STATUS
767 EFIAPI
768 PeiServicesTablePointerLibConstructor (
769 IN EFI_FFS_FILE_HEADER *FfsHeader,
770 IN EFI_PEI_SERVICES **PeiServices
771 );
772 #endif
773
774 #ifdef __EDKII_GLUE_PEI_SERVICES_TABLE_POINTER_LIB_KR1__
775 EFI_STATUS
776 EFIAPI
777 PeiServicesTablePointerLibConstructor (
778 IN EFI_FFS_FILE_HEADER *FfsHeader,
779 IN EFI_PEI_SERVICES **PeiServices
780 );
781 #endif
782
783 #ifdef __EDKII_GLUE_DXE_SMBUS_LIB__
784 EFI_STATUS
785 EFIAPI
786 SmbusLibConstructor (
787 IN EFI_HANDLE ImageHandle,
788 IN EFI_SYSTEM_TABLE *SystemTable
789 );
790 #endif
791
792 #ifdef __EDKII_GLUE_DXE_SERVICES_TABLE_LIB__
793 EFI_STATUS
794 EFIAPI
795 DxeServicesTableLibConstructor (
796 IN EFI_HANDLE ImageHandle,
797 IN EFI_SYSTEM_TABLE *SystemTable
798 );
799 #endif
800
801 #ifdef __EDKII_GLUE_EDK_DXE_SAL_LIB__
802 EFI_STATUS
803 EFIAPI
804 DxeSalLibConstructor (
805 IN EFI_HANDLE ImageHandle,
806 IN EFI_SYSTEM_TABLE *SystemTable
807 );
808 #endif
809
810 //
811 // EdkII Glue Library Destructors:
812 // NOTE: the destructors must be called according to dependency order
813 //
814 // UefiDriverModelLibDestructor UefiDriverModelLibDestructor()
815 // EdkDxeRuntimeDriverLib RuntimeDriverLibDeconstruct()
816 //
817 #ifdef __EDKII_GLUE_UEFI_DRIVER_MODEL_LIB__
818 EFI_STATUS
819 EFIAPI
820 UefiDriverModelLibDestructor (
821 IN EFI_HANDLE ImageHandle,
822 IN EFI_SYSTEM_TABLE *SystemTable
823 );
824 #endif
825
826 #ifdef __EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__
827 EFI_STATUS
828 EFIAPI
829 RuntimeDriverLibDeconstruct (
830 IN EFI_HANDLE ImageHandle,
831 IN EFI_SYSTEM_TABLE *SystemTable
832 );
833 #endif
834
835 #endif