From nobody Mon Feb 9 19:53:11 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+66542+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+66542+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1603381822; cv=none; d=zohomail.com; s=zohoarc; b=ilF8Wmyt9ucYfB7I4lRYdDF1p4/fcwXQ2rhxuhOW2XQRW/536AiTT31mnUkNVZRfGCBh9AsrcBDSA9LQ6Ab6KV/8nFC3+xtJLXGgefoORRTVCauUEcglX0gUUaheakVLAuuslLpbtMS822JbOWT9uo4X19HfbdC8SuHSYz68+aU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603381822; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=iaBkcMni27/dICrbY4NLBEuo8OfaHRql2b+HbNlYTyM=; b=kCIXR2K8hRYO5XuE9gNt1XToc7Aop7u+F562f9+FLjgUL+5Q8a3vaRAHR+EG/MU+0FS3hGSyD9a93dhY3oJ6WWmyCS6dlQLfGHrfa7D/vuCuZpXV5RGU9GBWwndQqFUjE21qWdzA22sh8V/eJLdjLXJuNlWHYLKagi7op2TOgBk= 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+66542+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1603381822691592.72611098124; Thu, 22 Oct 2020 08:50:22 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id g4JPYY1788612xRSiEY8su8O; Thu, 22 Oct 2020 08:50:22 -0700 X-Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mx.groups.io with SMTP id smtpd.web11.721.1603381821121537465 for ; Thu, 22 Oct 2020 08:50:21 -0700 X-Received: by mail-wr1-f54.google.com with SMTP id y12so3050774wrp.6 for ; Thu, 22 Oct 2020 08:50:20 -0700 (PDT) X-Gm-Message-State: B8zLZrgCX6NBECCXFvboBZnjx1787277AA= X-Google-Smtp-Source: ABdhPJw/D68/VNluyYpAVL7zpHB/Q6BQU1N//srTqNCPpvBgTCSouhrCL2QpjIhvKLLy3wMfYi+iRw== X-Received: by 2002:adf:f2c1:: with SMTP id d1mr3632928wrp.179.1603381819492; Thu, 22 Oct 2020 08:50:19 -0700 (PDT) X-Received: from white-rabbit.sw.nuviainc.com ([2.30.51.167]) by smtp.gmail.com with ESMTPSA id 133sm4377342wmb.2.2020.10.22.08.50.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 08:50:19 -0700 (PDT) From: "Tomas Pilar (tpilar)" To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Tanmay Jagdale Subject: [edk2-devel] [edk2-platform][PATCH 2/3] Platform,Silicon/Qemu: Define PcdPcie*Limit variables Date: Thu, 22 Oct 2020 16:50:15 +0100 Message-Id: <20201022155016.228362-3-tomas@nuviateam.com> In-Reply-To: <20201022155016.228362-1-tomas@nuviateam.com> References: <20201022155016.228362-1-tomas@nuviateam.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,tomas@nuviateam.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603381822; bh=p1u3oczDO0YPqqY9/YohMjZvpNyKEidSmPkbcgjWiA4=; h=Cc:Date:From:Reply-To:Subject:To; b=SjweX9k0Rg+olCqWXkyQrf0yVoK8sou28q/UsPjJbaC0FtDTb3j1IjLtjN/iym6xDhf ZRDN8b8LU19Lp54bOCJ6eG2o0jTJm8Z9Xw5q+mvwS8eMzT1aWlsyi2shvGmZh/wk+zkOF udVxacSWAHjtxuwMplDZcL3FOKB5TR+NLYo= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The ACPI tables require not only the base and the size of various PCIe memory windows, but also the limit defined as Limit =3D Base + Size - 1 Given that ASL does not permit basic constant arithmetics when defining resources or passing arguements to functions, we define PCDs that hold these limits. The PCDs can then be modified individually in platform DSC files. Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Tanmay Jagdale Signed-off-by: Tomas Pilar --- Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 6 ++++++ Silicon/Qemu/SbsaQemu/SbsaQemu.dec | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc b/Platform/Qemu/SbsaQemu/S= bsaQemu.dsc index 0e6d738bee..49bc5033f4 100644 --- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc @@ -458,15 +458,21 @@ DEFINE NETWORK_HTTP_BOOT_ENABLE =3D FALSE 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 =20 # 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 + gArmTokenSpaceGuid.PcdPciIoTranslation|0x7fff0000 gArmTokenSpaceGuid.PcdPciMmio32Translation|0x0 gArmTokenSpaceGuid.PcdPciMmio64Translation|0x0 diff --git a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec b/Silicon/Qemu/SbsaQemu/Sbs= aQemu.dec index e8d55a530d..476dc82f98 100644 --- a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec +++ b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec @@ -36,6 +36,17 @@ gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciSize|0x10000|UINT3= 2|0x00000004 gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdDeviceTreeBaseAddress|0x100000= 00000|UINT64|0x00000005 =20 + # PCDs complementing PCIe layout pulled into ACPI tables + # Limit =3D Base + Size - 1 + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciIoLimit|0x0000ffff|UINT32|0= x00000006 + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciMmio32Limit|0xEFFFFFFF|UINT= 32|0x00000007 + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciMmio64Limit|0xFFFFFFFFFF|UI= NT64|0x00000008 + + # PCDs complementing gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress + # BarLimit =3D BaseAddress + BarSize - 1 + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciExpressBarSize|0x10000000|U= INT64|0x00000009 + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciExpressBarLimit|0xFFFFFFFF|= UINT64|0x00000010 + [PcdsDynamic.common] gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdCoreCount|0x1|UINT32|0x00000100 gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdClusterCount|0x1|UINT32|0x0000= 0101 --=20 2.25.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 (#66542): https://edk2.groups.io/g/devel/message/66542 Mute This Topic: https://groups.io/mt/77733006/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-