From nobody Tue Feb 10 20:14:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+106066+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+106066+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1686684571; cv=none; d=zohomail.com; s=zohoarc; b=mx6yb62N+BBaRs0qIiWWHEYy4Lb/u+EZEUEOoe1HrHh0BROcDWFGoQeN9GSoIBdCnXL3W3IErZGGd4JprBZ5COZPRfHkXNUOt2jbnjQg4Jpm6dEFvv9eFOyIGxHr52WUTGoxX1wLZ/AHziev5QxEvAzXAySxUHzNLlxyxZKf4iA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1686684571; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=V5u4f88ZNHP9dDp+oogooYR4F0eoi99i8nT+s3hqxnY=; b=VzPFbdikjyRPSjnAqnovVa4vFpOHU1QBgd1ES3gbCGlopMcy7OEaIsa1iDE1/5ZGiIRjyagBDuY20EPlRoQemJHPr3ocMxFyAHjuZj9DLDE7vy6R7O8OKPDe4XL4Bv6kyRrT4uXjCnwtjbHb00y68lx5F2Y4f0ifUd73q7G5nNQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+106066+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1686684571742358.87053907400775; Tue, 13 Jun 2023 12:29:31 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id aCDYYY1788612xWQucLHWIEC; Tue, 13 Jun 2023 12:29:31 -0700 X-Received: from muminek.juszkiewicz.com.pl (muminek.juszkiewicz.com.pl [213.251.184.221]) by mx.groups.io with SMTP id smtpd.web11.45.1686684569532374039 for ; Tue, 13 Jun 2023 12:29:29 -0700 X-Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id 1ECC3260A8B; Tue, 13 Jun 2023 21:29:28 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at juszkiewicz.com.pl X-Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YMxEsRcDH92A; Tue, 13 Jun 2023 21:29:26 +0200 (CEST) X-Received: from applejack.lan (83.11.39.176.ipv4.supernova.orange.pl [83.11.39.176]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id 0D230260A92; Tue, 13 Jun 2023 21:29:25 +0200 (CEST) From: "Marcin Juszkiewicz" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Graeme Gregory , Marcin Juszkiewicz Subject: [edk2-devel] [PATCH edk2-platforms 3/3] WIP: SbsaQemu: make PCIe variables dynamic (part 3) Date: Tue, 13 Jun 2023 21:29:00 +0200 Message-Id: <20230613192900.158022-4-marcin.juszkiewicz@linaro.org> In-Reply-To: <20230613192900.158022-1-marcin.juszkiewicz@linaro.org> References: <20230613192900.158022-1-marcin.juszkiewicz@linaro.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,marcin.juszkiewicz@linaro.org X-Gm-Message-State: gEpp1qqkNRP1FmMBXmWgqAhlx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1686684571; bh=C/4ewpqIklb3m1twAyzRoC+sRQ3T+fIwpf5lv8SxNg8=; h=Cc:Date:From:Reply-To:Subject:To; b=cv+Plq0oHYS5oB3SnEAzoMlgqHOwR/tyo6Cd5iVt0cR+bCrREzotm/TumzVo/RyYWlx Sssf7h0HL6iyM1xFCHzOhdDo0qMKD0LCJr9k9WHEkOLSLB9LIBzzPAd+XfiYWlyu+Q1S+ JZQuOWaPgy+1ifbyTTHCFrSHRgs1Mpc4sn4= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1686684572325100005 Content-Type: text/plain; charset="utf-8" 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 =3D 0x1B36, DID =3D 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=3D=3D1)) --- 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/Sbs= aQemu.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|UINT3= 2|0x00000004 gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdDeviceTreeBaseAddress|0x100000= 00000|UINT64|0x00000005 =20 +[PcdsDynamic.common] # PCDs complementing PCIe layout pulled into ACPI tables # Limit =3D Base + Size - 1 gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciIoLimit|0x0000ffff|UINT32|0= x00000006 @@ -47,7 +48,6 @@ [PcdsFixedAtBuild.common] gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciExpressBarSize|0x10000000|U= INT64|0x00000009 gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciExpressBarLimit|0xFFFFFFFF|= UINT64|0x00000010 =20 -[PcdsDynamic.common] gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdCoreCount|0x1|UINT32|0x00000100 gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdClusterCount|0x1|UINT32|0x0000= 0101 =20 diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc b/Platform/Qemu/SbsaQemu/S= bsaQemu.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 >=3D 3.0. gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosEntryPointProvideMethod|0x2 =20 - # - # PLDA PCI Root Complex - # - # ECAM size =3D=3D 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 =20 + # + # PLDA PCI Root Complex + # + # ECAM size =3D=3D 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 =20 + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase + + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciBase + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciSize + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciBase + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciSize + +[Pcd] + gArmTokenSpaceGuid.PcdGicDistributorBase + gArmTokenSpaceGuid.PcdGicRedistributorsBase + gArmTokenSpaceGuid.PcdPciBusMin gArmTokenSpaceGuid.PcdPciBusMax =20 @@ -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/SbsaQem= uPciHostBridgeLib.inf b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuPciHostBridge= Lib/SbsaQemuPciHostBridgeLib.inf index 9d6791ff7dc2..6bc78ac108f0 100644 --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuPciHostBridgeLib/SbsaQemuPciHos= tBridgeLib.inf +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuPciHostBridgeLib/SbsaQemuPciHos= tBridgeLib.inf @@ -33,7 +33,7 @@ [Packages] [LibraryClasses] DebugLib =20 -[FixedPcd] +[Pcd] gArmTokenSpaceGuid.PcdPciBusMin gArmTokenSpaceGuid.PcdPciBusMax gArmTokenSpaceGuid.PcdPciIoBase --=20 2.40.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- 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/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-