From nobody Tue Feb 10 04:13:17 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+55819+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+55819+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1584023761; cv=none; d=zohomail.com; s=zohoarc; b=S5O5n2bfN1HV9OEZf8S1ej49ggVwDFWWGLRAi7F84i/rocddHt+U3uGhSg3VS2zsLGh8idRGTJY/xbO75C5i0zKS+wwWtB/fTaPpPrUSalPuCAJU0cYnWQs2eXDBMwvXGt9zcVKaF7jNZEdl2oj9+thOdbeUBVjjdzvK/1e098A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584023761; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=6ItniLCWJAlw0zxG4rYiFO8T0FO8+qSUBF3UiaO3joI=; b=ZcDzMUw/BEd+S3rbOAUDfkQ0jIrHecaMfQwac7O90x2jJqMDWbqoHM1AkSxEsgj95glATWlD+xPKPPNnDF5+M4nVKTPCyDvM6v0925pnDFTkLkRZdnfmrUIpgcvp8Dr6QDQ8/cqwwQFzRhTi74IgtK1WuSAnj/QmUlr30C9UIdE= 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+55819+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1584023761106525.7885377453391; Thu, 12 Mar 2020 07:36:01 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id IQ45YY1788612x0qnzNeqtTB; Thu, 12 Mar 2020 07:36:00 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.10591.1584023759386043265 for ; Thu, 12 Mar 2020 07:35:59 -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 07036FEC; Thu, 12 Mar 2020 07:35:59 -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 527143F534; Thu, 12 Mar 2020 07:35:57 -0700 (PDT) From: "Aditya Angadi" To: devel@edk2.groups.io Cc: leif@nuviainc.com, michael.d.kinney@intel.com, vijayenthiran.subramaniam@arm.com, thomas.abraham@arm.com Subject: [edk2-devel] [edk2-platforms][PATCH 4/8] Platform/ARM/SgiPkg: remove PcdCoreCount and PcdClusterCount Date: Thu, 12 Mar 2020 20:05:16 +0530 Message-Id: <20200312143520.16918-5-aditya.angadi@arm.com> In-Reply-To: <20200312143520.16918-1-aditya.angadi@arm.com> References: <20200312143520.16918-1-aditya.angadi@arm.com> 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: DNOQmZ5i9NlNWX7wOSiVEHcbx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1584023760; bh=5n4ZgcrKpUx68ur3QpjzF1P/Y9AV18FEd2Idu7aQpz4=; h=Cc:Date:From:Reply-To:Subject:To; b=FMNT02nhHuVc4L6Sru6PbozZQpKZd+D7GSIqIGMiwkUY75DUjBXFrXnmObw3u0qb3Et BQkPBZOdz3t84vbgclGiFIzqa/9gX6vKPLyurQN0VExL15/jLf8vx93jz2/VQDdOXffhg ehzyTh7bmvTwaQ7zydS4vUJ2GATgbSnHwtU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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. Signed-off-by: Aditya Angadi Reviewed-by: Thomas Abraham --- Platform/ARM/SgiPkg/AcpiTables/RdE1Edge/Madt.aslc | 7 ++++++- .../ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf | 2 -- Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Madt.aslc | 7 ++++--- .../ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf | 2 -- Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc | 12 ++++++------ .../ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf | 2 -- Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc | 9 +++++---- Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf | 4 +--- .../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 9872549285..a9540f2e03 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 b08d7c2df5..742ca9e683 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf @@ -34,8 +34,6 @@ 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 05eb78c561..d8ec0ce421 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 61b07bffcc..206479f942 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf @@ -34,8 +34,6 @@ 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 47368931e3..add9724374 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 a4d5904f67..8aec5e094e 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf @@ -34,8 +34,6 @@ 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 dedabaaecd..ca25924778 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 097ef854df..df390c1526 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 @@ 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 a918afef5f..fe96f5385d 100644 --- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf +++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf @@ -37,9 +37,6 @@ 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 4e1fcefb14..7b95acb9db 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc @@ -156,10 +156,6 @@ 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 (#55819): https://edk2.groups.io/g/devel/message/55819 Mute This Topic: https://groups.io/mt/71903346/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-