[edk2-devel] [PATCH edk2-platforms 3/3] WIP: SbsaQemu: make PCIe variables dynamic (part 3)
Marcin Juszkiewicz
marcin.juszkiewicz at linaro.org
Tue Jun 13 19:29:00 UTC 2023
Make those PCIe variables dynamic. But this breaks things:
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 100FB866190
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 100FB866178
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 100FB866160
[Bds] Entry...
[BdsDxe] Locate Variable Policy protocol - Success
Variable Driver Auto Update PlatformLang, PlatformLang:en, Lang:eng Status: Success
[Variable]END_OF_DXE is signaled
Initialize variable error flag (FF)
PCI Bus First Scanning
PciBus: Discovered PCI @ [00|00|00] [VID = 0x1B36, DID = 0x8]
FATAL ERROR - RaiseTpl with OldTpl(0x1F) > NewTpl(0x10)
ASSERT [DxeCore] /home/marcin/devel/linaro/sbsa-qemu/code/edk2/MdeModulePkg/Core/Dxe/Event/Tpl.c(66): ((BOOLEAN)(0==1))
---
Silicon/Qemu/SbsaQemu/SbsaQemu.dec | 2 +-
Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 53 ++++++++++---------
.../Qemu/SbsaQemu/AcpiTables/AcpiTables.inf | 22 ++++----
.../SbsaQemuPciHostBridgeLib.inf | 2 +-
4 files changed, 40 insertions(+), 39 deletions(-)
diff --git a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec
index 9448852967b6..3fdf23b77a08 100644
--- a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec
+++ b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec
@@ -36,6 +36,7 @@ [PcdsFixedAtBuild.common]
gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciSize|0x10000|UINT32|0x00000004
gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdDeviceTreeBaseAddress|0x10000000000|UINT64|0x00000005
+[PcdsDynamic.common]
# PCDs complementing PCIe layout pulled into ACPI tables
# Limit = Base + Size - 1
gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciIoLimit|0x0000ffff|UINT32|0x00000006
@@ -47,7 +48,6 @@ [PcdsFixedAtBuild.common]
gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciExpressBarSize|0x10000000|UINT64|0x00000009
gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciExpressBarLimit|0xFFFFFFFF|UINT64|0x00000010
-[PcdsDynamic.common]
gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdCoreCount|0x1|UINT32|0x00000100
gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdClusterCount|0x1|UINT32|0x00000101
diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
index 0bd0df4f0239..3cc0f2a270ba 100644
--- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
+++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
@@ -459,32 +459,6 @@ [PcdsFixedAtBuild.common]
# point only, for entry point versions >= 3.0.
gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosEntryPointProvideMethod|0x2
- #
- # PLDA PCI Root Complex
- #
- # ECAM size == 0x10000000
- gArmTokenSpaceGuid.PcdPciBusMin|0
- gArmTokenSpaceGuid.PcdPciBusMax|255
- gArmTokenSpaceGuid.PcdPciIoBase|0x0
- gArmTokenSpaceGuid.PcdPciIoSize|0x00010000
- gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciIoLimit|0x0000ffff
- gArmTokenSpaceGuid.PcdPciMmio32Base|0x80000000
- gArmTokenSpaceGuid.PcdPciMmio32Size|0x70000000
- gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciMmio32Limit|0xEFFFFFFF
- gArmTokenSpaceGuid.PcdPciMmio64Base|0x100000000
- gArmTokenSpaceGuid.PcdPciMmio64Size|0xFF00000000
- gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciMmio64Limit|0xFFFFFFFFFF
-
- # set PcdPciExpressBaseAddress to MAX_UINT64, which signifies that this
- # PCD and PcdPciDisableBusEnumeration have not been assigned yet
- # TODO: PcdPciExpressBaseAddress set to max_uint64
- gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xf0000000
- gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciExpressBarSize|0x10000000
- gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciExpressBarLimit|0xFFFFFFFF
-
- gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation|0x7fff0000
- gEfiMdePkgTokenSpaceGuid.PcdPciMmio32Translation|0x0
- gEfiMdePkgTokenSpaceGuid.PcdPciMmio64Translation|0x0
## If TRUE, OvmfPkg/AcpiPlatformDxe will not wait for PCI
# enumeration to complete before installing ACPI tables.
gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|FALSE
@@ -523,6 +497,33 @@ [PcdsDynamicDefault.common]
gArmTokenSpaceGuid.PcdGicDistributorBase|0x40060000
gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x40080000
+ #
+ # PLDA PCI Root Complex
+ #
+ # ECAM size == 0x10000000
+ gArmTokenSpaceGuid.PcdPciBusMin|0
+ gArmTokenSpaceGuid.PcdPciBusMax|255
+ gArmTokenSpaceGuid.PcdPciIoBase|0x0
+ gArmTokenSpaceGuid.PcdPciIoSize|0x00010000
+ gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciIoLimit|0x0000ffff
+ gArmTokenSpaceGuid.PcdPciMmio32Base|0x80000000
+ gArmTokenSpaceGuid.PcdPciMmio32Size|0x70000000
+ gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciMmio32Limit|0xEFFFFFFF
+ gArmTokenSpaceGuid.PcdPciMmio64Base|0x100000000
+ gArmTokenSpaceGuid.PcdPciMmio64Size|0xFF00000000
+ gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciMmio64Limit|0xFFFFFFFFFF
+
+ # set PcdPciExpressBaseAddress to MAX_UINT64, which signifies that this
+ # PCD and PcdPciDisableBusEnumeration have not been assigned yet
+ # TODO: PcdPciExpressBaseAddress set to max_uint64
+ gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xf0000000
+ gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciExpressBarSize|0x10000000
+ gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciExpressBarLimit|0xFFFFFFFF
+
+ gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation|0x7fff0000
+ gEfiMdePkgTokenSpaceGuid.PcdPciMmio32Translation|0x0
+ gEfiMdePkgTokenSpaceGuid.PcdPciMmio64Translation|0x0
+
#
# Set video resolution for boot options
# PlatformDxe can set the former at runtime.
diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf b/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf
index 5607878c2040..a8300fd355fd 100644
--- a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf
+++ b/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf
@@ -42,6 +42,17 @@ [FixedPcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemTableId
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemRevision
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase
+
+ gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciBase
+ gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciSize
+ gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciBase
+ gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciSize
+
+[Pcd]
+ gArmTokenSpaceGuid.PcdGicDistributorBase
+ gArmTokenSpaceGuid.PcdGicRedistributorsBase
+
gArmTokenSpaceGuid.PcdPciBusMin
gArmTokenSpaceGuid.PcdPciBusMax
@@ -63,14 +74,3 @@ [FixedPcd]
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciExpressBarSize
gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciExpressBarLimit
-
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase
-
- gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciBase
- gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciSize
- gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciBase
- gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciSize
-
-[Pcd]
- gArmTokenSpaceGuid.PcdGicDistributorBase
- gArmTokenSpaceGuid.PcdGicRedistributorsBase
diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuPciHostBridgeLib/SbsaQemuPciHostBridgeLib.inf b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuPciHostBridgeLib/SbsaQemuPciHostBridgeLib.inf
index 9d6791ff7dc2..6bc78ac108f0 100644
--- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuPciHostBridgeLib/SbsaQemuPciHostBridgeLib.inf
+++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuPciHostBridgeLib/SbsaQemuPciHostBridgeLib.inf
@@ -33,7 +33,7 @@ [Packages]
[LibraryClasses]
DebugLib
-[FixedPcd]
+[Pcd]
gArmTokenSpaceGuid.PcdPciBusMin
gArmTokenSpaceGuid.PcdPciBusMax
gArmTokenSpaceGuid.PcdPciIoBase
--
2.40.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#106066): https://edk2.groups.io/g/devel/message/106066
Mute This Topic: https://groups.io/mt/99513052/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list