From: "Marcin Juszkiewicz" <marcin.juszkiewicz@linaro.org>
To: devel@edk2.groups.io
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
Leif Lindholm <quic_llindhol@quicinc.com>,
Graeme Gregory <graeme@xora.org.uk>,
Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Subject: [PATCH edk2-platforms 3/3] WIP: SbsaQemu: make PCIe variables dynamic (part 3)
Date: Tue, 13 Jun 2023 21:29:00 +0200 [thread overview]
Message-ID: <20230613192900.158022-4-marcin.juszkiewicz@linaro.org> (raw)
In-Reply-To: <20230613192900.158022-1-marcin.juszkiewicz@linaro.org>
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
next prev parent reply other threads:[~2023-06-13 19:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-13 19:28 [PATCH edk2-platforms 0/3] WIP: SbsaQemu: make PCIe dynamic Marcin Juszkiewicz
2023-06-13 19:28 ` [PATCH edk2-platforms 1/3] WIP: SbsaQemu: make PCIe variables dynamic (part 1) Marcin Juszkiewicz
2023-06-13 19:28 ` [PATCH edk2-platforms 2/3] WIP: SbsaQemu: make PCIe variables dynamic (part 2) Marcin Juszkiewicz
2023-06-13 19:29 ` Marcin Juszkiewicz [this message]
2023-06-21 12:15 ` [PATCH edk2-platforms 0/3] WIP: SbsaQemu: make PCIe dynamic Marcin Juszkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230613192900.158022-4-marcin.juszkiewicz@linaro.org \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox