From nobody Sun May 5 11:13:20 2024 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+72692+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+72692+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615510760; cv=none; d=zohomail.com; s=zohoarc; b=cWIkNLWI/ul/NdFwT7hh7n7/TGvuP2cWBfsoKv+qkrraCT8BuGUzjnTnX8xZGZyp5hXCf/5q7IMgcfLqrCxjE2ZPSwLxhgwiiw8DdH1NlwBKROFtt6jqJiUUErrk1+lYbK280ucC/6WPLOuszCfcnCZT0quCfit3UsA7h/bdt54= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615510760; 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=Lo29Gbt6ufBIFn9WAtL8cEPZ8IfEXfamwPSvuFTJpxc=; b=KXebxZu8TtlsR/IxNc9Bin2y53Z9/zk6OZ5i5Vb0O843q/grMjJK26M2SYz4isRB0Z0T8VPmq9oCoejL4M9YpDME4hezZFaZ19PO/CAuGXXw7AkqB6AiNlG5OkOhm8yY4lkIANra2qal4PoiaPmMBCPa2pfoLTSdX6uuBJJf9+k= 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+72692+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1615510760658501.9193787109258; Thu, 11 Mar 2021 16:59:20 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id igdNYY1788612xiV2NhYARHz; Thu, 11 Mar 2021 16:59:20 -0800 X-Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) by mx.groups.io with SMTP id smtpd.web12.1981.1615510759669699912 for ; Thu, 11 Mar 2021 16:59:19 -0800 X-Received: by mail-qk1-f174.google.com with SMTP id a9so22713040qkn.13 for ; Thu, 11 Mar 2021 16:59:19 -0800 (PST) X-Gm-Message-State: yvM5b2cQ2dhkK4rDgEXoBQCex1787277AA= X-Google-Smtp-Source: ABdhPJwShpZKHuRwLv1TxzHXaj14S2TLhbls+fyGyCEpwK8Mi9iR2nGqDrohHqgrkcBvTE+v3b4WDQ== X-Received: by 2002:a37:a8a:: with SMTP id 132mr10432989qkk.463.1615510758785; Thu, 11 Mar 2021 16:59:18 -0800 (PST) X-Received: from localhost.localdomain (bras-base-stsvon1503w-grc-23-174-92-28-187.dsl.bell.ca. [174.92.28.187]) by smtp.googlemail.com with ESMTPSA id g7sm2962472qti.20.2021.03.11.16.59.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Mar 2021 16:59:18 -0800 (PST) From: "Shashi Mallela" To: leif@nuviainc.com, ardb+tianocore@kernel.org, graeme@nuviainc.com Cc: devel@edk2.groups.io Subject: [edk2-devel] [PATCH v1 1/2] Platform/Qemu/SbsaQemu/SbsaQemu.dsc: define GICv3 ITS base address Date: Thu, 11 Mar 2021 19:59:15 -0500 Message-Id: <20210312005916.43919-2-shashi.mallela@linaro.org> In-Reply-To: <20210312005916.43919-1-shashi.mallela@linaro.org> References: <20210312005916.43919-1-shashi.mallela@linaro.org> 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,shashi.mallela@linaro.org Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1615510760; bh=1jFxqqqTQSFxgovFQUWYIvnzIoZR/N3fbfEwpL85SUE=; h=Cc:Date:From:Reply-To:Subject:To; b=SuYLQTtVYRlQ32c2bvRHM3It019in2MLCEUp9WHb7TyYvyvJwpAMAzLy92p0kvkAR/9 PCARizwClSM6cOIRGO3nRe4cGdW037hnETuMTIo6dT5H6tQEeAs/iY3yRGpQhMDE0zdcb IE0w0R5U+KHr1yS8CA62BwGPRzcHXkG2IWw= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Define new pcd setting for specifying the base address of GICv3 Interrupt Translation Service.For Qemu sbsa-ref platforms,this enables the detection of GIC ITS capability within the GIC ITS structure of ACPI MADT. Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Graeme Gregory Signed-off-by: Shashi Mallela --- Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc b/Platform/Qemu/SbsaQemu/S= bsaQemu.dsc index c1f8a4696560..92e5c4a2916c 100644 --- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc @@ -434,6 +434,9 @@ [PcdsFixedAtBuild.common] gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciBase|0x60110000 gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciSize|0x00010000 =20 + # GIC ITS + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdGicItsBase|0x44090000 + # PL011 - Serial Terminal gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x60000000 =20 --=20 2.27.0 -=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 (#72692): https://edk2.groups.io/g/devel/message/72692 Mute This Topic: https://groups.io/mt/81268759/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- From nobody Sun May 5 11:13:20 2024 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+72693+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+72693+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615510761; cv=none; d=zohomail.com; s=zohoarc; b=K8kVaVlDNM6TVVTpQYwz0IRq0qY4eejNoPWrFMAJpM6wR1WXErmDyD8I8XiE2/xl1u2yWdBOAfYQO7mCG9GwVtiwRyGC4mvwcBitK/w72n5Y6cjYdkC+2uacAPdnYKcrnDebB6CFV5j1E82McUE4GunNdb/juqBRd++UIY7WE/Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615510761; 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=cs9XFzU06yohR+ZQqz8trE+JznrJtxoUZm6U+K2nLRY=; b=aCYF4m9gcs1ip72CoXkSA2yiYrnl9qfYbpeqm1tkqx6757dW8nxUIJFd5a38aAI0qV5mmTxWFK+yWTzzPLAM3ssmx6i7gg4xGQqxasrMlKbocsqEDkPzz4I2DTvyL0LgilQXbbBn/ZzgT4RPsMeTyN+KcVcstNhAXnjMjJWCXlM= 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+72693+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1615510761373381.9058398631804; Thu, 11 Mar 2021 16:59:21 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id nLI5YY1788612xn3NQyGIE9F; Thu, 11 Mar 2021 16:59:21 -0800 X-Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) by mx.groups.io with SMTP id smtpd.web08.2009.1615510760291958034 for ; Thu, 11 Mar 2021 16:59:20 -0800 X-Received: by mail-qv1-f41.google.com with SMTP id cx5so3510462qvb.10 for ; Thu, 11 Mar 2021 16:59:20 -0800 (PST) X-Gm-Message-State: 1eEmLgkOLRT7biAiudIx7yZrx1787277AA= X-Google-Smtp-Source: ABdhPJzR7PuqT2LMROKksY6fq4LigEpxzjxh34XxqDmxjkUG5YSwcwFgWQVKLGEbVAHBxhUozJVflw== X-Received: by 2002:ad4:45e4:: with SMTP id q4mr10189640qvu.11.1615510759504; Thu, 11 Mar 2021 16:59:19 -0800 (PST) X-Received: from localhost.localdomain (bras-base-stsvon1503w-grc-23-174-92-28-187.dsl.bell.ca. [174.92.28.187]) by smtp.googlemail.com with ESMTPSA id g7sm2962472qti.20.2021.03.11.16.59.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Mar 2021 16:59:19 -0800 (PST) From: "Shashi Mallela" To: leif@nuviainc.com, ardb+tianocore@kernel.org, graeme@nuviainc.com Cc: devel@edk2.groups.io Subject: [edk2-devel] [PATCH v1 2/2] Silicon/Qemu: Update MADT with GICv3 ITS info Date: Thu, 11 Mar 2021 19:59:16 -0500 Message-Id: <20210312005916.43919-3-shashi.mallela@linaro.org> In-Reply-To: <20210312005916.43919-1-shashi.mallela@linaro.org> References: <20210312005916.43919-1-shashi.mallela@linaro.org> 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,shashi.mallela@linaro.org Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1615510761; bh=XaGmz9Q02/B1GhvXt9UZm4cgqXi2mfrlb5lFPUwvSI0=; h=Cc:Date:From:Reply-To:Subject:To; b=ILWI421DDnsOW7fK6CGpdW9aNepXeA42XiehXa3UtNgGUH1F/+/UiqVwN7yucFGgupW h9Ky3o3+q/sS2cevpf1tw17K+SClGE1+6xIODQjgPrfT5swOJbAg461C4HUpM0A/RnSdv fDjINtJ0IyEF7Mr+KW95LgKbgVvA2VSUDeY= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" For Qemu sbsa-ref platforms,to enable detection of GICv3 Interrupt Translation Service capability in the ACPI MADT,the GIC ITS structure is created with the relevant values for each of its fields.The existing MADT functionality is extended to include GIC ITS structure presence as well. Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Graeme Gregory Signed-off-by: Shashi Mallela --- Silicon/Qemu/SbsaQemu/SbsaQemu.dec | 3 +++ Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf | 2 ++ Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf | 2 ++ Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h | 10 +++= +++++++ Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c | 10 +++= ++++++- 5 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec b/Silicon/Qemu/SbsaQemu/Sbs= aQemu.dec index 9448852967b6..8654cc7c858c 100644 --- a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec +++ b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec @@ -36,6 +36,9 @@ [PcdsFixedAtBuild.common] gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciSize|0x10000|UINT3= 2|0x00000004 gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdDeviceTreeBaseAddress|0x100000= 00000|UINT64|0x00000005 =20 + # ARM Generic Interrupt Controller ITS + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdGicItsBase|0|UINT64|0x0000000F + # PCDs complementing PCIe layout pulled into ACPI tables # Limit =3D Base + Size - 1 gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPciIoLimit|0x0000ffff|UINT32|0= x00000006 diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf b/Silicon/Qemu= /SbsaQemu/AcpiTables/AcpiTables.inf index 9be34488eb7a..5616b73178ff 100644 --- a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf +++ b/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf @@ -74,3 +74,5 @@ [FixedPcd] gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciSize gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciBase gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciSize + + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdGicItsBase diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.= inf b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf index c6de685bd2c4..2eb6577fd077 100644 --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf @@ -65,3 +65,5 @@ [FixedPcd] gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemTableId gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemRevision + + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdGicItsBase diff --git a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h = b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h index 4d5b05ba17c6..5f9e9477bf6a 100644 --- a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h +++ b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h @@ -37,6 +37,16 @@ SBSAQEMU_MADT_GICR_SIZE /* DiscoveryRangeLength */ = \ } =20 +// Macro for MADT GIC ITS Structure +#define SBSAQEMU_MADT_GIC_ITS_INIT() { = \ + EFI_ACPI_6_0_GIC_ITS, /* Type */ = \ + sizeof (EFI_ACPI_6_0_GIC_ITS_STRUCTURE), /* Length */ = \ + EFI_ACPI_RESERVED_WORD, /* Reserved */ = \ + 0, /* GicItsId */ = \ + FixedPcdGet64 (PcdGicItsBase), /* PhysicalBaseAddress */ = \ + EFI_ACPI_RESERVED_DWORD /* Reserved */ = \ + } + #define SBSAQEMU_ACPI_SCOPE_OP_MAX_LENGTH 5 =20 #define SBSAQEMU_ACPI_SCOPE_NAME { '_', 'S', 'B', '_' } diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.= c b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c index b8901030ecd0..4e0d24ed6608 100644 --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c @@ -91,6 +91,9 @@ AddMadtTable ( // Initialize GIC Redistributor Structure EFI_ACPI_6_0_GICR_STRUCTURE Gicr =3D SBSAQEMU_MADT_GICR_INIT(); =20 + // Initialize GIC ITS Structure + EFI_ACPI_6_0_GIC_ITS_STRUCTURE Gic_Its =3D SBSAQEMU_MADT_GIC_ITS_INIT(); + // Get CoreCount which was determined eariler after parsing device tree NumCores =3D PcdGet32 (PcdCoreCount); =20 @@ -98,7 +101,8 @@ AddMadtTable ( TableSize =3D sizeof (EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADE= R) + (sizeof (EFI_ACPI_6_0_GIC_STRUCTURE) * NumCores) + sizeof (EFI_ACPI_6_0_GIC_DISTRIBUTOR_STRUCTURE) + - sizeof (EFI_ACPI_6_0_GICR_STRUCTURE); + sizeof (EFI_ACPI_6_0_GICR_STRUCTURE) + + sizeof (EFI_ACPI_6_0_GIC_ITS_STRUCTURE); =20 Status =3D gBS->AllocatePages ( AllocateAnyPages, @@ -138,6 +142,10 @@ AddMadtTable ( CopyMem (New, &Gicr, sizeof (EFI_ACPI_6_0_GICR_STRUCTURE)); New +=3D sizeof (EFI_ACPI_6_0_GICR_STRUCTURE); =20 + // GIC ITS Structure + CopyMem (New, &Gic_Its, sizeof (EFI_ACPI_6_0_GIC_ITS_STRUCTURE)); + New +=3D sizeof (EFI_ACPI_6_0_GIC_ITS_STRUCTURE); + AcpiPlatformChecksum ((UINT8*) PageAddress, TableSize); =20 Status =3D AcpiTable->InstallAcpiTable ( --=20 2.27.0 -=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 (#72693): https://edk2.groups.io/g/devel/message/72693 Mute This Topic: https://groups.io/mt/81268760/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-