summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Ersek2016-03-03 18:33:38 -0600
committerLaszlo Ersek2016-03-10 14:28:34 -0600
commitc47ed6fcb5e606cf6d55ff5c954944e7376144de (patch)
tree5740275dabcb25cfb8fcafb09a49ac3d31def1ee
parent7523788faa51e1a94e87ddb984ceacf8dc8a49bb (diff)
downloadti-edk2-c47ed6fcb5e606cf6d55ff5c954944e7376144de.tar.gz
ti-edk2-c47ed6fcb5e606cf6d55ff5c954944e7376144de.tar.xz
ti-edk2-c47ed6fcb5e606cf6d55ff5c954944e7376144de.zip
OvmfPkg: match PCI config access to machine type (if not USE_OLD_PCI_HOST)
If USE_OLD_PCI_HOST is FALSE, then we switch all executable module types supported by DxePciLibI440FxQ35 to the following library instance stack: BasePciSegmentLibPci [class: PciSegmentLib] DxePciLibI440FxQ35 [class: PciLib] BasePciCf8Lib [class: PciCf8Lib] BasePciExpressLib [class: PciExpressLib] Every module will select 0xCF8 vs. ECAM based on the OVMF platform type (i440fx or Q35). Notably, MdeModulePkg/Bus/Pci/PciHostBridgeDxe is among the affected drivers. The BasePciExpressLib instance is where the PcdPciExpressBaseAddress PCD fills its original role. Cc: Gabriel Somlo <somlo@cmu.edu> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Marcel Apfelbaum <marcel@redhat.com> Cc: Michał Zegan <webczat_200@poczta.onet.pl> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Gabriel Somlo <somlo@cmu.edu> Tested-by: Michał Zegan <webczat_200@poczta.onet.pl>
-rw-r--r--OvmfPkg/OvmfPkgIa32.dsc21
-rw-r--r--OvmfPkg/OvmfPkgIa32X64.dsc21
-rw-r--r--OvmfPkg/OvmfPkgX64.dsc21
3 files changed, 63 insertions, 0 deletions
diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index aae197295..2635992ac 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -82,6 +82,9 @@
82 DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf 82 DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
83 PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf 83 PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
84 PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf 84 PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
85!if $(USE_OLD_PCI_HOST) == FALSE
86 PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
87!endif
85 PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf 88 PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
86 PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf 89 PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
87 IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf 90 IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
@@ -242,6 +245,9 @@
242!if $(SECURE_BOOT_ENABLE) == TRUE 245!if $(SECURE_BOOT_ENABLE) == TRUE
243 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf 246 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
244!endif 247!endif
248!if $(USE_OLD_PCI_HOST) == FALSE
249 PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
250!endif
245 251
246[LibraryClasses.common.UEFI_DRIVER] 252[LibraryClasses.common.UEFI_DRIVER]
247 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf 253 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -256,6 +262,9 @@
256 DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf 262 DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
257!endif 263!endif
258 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf 264 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
265!if $(USE_OLD_PCI_HOST) == FALSE
266 PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
267!endif
259 268
260[LibraryClasses.common.DXE_DRIVER] 269[LibraryClasses.common.DXE_DRIVER]
261 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf 270 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -287,6 +296,9 @@
287!if $(SECURE_BOOT_ENABLE) == TRUE 296!if $(SECURE_BOOT_ENABLE) == TRUE
288 FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf 297 FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
289!endif 298!endif
299!if $(USE_OLD_PCI_HOST) == FALSE
300 PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
301!endif
290 302
291[LibraryClasses.common.UEFI_APPLICATION] 303[LibraryClasses.common.UEFI_APPLICATION]
292 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf 304 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -298,6 +310,9 @@
298!else 310!else
299 DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf 311 DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
300!endif 312!endif
313!if $(USE_OLD_PCI_HOST) == FALSE
314 PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
315!endif
301 316
302[LibraryClasses.common.DXE_SMM_DRIVER] 317[LibraryClasses.common.DXE_SMM_DRIVER]
303 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf 318 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -317,6 +332,9 @@
317 DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf 332 DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf
318!endif 333!endif
319 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf 334 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
335!if $(USE_OLD_PCI_HOST) == FALSE
336 PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
337!endif
320 338
321[LibraryClasses.common.SMM_CORE] 339[LibraryClasses.common.SMM_CORE]
322 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf 340 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -332,6 +350,9 @@
332!else 350!else
333 DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf 351 DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
334!endif 352!endif
353!if $(USE_OLD_PCI_HOST) == FALSE
354 PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
355!endif
335 356
336################################################################################ 357################################################################################
337# 358#
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index 0422dda09..e9ffcb418 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -87,6 +87,9 @@
87 DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf 87 DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
88 PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf 88 PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
89 PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf 89 PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
90!if $(USE_OLD_PCI_HOST) == FALSE
91 PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
92!endif
90 PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf 93 PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
91 PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf 94 PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
92 IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf 95 IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
@@ -247,6 +250,9 @@
247!if $(SECURE_BOOT_ENABLE) == TRUE 250!if $(SECURE_BOOT_ENABLE) == TRUE
248 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf 251 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
249!endif 252!endif
253!if $(USE_OLD_PCI_HOST) == FALSE
254 PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
255!endif
250 256
251[LibraryClasses.common.UEFI_DRIVER] 257[LibraryClasses.common.UEFI_DRIVER]
252 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf 258 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -261,6 +267,9 @@
261 DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf 267 DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
262!endif 268!endif
263 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf 269 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
270!if $(USE_OLD_PCI_HOST) == FALSE
271 PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
272!endif
264 273
265[LibraryClasses.common.DXE_DRIVER] 274[LibraryClasses.common.DXE_DRIVER]
266 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf 275 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -292,6 +301,9 @@
292!if $(SECURE_BOOT_ENABLE) == TRUE 301!if $(SECURE_BOOT_ENABLE) == TRUE
293 FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf 302 FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
294!endif 303!endif
304!if $(USE_OLD_PCI_HOST) == FALSE
305 PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
306!endif
295 307
296[LibraryClasses.common.UEFI_APPLICATION] 308[LibraryClasses.common.UEFI_APPLICATION]
297 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf 309 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -303,6 +315,9 @@
303!else 315!else
304 DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf 316 DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
305!endif 317!endif
318!if $(USE_OLD_PCI_HOST) == FALSE
319 PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
320!endif
306 321
307[LibraryClasses.common.DXE_SMM_DRIVER] 322[LibraryClasses.common.DXE_SMM_DRIVER]
308 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf 323 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -322,6 +337,9 @@
322 DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf 337 DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf
323!endif 338!endif
324 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf 339 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
340!if $(USE_OLD_PCI_HOST) == FALSE
341 PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
342!endif
325 343
326[LibraryClasses.common.SMM_CORE] 344[LibraryClasses.common.SMM_CORE]
327 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf 345 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -337,6 +355,9 @@
337!else 355!else
338 DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf 356 DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
339!endif 357!endif
358!if $(USE_OLD_PCI_HOST) == FALSE
359 PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
360!endif
340 361
341################################################################################ 362################################################################################
342# 363#
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index 18517e337..c983a544d 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -87,6 +87,9 @@
87 DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf 87 DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
88 PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf 88 PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
89 PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf 89 PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
90!if $(USE_OLD_PCI_HOST) == FALSE
91 PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
92!endif
90 PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf 93 PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
91 PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf 94 PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
92 IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf 95 IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
@@ -247,6 +250,9 @@
247!if $(SECURE_BOOT_ENABLE) == TRUE 250!if $(SECURE_BOOT_ENABLE) == TRUE
248 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf 251 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
249!endif 252!endif
253!if $(USE_OLD_PCI_HOST) == FALSE
254 PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
255!endif
250 256
251[LibraryClasses.common.UEFI_DRIVER] 257[LibraryClasses.common.UEFI_DRIVER]
252 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf 258 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -261,6 +267,9 @@
261 DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf 267 DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
262!endif 268!endif
263 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf 269 UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
270!if $(USE_OLD_PCI_HOST) == FALSE
271 PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
272!endif
264 273
265[LibraryClasses.common.DXE_DRIVER] 274[LibraryClasses.common.DXE_DRIVER]
266 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf 275 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -292,6 +301,9 @@
292!if $(SECURE_BOOT_ENABLE) == TRUE 301!if $(SECURE_BOOT_ENABLE) == TRUE
293 FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf 302 FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
294!endif 303!endif
304!if $(USE_OLD_PCI_HOST) == FALSE
305 PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
306!endif
295 307
296[LibraryClasses.common.UEFI_APPLICATION] 308[LibraryClasses.common.UEFI_APPLICATION]
297 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf 309 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -303,6 +315,9 @@
303!else 315!else
304 DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf 316 DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
305!endif 317!endif
318!if $(USE_OLD_PCI_HOST) == FALSE
319 PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
320!endif
306 321
307[LibraryClasses.common.DXE_SMM_DRIVER] 322[LibraryClasses.common.DXE_SMM_DRIVER]
308 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf 323 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -322,6 +337,9 @@
322 DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf 337 DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf
323!endif 338!endif
324 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf 339 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
340!if $(USE_OLD_PCI_HOST) == FALSE
341 PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
342!endif
325 343
326[LibraryClasses.common.SMM_CORE] 344[LibraryClasses.common.SMM_CORE]
327 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf 345 PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -337,6 +355,9 @@
337!else 355!else
338 DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf 356 DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
339!endif 357!endif
358!if $(USE_OLD_PCI_HOST) == FALSE
359 PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
360!endif
340 361
341################################################################################ 362################################################################################
342# 363#