From nobody Tue Feb 10 00:59:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+56278+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+56278+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1585133608; cv=none; d=zohomail.com; s=zohoarc; b=jhO21zNnuelfcNW82a8dck1ZkPRTs2EhczJnAKWJVCWpKEqzvGSk85RmRDUKtm1M/4/ih0ogWW9O2+W+bJpd3kFdrGlDPDCJJbcuyCi6L0RFCQP12HiHcEbVYt2kDFBrx/jCOAopywrhCnhcO4lNm4MDO3NyEJ3CeUFIaQK5k7U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585133608; 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=JDx9nmAWRUAI1L7pCNFie+cDSWywRQBia5Q8w1GbxJE=; b=FU40WeGQiGBVQ20J7ogoHGEQVgp7a5zvmZGKsOWHA6xddJRbHwoCzgZ9yXwhaRU89RiGpMdHVWknV8DpHjfqhWlyppCIdi5ovHoC418SmgQ4Q340SMVE6lh7XJyNxkpc9nHw/iWSypTXYI4G0GsqVgZ2EAKlqMaWIMTbnVkRUrU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+56278+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1585133608901694.8200886611548; Wed, 25 Mar 2020 03:53:28 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id GrmDYY1788612xEmR8jT3BwT; Wed, 25 Mar 2020 03:53:28 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.8699.1585133607945767931 for ; Wed, 25 Mar 2020 03:53:28 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A080931B; Wed, 25 Mar 2020 03:53:27 -0700 (PDT) X-Received: from usa.arm.com (a073440-lin.blr.arm.com [10.162.16.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 409973F71F; Wed, 25 Mar 2020 03:53:26 -0700 (PDT) From: "Aditya Angadi" To: devel@edk2.groups.io Cc: Aditya Angadi , Leif Lindholm , Ard Biesheuvel Subject: [edk2-devel] [edk2-platforms][PATCH v3 4/9] Platform/ARM/SgiPkg: remove Date: Wed, 25 Mar 2020 16:22:47 +0530 Message-Id: <20200325105252.13905-5-aditya.angadi@arm.com> In-Reply-To: <20200325105252.13905-1-aditya.angadi@arm.com> References: <20200325105252.13905-1-aditya.angadi@arm.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,aditya.angadi@arm.com X-Gm-Message-State: XOpWR9rmabP8JqvLnkUK5l8sx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1585133608; bh=KkgNtor/yXbl2YrK+cWZjHLWD/mz8DApA+yOGCIn1o0=; h=Cc:Date:From:Reply-To:Subject:To; b=a7ZBKVozykqS1aSbbdHhmUIZxtV/qGVMON46UKPkwpUwKIfjzAQvHAeNpsVwAn+iW6u hMDKGQOuef23I/aSXKSamsgYZHv1SezFO7ixPO/C+HIrr02j3WtAO08ZMIKJ/WylYZOEN tLIGL6R2XaK7JI9IeHkqtgEtkBY436KZ60Y= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The number of CPUs depend on the SGI/RD platform. So instead of defining a Fixed PCD to specify the value of core and cluster count, let each platform define these values. Cc: Leif Lindholm Cc: Ard Biesheuvel Signed-off-by: Aditya Angadi Reviewed-by: Ard Biesheuvel --- Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc | 7 ++++++- Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf | 2 -- Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc | 7 ++++--- Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf | 2 -- Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc | 12 ++++++------ Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf | 2 -- Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc | 9 +++++---- Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf | 4 +--- Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf | 3 --- Platform/ARM/SgiPkg/SgiPlatform.dsc | 4 ---- 10 files changed, 22 insertions(+), 30 deletions(-) diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc b/Platform/A= RM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc index 987254928535..a9540f2e0374 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc +++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc @@ -14,12 +14,17 @@ #include #include =20 +#define CLUSTER_COUNT 2 +#define CORES_PER_CLUSTER 8 +#define THREADS_PER_CORE 2 +#define CORE_COUNT (CLUSTER_COUNT * CORES_PER_CLUSTER *= THREADS_PER_CORE) + // Multiple APIC Description Table #pragma pack (1) =20 typedef struct { EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header; - EFI_ACPI_6_2_GIC_STRUCTURE GicInterfaces[32]; + EFI_ACPI_6_2_GIC_STRUCTURE GicInterfaces[CORE= _COUNT]; EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE GicDistributor; EFI_ACPI_6_2_GICR_STRUCTURE GicRedistributor; EFI_ACPI_6_2_GIC_ITS_STRUCTURE GicIts; diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf b/Platfo= rm/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf index b08d7c2df5c7..742ca9e68335 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf @@ -34,8 +34,6 @@ [Packages] Platform/ARM/SgiPkg/SgiPlatform.dec =20 [FixedPcd] - gArmPlatformTokenSpaceGuid.PcdCoreCount - gArmPlatformTokenSpaceGuid.PcdClusterCount gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase gArmPlatformTokenSpaceGuid.PL011UartInterrupt =20 diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc b/Platform/A= RM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc index 05eb78c5616a..d8ec0ce421dc 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc @@ -14,15 +14,16 @@ #include #include =20 -#define CORE_CNT (FixedPcdGet32 (PcdClusterCount) * \ - FixedPcdGet32 (PcdCoreCount)) +#define CLUSTER_COUNT 2 +#define CORES_PER_CLUSTER 4 +#define CORE_COUNT (CLUSTER_COUNT * CORES_PER_CLUSTER) =20 // Multiple APIC Description Table #pragma pack (1) =20 typedef struct { EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header; - EFI_ACPI_6_2_GIC_STRUCTURE GicInterfaces[CORE= _CNT]; + EFI_ACPI_6_2_GIC_STRUCTURE GicInterfaces[CORE= _COUNT]; EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE GicDistributor; EFI_ACPI_6_2_GICR_STRUCTURE GicRedistributor; EFI_ACPI_6_2_GIC_ITS_STRUCTURE GicIts; diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf b/Platfo= rm/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf index 61b07bffccf3..206479f9428e 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf @@ -34,8 +34,6 @@ [Packages] Platform/ARM/SgiPkg/SgiPlatform.dec =20 [FixedPcd] - gArmPlatformTokenSpaceGuid.PcdCoreCount - gArmPlatformTokenSpaceGuid.PcdClusterCount gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase gArmPlatformTokenSpaceGuid.PL011UartInterrupt =20 diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc b/Platform= /ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc index 47368931e367..add972437496 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc @@ -14,19 +14,19 @@ #include #include =20 -#define CORE_CNT (FixedPcdGet32 (PcdClusterCount) * \ - FixedPcdGet32 (PcdCoreCount)) - -#define CHIP_CNT 2 +#define CLUSTER_COUNT 2 +#define CORES_PER_CLUSTER 4 +#define CORE_COUNT (CLUSTER_COUNT * CORES_PER_CLUSTER) +#define CHIP_COUNT 2 =20 // Multiple APIC Description Table #pragma pack (1) =20 typedef struct { EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header; - EFI_ACPI_6_2_GIC_STRUCTURE GicInterfaces[CORE_= CNT * CHIP_CNT]; + EFI_ACPI_6_2_GIC_STRUCTURE GicInterfaces[CORE_= COUNT * CHIP_COUNT]; EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE GicDistributor; - EFI_ACPI_6_2_GICR_STRUCTURE GicRedistributor[CH= IP_CNT]; + EFI_ACPI_6_2_GICR_STRUCTURE GicRedistributor[CH= IP_COUNT]; } EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE; =20 #pragma pack () diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Plat= form/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf index a4d5904f671c..8aec5e094e1a 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf @@ -34,8 +34,6 @@ [Packages] Platform/ARM/SgiPkg/SgiPlatform.dec =20 [FixedPcd] - gArmPlatformTokenSpaceGuid.PcdCoreCount - gArmPlatformTokenSpaceGuid.PcdClusterCount gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase gArmPlatformTokenSpaceGuid.PL011UartInterrupt =20 diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc b/Platform/ARM= /SgiPkg/AcpiTables/Sgi575/Madt.aslc index dedabaaecdf4..ca259247785f 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc @@ -1,7 +1,7 @@ /** @file * Multiple APIC Description Table (MADT) * -* Copyright (c) 2018, ARM Limited. All rights reserved. +* Copyright (c) 2018-2020, ARM Limited. All rights reserved. * * SPDX-License-Identifier: BSD-2-Clause-Patent * @@ -14,8 +14,9 @@ #include #include =20 -#define CORES (FixedPcdGet32 (PcdClusterCount) * \ - FixedPcdGet32 (PcdCoreCount)) +#define CLUSTER_COUNT 2 +#define CORES_PER_CLUSTER 4 +#define CORE_COUNT (CLUSTER_COUNT * CORES_PER_CLUST= ER) =20 // EFI_ACPI_6_1_GIC_STRUCTURE #define EFI_ACPI_6_1_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr, Flags, = \ @@ -90,7 +91,7 @@ =20 typedef struct { EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header; - EFI_ACPI_6_1_GIC_STRUCTURE GicInterfaces[CORE= S]; + EFI_ACPI_6_1_GIC_STRUCTURE GicInterfaces[CORE= _COUNT]; EFI_ACPI_6_1_GIC_DISTRIBUTOR_STRUCTURE GicDistributor; EFI_ACPI_6_1_GICR_STRUCTURE GicRedistributor; EFI_ACPI_6_1_GIC_ITS_STRUCTURE GicIts; diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf b/Platform= /ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf index 097ef854df42..df390c152648 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf @@ -1,7 +1,7 @@ ## @file # ACPI table data and ASL sources required to boot the platform. # -# Copyright (c) 2018, ARM Ltd. All rights reserved. +# Copyright (c) 2018-2020, ARM Ltd. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -33,8 +33,6 @@ [Packages] Platform/ARM/SgiPkg/SgiPlatform.dec =20 [FixedPcd] - gArmPlatformTokenSpaceGuid.PcdCoreCount - gArmPlatformTokenSpaceGuid.PcdClusterCount gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase gArmPlatformTokenSpaceGuid.PL011UartInterrupt =20 diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf b/Plat= form/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf index a918afef5fba..fe96f5385d57 100644 --- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf +++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf @@ -37,9 +37,6 @@ [Sources.AARCH64] AArch64/Helper.S | GCC =20 [FixedPcd] - gArmPlatformTokenSpaceGuid.PcdClusterCount - gArmPlatformTokenSpaceGuid.PcdCoreCount - gArmSgiTokenSpaceGuid.PcdDramBlock2Base gArmSgiTokenSpaceGuid.PcdDramBlock2Size gArmSgiTokenSpaceGuid.PcdGicSize diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc b/Platform/ARM/SgiPkg/SgiP= latform.dsc index 4e1fcefb1442..7b95acb9db46 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc @@ -156,10 +156,6 @@ [PcdsFixedAtBuild.common] gEmbeddedTokenSpaceGuid.PcdMetronomeTickPeriod|1000 gEmbeddedTokenSpaceGuid.PcdTimerPeriod|1000 =20 - # ARM Cores and Clusters - gArmPlatformTokenSpaceGuid.PcdCoreCount|4 - gArmPlatformTokenSpaceGuid.PcdClusterCount|2 - # Virtio Disk gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress|0x1c130000 gArmSgiTokenSpaceGuid.PcdVirtioBlkSize|0x10000 --=20 2.17.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 (#56278): https://edk2.groups.io/g/devel/message/56278 Mute This Topic: https://groups.io/mt/72538023/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-