From nobody Fri May 17 00:08:36 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+75555+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+75555+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1621940295; cv=none; d=zohomail.com; s=zohoarc; b=WF93LDSPSz7BF/htZFK9Ih7lHHFsyU60bsdRH3l+AkA/GguYtmtSNdw7MZxfJDGRi314mnPN+vUAMoh43V3WIErEZOLZBxx9DAzeoL9jlZ4jCaFgIkwQ7r+l9JdLQufZ9DgWNzMdZIdo0BQRytxbbYlbQrIE4ltnDYwX06HsVRo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621940295; 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=rTYw0E/8+NumVrPu5ojolkQIAjpYalQSbpLw8lYDyMM=; b=COqM9RJhH+R93Go4D9YuJz9G6Uc8qx3aEdeXvLf3uCHD4FxxSHIh36fFmMkmCteCbiH/xBULf/BB2pv97FXzsjiu+4bzgrAPx9NTXn45JTZWKIrbBIIaRYLLi3CLTq0LYjvgaPzFNm1mUIylM6T7wElG0k8xwdAlHj/d47OM4Mc= 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+75555+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 162194029515472.77656052335055; Tue, 25 May 2021 03:58:15 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id WKRnYY1788612xK59N1Szte3; Tue, 25 May 2021 03:58:14 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.7990.1621940289301958687 for ; Tue, 25 May 2021 03:58:09 -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 D7E56101E; Tue, 25 May 2021 03:58:08 -0700 (PDT) X-Received: from usa.arm.com (a074742.blr.arm.com [10.162.16.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id AC07B3F719; Tue, 25 May 2021 03:58:07 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH V2 1/6] Platform/Sgi: Add initial support for RD-N2-Cfg1 platform Date: Tue, 25 May 2021 16:27:56 +0530 Message-Id: <20210525105801.13793-2-pranav.madhu@arm.com> In-Reply-To: <20210525105801.13793-1-pranav.madhu@arm.com> References: <20210525105801.13793-1-pranav.madhu@arm.com> 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,pranav.madhu@arm.com X-Gm-Message-State: iz9hlaRuMAvacwF54XbcFKTjx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1621940294; bh=mvzoFWDFEOZ1WscIVJI8r37wdYcTbHu9wQClrChzsSo=; h=Cc:Date:From:Reply-To:Subject:To; b=ZSJ2Mc2O8MijBoC1P4fwvs6JZcxGQVw1eUJO0VylZWQt6ByetonmmtfnmSExH6W6sRI VGBP9iVyOdOlOCi3NW710aoodTgA9mZu6BJA6ypD6J72X2YDZJQzpXux0+RWu1nVDm4E9 q5Y54BLGuiFN5zXeKiaYGVHfQdPaeMA20hE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Aditya Angadi Arm's RD-N2-Cfg1 platform is a variant of the RD-N2 platform. Compared to RD-N2 platform, RD-N2-Cfg1 has a reduced core count of eight Neoverse N2 CPUs and a smaller interconnect mesh. As part of the initial platform support for RD-N2-Cfg1 platform, add the corresponding ACPI tables, platform and flash description files. Signed-off-by: Pranav Madhu Reviewed-by: Sami Mujawar --- Platform/ARM/SgiPkg/RdN2Cfg1/RdN2Cfg1.dsc | 57 ++++++++++ Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf | 65 ++++++++++++ Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl | 110 ++++++++++++++= ++++++ Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Madt.aslc | 101 ++++++++++++++= ++++ Platform/ARM/SgiPkg/RdN2Cfg1/RdN2Cfg1.fdf.inc | 12 +++ 5 files changed, 345 insertions(+) diff --git a/Platform/ARM/SgiPkg/RdN2Cfg1/RdN2Cfg1.dsc b/Platform/ARM/SgiPk= g/RdN2Cfg1/RdN2Cfg1.dsc new file mode 100644 index 000000000000..c26f652cb9e9 --- /dev/null +++ b/Platform/ARM/SgiPkg/RdN2Cfg1/RdN2Cfg1.dsc @@ -0,0 +1,57 @@ +## @file +# Platform Description file for RD-N2-Cfg1 platform. +# +# Copyright (c) 2017 - 2020, Arm Limited. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +##########################################################################= ###### +# +# Defines Section - statements that will be processed to create a Makefile. +# +##########################################################################= ###### +[Defines] + PLATFORM_NAME =3D RdN2Cfg1 + PLATFORM_GUID =3D aca676d8-3acb-43d0-9e05-95e1ce6bf5d3 + PLATFORM_VERSION =3D 0.1 + DSC_SPECIFICATION =3D 0x0001001B + OUTPUT_DIRECTORY =3D Build/$(PLATFORM_NAME) + SUPPORTED_ARCHITECTURES =3D AARCH64 + BUILD_TARGETS =3D NOOPT|DEBUG|RELEASE + SKUID_IDENTIFIER =3D DEFAULT + FLASH_DEFINITION =3D Platform/ARM/SgiPkg/SgiPlatform.fdf + BOARD_DXE_FV_COMPONENTS =3D Platform/ARM/SgiPkg/RdN2Cfg1/RdN2Cfg1= .fdf.inc + BUILD_NUMBER =3D 1 + +# include common definitions from SgiPlatform.dsc +!include Platform/ARM/SgiPkg/SgiPlatform.dsc.inc +!include Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc + +# include common/basic libraries from MdePkg. +!include MdePkg/MdeLibs.dsc.inc + +##########################################################################= ###### +# +# Pcd Section - list of all EDK II PCD Entries defined by this Platform +# +##########################################################################= ###### + +[PcdsFixedAtBuild.common] + # GIC Base Addresses + gArmTokenSpaceGuid.PcdGicDistributorBase|0x30000000 + gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x30100000 + gArmSgiTokenSpaceGuid.PcdGicSize|0x200000 + + # ARM Cores and Clusters + gArmPlatformTokenSpaceGuid.PcdCoreCount|1 + gArmPlatformTokenSpaceGuid.PcdClusterCount|8 + +##########################################################################= ###### +# +# Components Section - list of all EDK II Modules needed by this Platform +# +##########################################################################= ###### + +[Components.common] + Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf b/Platfo= rm/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf new file mode 100644 index 000000000000..f96353087b68 --- /dev/null +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf @@ -0,0 +1,65 @@ +## @file +# ACPI table data and ASL sources required to boot the platform. +# +# Copyright (c) 2021, Arm Ltd. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001A + BASE_NAME =3D RdN2Cfg1AcpiTables + FILE_GUID =3D c712719a-0aaf-438c-9cdd-35ab4d60207d = # gArmSgiAcpiTablesGuid + MODULE_TYPE =3D USER_DEFINED + VERSION_STRING =3D 1.0 + +[Sources] + Dbg2.aslc + Fadt.aslc + Gtdt.aslc + Iort.aslc + Mcfg.aslc + RdN2Cfg1/Dsdt.asl + RdN2Cfg1/Madt.aslc + Spcr.aslc + Ssdt.asl + SsdtRos.asl + +[Packages] + ArmPkg/ArmPkg.dec + ArmPlatformPkg/ArmPlatformPkg.dec + EmbeddedPkg/EmbeddedPkg.dec + MdePkg/MdePkg.dec + Platform/ARM/SgiPkg/SgiPlatform.dec + +[FixedPcd] + gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase + gArmPlatformTokenSpaceGuid.PcdCoreCount + gArmPlatformTokenSpaceGuid.PcdClusterCount + gArmPlatformTokenSpaceGuid.PL011UartInterrupt + + gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum + gArmTokenSpaceGuid.PcdArmArchTimerIntrNum + gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum + gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum + gArmTokenSpaceGuid.PcdGicDistributorBase + gArmTokenSpaceGuid.PcdGicRedistributorsBase + gArmTokenSpaceGuid.PcdGenericWatchdogControlBase + gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase + gArmTokenSpaceGuid.PcdPciBusMin + gArmTokenSpaceGuid.PcdPciBusMax + + gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv + gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv + gArmSgiTokenSpaceGuid.PcdSmmuBase + gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress + gArmSgiTokenSpaceGuid.PcdVirtioBlkSize + gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt + gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress + gArmSgiTokenSpaceGuid.PcdVirtioNetSize + gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt + gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv + gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv + + gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl b/Platform/AR= M/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl new file mode 100644 index 000000000000..d68523bc43ed --- /dev/null +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl @@ -0,0 +1,110 @@ +/** @file +* Differentiated System Description Table (DSDT) for RD-N2-Cfg1 platform +* +* This file describes the peripheral devices, system hardware features and= the +* information about supported power events. +* +* Copyright (c) 2021, Arm Ltd. All rights reserved. +* +* SPDX-License-Identifier: BSD-2-Clause-Patent +* +* @par Specification Reference: +* - ACPI 6.3, Chapter 5, Section 5.2.11.1, Differentiated System Descrip= tion + Table (DSDT) +**/ + +#include "SgiAcpiHeader.h" +#include "SgiPlatform.h" + +DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "ARMSGI", + EFI_ACPI_ARM_OEM_REVISION) { + Scope (_SB) { + Device (CL00) { // Cluster 0 + Name (_HID, "ACPI0010") + Name (_UID, 0) + + Device (CP00) { // Neoverse N2 core 0 + Name (_HID, "ACPI0007") + Name (_UID, 0) + Name (_STA, 0xF) + } + } + + Device (CL01) { // Cluster 1 + Name (_HID, "ACPI0010") + Name (_UID, 1) + + Device (CP01) { // Neoverse N2 core 1 + Name (_HID, "ACPI0007") + Name (_UID, 1) + Name (_STA, 0xF) + } + } + + Device (CL02) { // Cluster 2 + Name (_HID, "ACPI0010") + Name (_UID, 2) + + Device (CP02) { // Neoverse N2 core 2 + Name (_HID, "ACPI0007") + Name (_UID, 2) + Name (_STA, 0xF) + } + } + + Device (CL03) { // Cluster 3 + Name (_HID, "ACPI0010") + Name (_UID, 3) + + Device (CP03) { // Neoverse N2 core 3 + Name (_HID, "ACPI0007") + Name (_UID, 3) + Name (_STA, 0xF) + } + } + + Device (CL04) { // Cluster 4 + Name (_HID, "ACPI0010") + Name (_UID, 4) + + Device (CP04) { // Neoverse N2 core 4 + Name (_HID, "ACPI0007") + Name (_UID, 4) + Name (_STA, 0xF) + } + } + + Device (CL05) { // Cluster 5 + Name (_HID, "ACPI0010") + Name (_UID, 5) + + Device (CP05) { // Neoverse N2 core 5 + Name (_HID, "ACPI0007") + Name (_UID, 5) + Name (_STA, 0xF) + } + } + + Device (CL06) { // Cluster 6 + Name (_HID, "ACPI0010") + Name (_UID, 6) + + Device (CP06) { // Neoverse N2 core 6 + Name (_HID, "ACPI0007") + Name (_UID, 6) + Name (_STA, 0xF) + } + } + + Device (CL07) { // Cluster 7 + Name (_HID, "ACPI0010") + Name (_UID, 7) + + Device (CP07) { // Neoverse N2 core 7 + Name (_HID, "ACPI0007") + Name (_UID, 7) + Name (_STA, 0xF) + } + } + } // Scope(_SB) +} diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Madt.aslc b/Platform/A= RM/SgiPkg/AcpiTables/RdN2Cfg1/Madt.aslc new file mode 100644 index 000000000000..c6bb29a25c61 --- /dev/null +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Madt.aslc @@ -0,0 +1,101 @@ +/** @file +* Multiple APIC Description Table (MADT) for RD-N2-Cfg1 platform +* +* This file lists all the processors available on the platform that the OS= PM +* can enumerate and boot. It also lists all the interrupt controllers avai= lable +* in the system. +* +* Copyright (c) 2021, Arm Ltd. All rights reserved. +* +* SPDX-License-Identifier: BSD-2-Clause-Patent +* +* @par Specification Reference: +* - ACPI 6.3, Chapter 5, Section 5.2.12, Multiple APIC Description Table +**/ + +#include +#include +#include +#include + +#include "SgiAcpiHeader.h" +#include "SgiPlatform.h" + +#define CORE_CNT (FixedPcdGet32 (PcdClusterCount) * \ + FixedPcdGet32 (PcdCoreCount)) + +// Multiple APIC Description Table +#pragma pack (1) + +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_DISTRIBUTOR_STRUCTURE GicDistributor; + EFI_ACPI_6_2_GICR_STRUCTURE GicRedistributor; + EFI_ACPI_6_2_GIC_ITS_STRUCTURE GicIts[3]; +} EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE; + +#pragma pack () + +STATIC EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE Madt =3D { + { + ARM_ACPI_HEADER ( + EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE, + EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE, + EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION + ), + // MADT specific fields + 0, // LocalApicAddress + 0 // Flags + }, + { + // Format: EFI_ACPI_6_2_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr, = Flags, + // PmuIrq, GicBase, GicVBase, + // GicHBase, GsivId, GicRBase, + // Efficiency) + // Note: The GIC Structure of the primary CPU must be the first entry + // (see note in 5.2.12.14 GICC Structure of ACPI v6.2). + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core0 + 0, 0, GET_MPID(0x0, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + 0, 0, 0, 25, 0, 0), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core1 + 0, 1, GET_MPID(0x100, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + 0, 0, 0, 25, 0, 0), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core2 + 0, 2, GET_MPID(0x200, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + 0, 0, 0, 25, 0, 0), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core3 + 0, 3, GET_MPID(0x300, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + 0, 0, 0, 25, 0, 0), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core4 + 0, 4, GET_MPID(0x400, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + 0, 0, 0, 25, 0, 0), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core5 + 0, 5, GET_MPID(0x500, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + 0, 0, 0, 25, 0, 0), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core6 + 0, 6, GET_MPID(0x600, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + 0, 0, 0, 25, 0, 0), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core7 + 0, 7, GET_MPID(0x700, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + 0, 0, 0, 25, 0, 0), + }, + // GIC Distributor Entry + EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(0, FixedPcdGet32 (PcdGicDistributorBas= e), + 0, 3), + // GIC Redistributor + EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(FixedPcdGet32 (PcdGicRedistributorsB= ase), + SIZE_16MB), + // GIC ITS + { + EFI_ACPI_6_2_GIC_ITS_INIT(0, 0x30040000), + EFI_ACPI_6_2_GIC_ITS_INIT(1, 0x30080000), + EFI_ACPI_6_2_GIC_ITS_INIT(2, 0x300C0000), + }, +}; + +// +// Reference the table being generated to prevent the optimizer from remov= ing +// the data structure from the executable +// +VOID* CONST ReferenceAcpiTable =3D &Madt; diff --git a/Platform/ARM/SgiPkg/RdN2Cfg1/RdN2Cfg1.fdf.inc b/Platform/ARM/S= giPkg/RdN2Cfg1/RdN2Cfg1.fdf.inc new file mode 100644 index 000000000000..ef0c02afb4f4 --- /dev/null +++ b/Platform/ARM/SgiPkg/RdN2Cfg1/RdN2Cfg1.fdf.inc @@ -0,0 +1,12 @@ +## @file +# Flash Description include file for RD-N2-Cfg1 platform. +# +# Copyright (c) 2021, Arm Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +# Per-platform additional content of the DXE phase firmware volume + + # ACPI support + INF RuleOverride=3DACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1Acpi= Tables.inf --=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 (#75555): https://edk2.groups.io/g/devel/message/75555 Mute This Topic: https://groups.io/mt/83073010/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 Fri May 17 00:08:36 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+75556+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+75556+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1621940291; cv=none; d=zohomail.com; s=zohoarc; b=Gwc6RGr8zHkvbqbxD493f+9BP2CwkQrhvFNswax3r6jGCXGYEIIcvsAavgyXNtG9EcSP+VI8CjmmLyhuN4X5pgMIZ23iwDo6CXGg2LZvnoW0Eksyp9yvP+KEqwJd6c/DQ6HGdAcVgkxHf6o9BlqhUMV+EvSD9tbd4RIPM8wiXXI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621940291; 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=jum9Q2KSQFVgD9+xf4u+v8f/6n3BO3rZlDtOkhngaVQ=; b=kRxlBYDJFkckSs7xwSy4N/wzOydmxlqKlIo4Zw3GGZB57QUy+/F4bzFoS2j6Xg4aUBmESRzLhp/T0d/nNILLbWtPAu5aZHychYYyhmQQ9vbdesNPtBgBqYG5IlaEwJ44oZ/xe8YuyaVGpRRSSQO1lXiY0EQymYcJqKMq388gGf0= 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+75556+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 1621940291914664.0601635408699; Tue, 25 May 2021 03:58:11 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id YAOtYY1788612xD8CX2EtPZS; Tue, 25 May 2021 03:58:11 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.8120.1621940290904463198 for ; Tue, 25 May 2021 03:58:11 -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 7A82E101E; Tue, 25 May 2021 03:58:10 -0700 (PDT) X-Received: from usa.arm.com (a074742.blr.arm.com [10.162.16.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 504C53F719; Tue, 25 May 2021 03:58:09 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH V2 2/6] Platform/Sgi: ACPI PPTT table for RD-N2-Cfg1 platform Date: Tue, 25 May 2021 16:27:57 +0530 Message-Id: <20210525105801.13793-3-pranav.madhu@arm.com> In-Reply-To: <20210525105801.13793-1-pranav.madhu@arm.com> References: <20210525105801.13793-1-pranav.madhu@arm.com> 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,pranav.madhu@arm.com X-Gm-Message-State: QpkvJaNPvRqxbt7jt1ihyjUSx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1621940291; bh=ROTdaDSGbL2hMKshwnyNz/msAqHWt6mushiFQ1oLimY=; h=Cc:Date:From:Reply-To:Subject:To; b=PNY1lJB7L1hvaVpEFA9Lj/aMS26s+LPixwheaugz0hPy6DScRgn/Jas94lntcxjEF3z UPWWKDOcPAUJibnNTRayhbUEdDLt5Tlw5xipTsk6HWkSvhEre/IsWGHDjfNiF/CmzL8tQ oICoYmXA1W/HWbpt+AKKXnZ116dhFNKxkug= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The RD-N2-Cfg1 platform includes eight single-thread CPUS. Each of the CPUs include 64KB L1 Data cache, 64KB L1 Instruction cache and 1MB L2 cache. The platform also includes a system level cache of 8MB. Add PPTT table for RD-N2-Cfg1 platform with this information. Signed-off-by: Pranav Madhu Reviewed-by: Sami Mujawar --- Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf | 1 + Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Pptt.aslc | 166 ++++++++++++++= ++++++ 2 files changed, 167 insertions(+) diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf b/Platfo= rm/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf index f96353087b68..58468096de4f 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf @@ -22,6 +22,7 @@ Mcfg.aslc RdN2Cfg1/Dsdt.asl RdN2Cfg1/Madt.aslc + RdN2Cfg1/Pptt.aslc Spcr.aslc Ssdt.asl SsdtRos.asl diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Pptt.aslc b/Platform/A= RM/SgiPkg/AcpiTables/RdN2Cfg1/Pptt.aslc new file mode 100644 index 000000000000..5890544c0b92 --- /dev/null +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Pptt.aslc @@ -0,0 +1,166 @@ +/** @file +* Processor Properties Topology Table (PPTT) for RD-N2-Cfg1 platform +* +* This file describes the topological structure of the processor block on = the +* RD-N2-Cfg1 platform in the form as defined by ACPI PPTT table. The RD-N2= -Cfg1 +* platform includes eight single-thread CPUS. Each of the CPUs include 64KB +* L1 Data cache, 64KB L1 Instruction cache and 1MB L2 cache. The platform = also +* includes system level cache of 8MB. +* +* Copyright (c) 2021, ARM Limited. All rights reserved. +* SPDX-License-Identifier: BSD-2-Clause-Patent +* +* @par Specification Reference: +* - ACPI 6.3, Chapter 5, Section 5.2.29, Processor Properties Topology T= able +**/ + +#include +#include +#include +#include + +#include "SgiAcpiHeader.h" +#include "SgiPlatform.h" + +/** Define helper macro for populating processor core information. + + @param [in] PackageId Package instance number. + @param [in] ClusterId Cluster instance number. + @param [in] CpuId CPU instance number. +**/ +#define PPTT_CORE_INIT(PackageId, ClusterId, CpuId) = \ + { = \ + /* Parameters for CPU Core */ = \ + EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR_INIT ( = \ + OFFSET_OF (RD_PPTT_CORE, DCache), /* Length */ = \ + PPTT_PROCESSOR_CORE_FLAGS, /* Flag */ = \ + OFFSET_OF (EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE, = \ + Package.Cluster[ClusterId]), /* Parent */ = \ + ((PackageId << 4) | ClusterId), /* ACPI Id */ = \ + 2 /* Num of private resource */ = \ + ), = \ + = \ + /* Offsets of the private resources */ = \ + { = \ + OFFSET_OF (EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE, = \ + Package.Cluster[ClusterId].Core[CpuId].DCache), = \ + OFFSET_OF (EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE, = \ + Package.Cluster[ClusterId].Core[CpuId].ICache) = \ + }, = \ + = \ + /* L1 data cache parameters */ = \ + EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE_INIT ( = \ + PPTT_CACHE_STRUCTURE_FLAGS, /* Flag */ = \ + OFFSET_OF (EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE, = \ + Package.Cluster[ClusterId].Core[CpuId].L2Cache), = \ + /* Next level of cache */ = \ + SIZE_64KB, /* Size */ = \ + 256, /* Num of sets */ = \ + 4, /* Associativity */ = \ + PPTT_DATA_CACHE_ATTR, /* Attributes */ = \ + 64 /* Line size */ = \ + ), = \ + = \ + /* L1 instruction cache parameters */ = \ + EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE_INIT ( = \ + PPTT_CACHE_STRUCTURE_FLAGS, /* Flag */ = \ + OFFSET_OF (EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE, = \ + Package.Cluster[ClusterId].Core[CpuId].L2Cache), = \ + /* Next level of cache */ = \ + SIZE_64KB, /* Size */ = \ + 256, /* Num of sets */ = \ + 4, /* Associativity */ = \ + PPTT_INST_CACHE_ATTR, /* Attributes */ = \ + 64 /* Line size */ = \ + ), = \ + = \ + /* L2 cache parameters */ = \ + EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE_INIT ( = \ + PPTT_CACHE_STRUCTURE_FLAGS, /* Flag */ = \ + 0, /* Next level of cache */ = \ + SIZE_1MB, /* Size */ = \ + 2048, /* Num of sets */ = \ + 8, /* Associativity */ = \ + PPTT_UNIFIED_CACHE_ATTR, /* Attributes */ = \ + 64 /* Line size */ = \ + ), = \ + } + +/** Define helper macro for populating processor container information. + + @param [in] PackageId Package instance number. + @param [in] ClusterId Cluster instance number. +**/ +#define PPTT_CLUSTER_INIT(PackageId, ClusterId) = \ + { = \ + /* Parameters for Cluster */ = \ + EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR_INIT ( = \ + OFFSET_OF (RD_PPTT_MINIMAL_CLUSTER, Core), /* Length */ = \ + PPTT_PROCESSOR_CLUSTER_FLAGS, /* Flag */ = \ + OFFSET_OF (EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE, = \ + Package), /* Parent */ = \ + ((PackageId << 4) | ClusterId), /* ACPI Id */ = \ + 0 /* Num of private resource */ = \ + ), = \ + = \ + /* Initialize child core */ = \ + { = \ + PPTT_CORE_INIT (PackageId, ClusterId, 0) = \ + } = \ + } + +#pragma pack(1) +/* + * Processor Properties Topology Table + */ +typedef struct { + EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER Header; + RD_PPTT_SLC_PACKAGE Package; +} EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE; +#pragma pack () + +STATIC EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE Pptt =3D { + { + ARM_ACPI_HEADER ( + EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SIGNATURE, + EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE, + EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_REVISION + ) + }, + + { + EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR_INIT ( + OFFSET_OF (RD_PPTT_SLC_PACKAGE, Slc), + PPTT_PROCESSOR_PACKAGE_FLAGS, 0, 0, 1), + + OFFSET_OF (EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE, + Package.Slc), + + EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE_INIT ( + PPTT_CACHE_STRUCTURE_FLAGS, /* Flag */ + 0, /* Next level of cache */ + SIZE_8MB, /* Size */ + 8192, /* Num of sets */ + 16, /* Associativity */ + PPTT_UNIFIED_CACHE_ATTR, /* Attributes */ + 64 /* Line size */ + ), + + { + PPTT_CLUSTER_INIT (0, 0), + PPTT_CLUSTER_INIT (0, 1), + PPTT_CLUSTER_INIT (0, 2), + PPTT_CLUSTER_INIT (0, 3), + PPTT_CLUSTER_INIT (0, 4), + PPTT_CLUSTER_INIT (0, 5), + PPTT_CLUSTER_INIT (0, 6), + PPTT_CLUSTER_INIT (0, 7), + } + } +}; + +/* + * Reference the table being generated to prevent the optimizer from remov= ing + * the data structure from the executable + */ +VOID* CONST ReferenceAcpiTable =3D &Pptt; --=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 (#75556): https://edk2.groups.io/g/devel/message/75556 Mute This Topic: https://groups.io/mt/83073011/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 Fri May 17 00:08:36 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+75557+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+75557+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1621940298; cv=none; d=zohomail.com; s=zohoarc; b=fH/cqh5LnbSPevgtQZNf5aTINh+VGGsYEskApSkU6BCZah6ZaFnLv6JtRIpTiLtsXCiEBwXmpUUW5qCn450hC/iZ7HDy9NPIhtpPpMEsHHIQpRJVHCaWD4R1qbl4aYZlVBqa5RWmdkSKj1h+l1xFC5UW9zxYZSDu0vnH1oY/CSg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621940298; 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=xvWihK8MRRwPorHZ/G3JU73f+pWsKx780zosL8MeIdg=; b=fEf35Gd0wfbYfc7PaK4DHA9j4MUH8PZtrXAoHqvdrmIXizWkmfEruh6HkkH6JyEVwCmJm/eaVsWW03/eNNVsb9Loj2gHhulau+UiUy06XC3KDhw+KrWRVmDWZo6iLoeps5/YTJankKoryJlnYc239eF3VOIrXeqoyEVNMBjTn28= 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+75557+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 162194029841566.23127745172451; Tue, 25 May 2021 03:58:18 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id N7Y5YY1788612xW9xcMVneVm; Tue, 25 May 2021 03:58:17 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.8012.1621940292418862693 for ; Tue, 25 May 2021 03:58:12 -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 1D129D6E; Tue, 25 May 2021 03:58:12 -0700 (PDT) X-Received: from usa.arm.com (a074742.blr.arm.com [10.162.16.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E6EE73F719; Tue, 25 May 2021 03:58:10 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH V2 3/6] Platform/Sgi: Low Power Idle states for RD-N2-Cfg1 Date: Tue, 25 May 2021 16:27:58 +0530 Message-Id: <20210525105801.13793-4-pranav.madhu@arm.com> In-Reply-To: <20210525105801.13793-1-pranav.madhu@arm.com> References: <20210525105801.13793-1-pranav.madhu@arm.com> 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,pranav.madhu@arm.com X-Gm-Message-State: 2czGMtPkL2gOR5mx11DvA3zvx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1621940297; bh=AzJqK5PWRxTHJUVDbSs0uMVmahS7TGS6LtufrhJtd1c=; h=Cc:Date:From:Reply-To:Subject:To; b=gHavE1G1ZgydxZqOKqiEp25kb4tOkitrwqDjxS17B2QCi/+bHW9i8shHhe2DEgoLfI/ qN3NVs4oMRFImTn0nRjTu5bcfBVQ7Uo5Hl8vcUgK90eiEWMfmNJutuDwlHggKXrnaaHu4 wDWwv1/Fh9E933sK07bMUx0YQE6dG2sP0rw= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" RD-N2-Cfg1 platform supports 2 LPI states, LPI1 (Standby WFI) and LPI3 (Power-down) and the cluster supports LPI2 (Power-down) state. The LPI implementation also supports combined power state for core and cluster. Signed-off-by: Pranav Madhu Reviewed-by: Sami Mujawar --- Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl | 158 ++++++++++++++++++++ 1 file changed, 158 insertions(+) diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl b/Platform/AR= M/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl index d68523bc43ed..55f51cc26aff 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl @@ -19,91 +19,249 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "ARMSGI", EFI_ACPI_ARM_OEM_REVISION) { Scope (_SB) { + /* _OSC: Operating System Capabilities */ + Method (_OSC, 4, Serialized) { + CreateDWordField (Arg3, 0x00, STS0) + CreateDWordField (Arg3, 0x04, CAP0) + + /* Platform-wide Capabilities */ + If (LEqual (Arg0, ToUUID("0811b06e-4a27-44f9-8d60-3cbbc22e7b48"))) { + /* OSC rev 1 supported, for other version, return failure */ + If (LEqual (Arg1, One)) { + And (STS0, Not (OSC_STS_MASK), STS0) + + If (And (CAP0, OSC_CAP_OS_INITIATED_LPI)) { + /* OS initiated LPI not supported */ + And (CAP0, Not (OSC_CAP_OS_INITIATED_LPI), CAP0) + Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) + } + } Else { + And (STS0, Not (OSC_STS_MASK), STS0) + Or (STS0, Or (OSC_STS_FAILURE, OSC_STS_UNRECOGNIZED_REV), STS0) + } + } Else { + And (STS0, Not (OSC_STS_MASK), STS0) + Or (STS0, Or (OSC_STS_FAILURE, OSC_STS_UNRECOGNIZED_UUID), STS0) + } + + Return (Arg3) + } + + Name (CLPI, Package () { /* LPI for Cluster, support 1 LPI state */ + 0, // Version + 0, // Level Index + 1, // Count + Package () { // Power Gating state for Cluster + 2500, // Min residency (uS) + 1150, // Wake latency (uS) + 1, // Flags + 1, // Arch Context Flags + 100, // Residency Counter Frequency + 0, // No Parent State + 0x00000020, // Integer Entry method + ResourceTemplate () { // Null Residency Counter + Register (SystemMemory, 0, 0, 0, 0) + }, + ResourceTemplate () { // Null Usage Counter + Register (SystemMemory, 0, 0, 0, 0) + }, + "LPI2-Cluster" + }, + }) + + Name (PLPI, Package () { /* LPI for Processor, support 2 LPI states */ + 0, // Version + 1, // Level Index + 2, // Count + Package () { // WFI for CPU + 1, // Min residency (uS) + 1, // Wake latency (uS) + 1, // Flags + 0, // Arch Context lost Flags (no loss) + 100, // Residency Counter Frequency + 0, // No parent state + ResourceTemplate () { // Register Entry method + Register (FFixedHW, + 32, // Bit Width + 0, // Bit Offset + 0xFFFFFFFF, // Address + 3, // Access Size + ) + }, + ResourceTemplate () { // Null Residency Counter + Register (SystemMemory, 0, 0, 0, 0) + }, + ResourceTemplate () { // Null Usage Counter + Register (SystemMemory, 0, 0, 0, 0) + }, + "LPI1-Core" + }, + Package () { // Power Gating state for CPU + 150, // Min residency (uS) + 350, // Wake latency (uS) + 1, // Flags + 1, // Arch Context lost Flags (Core context los= t) + 100, // Residency Counter Frequency + 1, // Parent node can be in any shallower state + ResourceTemplate () { // Register Entry method + Register (FFixedHW, + 32, // Bit Width + 0, // Bit Offset + 0x40000002, // Address (PwrLvl:core, StateTyp:PwrDn) + 3, // Access Size + ) + }, + ResourceTemplate () { // Null Residency Counter + Register (SystemMemory, 0, 0, 0, 0) + }, + ResourceTemplate () { // Null Usage Counter + Register (SystemMemory, 0, 0, 0, 0) + }, + "LPI3-Core" + }, + }) + Device (CL00) { // Cluster 0 Name (_HID, "ACPI0010") Name (_UID, 0) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.CLPI) + } =20 Device (CP00) { // Neoverse N2 core 0 Name (_HID, "ACPI0007") Name (_UID, 0) Name (_STA, 0xF) + + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 Device (CL01) { // Cluster 1 Name (_HID, "ACPI0010") Name (_UID, 1) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.CLPI) + } =20 Device (CP01) { // Neoverse N2 core 1 Name (_HID, "ACPI0007") Name (_UID, 1) Name (_STA, 0xF) + + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 Device (CL02) { // Cluster 2 Name (_HID, "ACPI0010") Name (_UID, 2) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.CLPI) + } =20 Device (CP02) { // Neoverse N2 core 2 Name (_HID, "ACPI0007") Name (_UID, 2) Name (_STA, 0xF) + + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 Device (CL03) { // Cluster 3 Name (_HID, "ACPI0010") Name (_UID, 3) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.CLPI) + } =20 Device (CP03) { // Neoverse N2 core 3 Name (_HID, "ACPI0007") Name (_UID, 3) Name (_STA, 0xF) + + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 Device (CL04) { // Cluster 4 Name (_HID, "ACPI0010") Name (_UID, 4) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.CLPI) + } =20 Device (CP04) { // Neoverse N2 core 4 Name (_HID, "ACPI0007") Name (_UID, 4) Name (_STA, 0xF) + + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 Device (CL05) { // Cluster 5 Name (_HID, "ACPI0010") Name (_UID, 5) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.CLPI) + } =20 Device (CP05) { // Neoverse N2 core 5 Name (_HID, "ACPI0007") Name (_UID, 5) Name (_STA, 0xF) + + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 Device (CL06) { // Cluster 6 Name (_HID, "ACPI0010") Name (_UID, 6) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.CLPI) + } =20 Device (CP06) { // Neoverse N2 core 6 Name (_HID, "ACPI0007") Name (_UID, 6) Name (_STA, 0xF) + + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 Device (CL07) { // Cluster 7 Name (_HID, "ACPI0010") Name (_UID, 7) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.CLPI) + } =20 Device (CP07) { // Neoverse N2 core 7 Name (_HID, "ACPI0007") Name (_UID, 7) Name (_STA, 0xF) + + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } } // Scope(_SB) --=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 (#75557): https://edk2.groups.io/g/devel/message/75557 Mute This Topic: https://groups.io/mt/83073012/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 Fri May 17 00:08:36 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+75558+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+75558+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1621940300; cv=none; d=zohomail.com; s=zohoarc; b=IXi/ufjfGNRtkVn2fp6ewtrndLwqS/Ydp+zhe1ABi6uf/ad09XMKw6sH8zo125q69DD2k8j2YoTccwETjb5UkX0EAlvycSbuZINElyyB7J7oY7YWtGspGxZ0ZOWoRjn9wKM0DVNkD659JI7pXVX25qwwspYPriqG8ItxPrXGSIs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621940300; 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=Q9Kuv5vIglw+ZHXBm5RbKwEvgsgB7UNPa+JaCbBjsV0=; b=KjB+3kDlNExA/1x1neMsxXD9mWhTtuqWlvVOezd9mGBytvuf1QkHeACYyJCvh/ezkg9k0N3oQE8eSTsNPjNkRQn87aXJnXdps2Bb/gaWjBCCKHYupmN6cwmBkKVjrRlrPKtPUa148HkQPcBML61IeSttE9U883oL/MB1wyxE4Ks= 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+75558+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 1621940300011408.46256963947906; Tue, 25 May 2021 03:58:20 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id aiLMYY1788612xzY4jexBeH9; Tue, 25 May 2021 03:58:19 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.7991.1621940294110686022 for ; Tue, 25 May 2021 03:58:14 -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 B3B3FD6E; Tue, 25 May 2021 03:58:13 -0700 (PDT) X-Received: from usa.arm.com (a074742.blr.arm.com [10.162.16.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 895793F719; Tue, 25 May 2021 03:58:12 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH V2 4/6] Platform/Sgi: ACPI CPPC support for RD-N2-Cfg1 Date: Tue, 25 May 2021 16:27:59 +0530 Message-Id: <20210525105801.13793-5-pranav.madhu@arm.com> In-Reply-To: <20210525105801.13793-1-pranav.madhu@arm.com> References: <20210525105801.13793-1-pranav.madhu@arm.com> 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,pranav.madhu@arm.com X-Gm-Message-State: laVfipJOUTtFdCFpqEdT0lCQx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1621940299; bh=PcK1r0XqSvqNdN9W2GlEplhN03hC8Fa4y2Ck8qkRn0w=; h=Cc:Date:From:Reply-To:Subject:To; b=Pg8Yvif2qDIWKYnyDjA6P4UfIYx8lTuvdwXDyd4NlBIjb+I+y599nx8TsjpzblDcp7s EDXv0z+IlCCIXfZNntOSpNwHHsk262Unb8JSfu//9p5JjlZxJKR1Mcb3Sn9azaK6xMUBL nELNGr5o1PD4l9LNpVt/KOMAEMsfz/xT3hM= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Enable ACPI CPPC mechanism for RD-N2-Cfg1 as defined by the ACPI specification. The implementation uses AMU registers accessible as Fixed-feature Hardware (FFixedHW) for monitoring the performance. Non-secure SCMI fastchannels are used to communicate with SCP to set the desired performance. RD-N2-Cfg1 platform does not support CPPC revision 1 and below. So update the _OSC method to let OSPM know about this fact. Signed-off-by: Pranav Madhu Reviewed-by: Sami Mujawar --- Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl | 78 ++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl b/Platform/AR= M/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl index 55f51cc26aff..411eff84334a 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl @@ -35,6 +35,12 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "= ARMSGI", And (CAP0, Not (OSC_CAP_OS_INITIATED_LPI), CAP0) Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) } + + If (And (CAP0, OSC_CAP_CPPC_SUPPORT)) { + /* CPPC revision 1 and below not supported */ + And (CAP0, Not (OSC_CAP_CPPC_SUPPORT), CAP0) + Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) + } } Else { And (STS0, Not (OSC_STS_MASK), STS0) Or (STS0, Or (OSC_STS_FAILURE, OSC_STS_UNRECOGNIZED_REV), STS0) @@ -133,6 +139,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD",= "ARMSGI", Name (_UID, 0) Name (_STA, 0xF) =20 + Name (_CPC, Package() + CPPC_PACKAGE_INIT (0x06000500, 0x06000504, 20, 160, 160, 115, 11= 5, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (0) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -151,6 +166,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD",= "ARMSGI", Name (_UID, 1) Name (_STA, 0xF) =20 + Name (_CPC, Package() + CPPC_PACKAGE_INIT (0x06000518, 0x0600051C, 20, 160, 160, 115, 11= 5, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (1) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -169,6 +193,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD",= "ARMSGI", Name (_UID, 2) Name (_STA, 0xF) =20 + Name (_CPC, Package() + CPPC_PACKAGE_INIT (0x06000530, 0x06000534, 20, 160, 160, 115, 11= 5, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (2) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -187,6 +220,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD",= "ARMSGI", Name (_UID, 3) Name (_STA, 0xF) =20 + Name (_CPC, Package() + CPPC_PACKAGE_INIT (0x06000548, 0x0600054C, 20, 160, 160, 115, 11= 5, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (3) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -205,6 +247,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD",= "ARMSGI", Name (_UID, 4) Name (_STA, 0xF) =20 + Name (_CPC, Package() + CPPC_PACKAGE_INIT (0x06000560, 0x06000564, 20, 160, 160, 115, 11= 5, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (4) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -223,6 +274,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD",= "ARMSGI", Name (_UID, 5) Name (_STA, 0xF) =20 + Name (_CPC, Package() + CPPC_PACKAGE_INIT (0x06000578, 0x0600057C, 20, 160, 160, 115, 11= 5, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (5) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -241,6 +301,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD",= "ARMSGI", Name (_UID, 6) Name (_STA, 0xF) =20 + Name (_CPC, Package() + CPPC_PACKAGE_INIT (0x06000590, 0x06000594, 20, 160, 160, 115, 11= 5, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (6) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -259,6 +328,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD",= "ARMSGI", Name (_UID, 7) Name (_STA, 0xF) =20 + Name (_CPC, Package() + CPPC_PACKAGE_INIT (0x060005A8, 0x060005AC, 20, 160, 160, 115, 11= 5, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (7) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } --=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 (#75558): https://edk2.groups.io/g/devel/message/75558 Mute This Topic: https://groups.io/mt/83073013/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 Fri May 17 00:08:36 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+75559+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+75559+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1621940301; cv=none; d=zohomail.com; s=zohoarc; b=lVP7qho2QvRT0X+BJEgbwD1fljuTY7Zk02p/As6TGBTnY3uR7ByRbjJH1VXqP1kvZugOxezYcurXatt3xzIwK0NcpJyzgRS79ERHw0ixvAGNCiCHN0SfH9zi8wjlKxR4GrnR3+u7VN+bFRgMI+l+L6sTjuaE/a9DK+nGV1zOCek= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621940301; 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=sI3RVmCxjIL6tBCgPHX+ycEenhi/2OIlRMuu6t/LqOI=; b=KjDGbN7M7NVZn7vHwiFrZ1iJ+OXmu+nuc60vMbf3W01UXsrk2BwB0z05oHF9rz1YA8O8lUWPddzaP+FSsvjq8eS7RlEa0NN2yi6gBjG74c+8AF9FVK//Nnj4HKo0oWI2jZLrBlmtPr+EKZ1X+RP/V6G7cUF+EBcpJC1Ly5I8bVM= 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+75559+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 1621940301557602.5904411199406; Tue, 25 May 2021 03:58:21 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 4lKbYY1788612xB8hk3PVmEG; Tue, 25 May 2021 03:58:21 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.8013.1621940295652916260 for ; Tue, 25 May 2021 03:58:15 -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 56964D6E; Tue, 25 May 2021 03:58:15 -0700 (PDT) X-Received: from usa.arm.com (a074742.blr.arm.com [10.162.16.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2C49E3F719; Tue, 25 May 2021 03:58:13 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH V2 5/6] Platform/Sgi: Define RD-N2-Cfg1 platform id values Date: Tue, 25 May 2021 16:28:00 +0530 Message-Id: <20210525105801.13793-6-pranav.madhu@arm.com> In-Reply-To: <20210525105801.13793-1-pranav.madhu@arm.com> References: <20210525105801.13793-1-pranav.madhu@arm.com> 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,pranav.madhu@arm.com X-Gm-Message-State: olZnRBW1Ry6NGV0NcV4tyDokx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1621940301; bh=4OlTkkRRNJqeMf/lAS/z8Jxl4CHBUBtzEirua8s3dIw=; h=Cc:Date:From:Reply-To:Subject:To; b=G8oES57GeFoawJxijZa6GhfOhWUHNIiUiQ3h5BfM8+b5HD/3rpYD+8iLk3XnKiaQCZy 78lg9ZcnHlmSpTaEca5DqUmHLWYlW+cWgq/tF2cn0FTAuO+QPwCdxutV7XxxIpvyCNfH8 nQ7y9S2yWw1V6JK6cDCM/YBgRVPQ+lYbHtc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Add the RD-N2-Cfg1 platform identification values including the part number and configuration number. This information will be used in populating the SMBIOS tables. Signed-off-by: Pranav Madhu Reviewed-by: Sami Mujawar --- Platform/ARM/SgiPkg/Include/SgiPlatform.h | 7 ++++++- Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.c | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Platform/ARM/SgiPkg/Include/SgiPlatform.h b/Platform/ARM/SgiPk= g/Include/SgiPlatform.h index 4999c9870b49..dddb58832d73 100644 --- a/Platform/ARM/SgiPkg/Include/SgiPlatform.h +++ b/Platform/ARM/SgiPkg/Include/SgiPlatform.h @@ -39,6 +39,10 @@ #define RD_V1_CONF_ID 0x1 #define RD_V1_MC_CONF_ID 0x2 =20 +// RD-N2-Cfg1 Platform Identification values +#define RD_N2_CFG1_PART_NUM 0x7B6 +#define RD_N2_CFG1_CONF_ID 0x1 + // RD-N2 Platform Identification values #define RD_N2_PART_NUM 0x7B7 #define RD_N2_CONF_ID 0x1 @@ -77,7 +81,8 @@ typedef enum { RdE1Edge, RdV1, RdV1Mc, - RdN2 + RdN2, + RdN2Cfg1 } ARM_RD_PRODUCT_ID; =20 // Arm ProductId look-up table diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.c b/Platfo= rm/ARM/SgiPkg/Library/PlatformLib/PlatformLib.c index f27c949dbc24..a982e3d403fa 100644 --- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.c +++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.c @@ -66,7 +66,13 @@ STATIC CONST SGI_PRODUCT_ID_LOOKUP SgiProductIdLookup[] = =3D { RD_N2_PART_NUM, RD_N2_CONF_ID, 0 - } + }, + { + RdN2Cfg1, + RD_N2_CFG1_PART_NUM, + RD_N2_CFG1_CONF_ID, + 0 + }, }; =20 EFI_BOOT_MODE --=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 (#75559): https://edk2.groups.io/g/devel/message/75559 Mute This Topic: https://groups.io/mt/83073014/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 Fri May 17 00:08:36 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+75560+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+75560+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1621940303; cv=none; d=zohomail.com; s=zohoarc; b=jMTxt3qiRvQQ4uE6EOMpFyA7ddLI1kGBhHqHNVKZReOelogMFBm87cesfn4xSifLUCfBTkt7nnhMPmqWOTK/6q3VWWCRHSIretKP9ikO7PWQGZlTXWe/0TWrrDsh+azB7hUr+5e8QlZJblY3jyhAIc76alyYPPdTYfP3X5/p350= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621940303; 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=f6ar7zWY0qrlRMAOHav9q7fgXGjeAqOMb96aSmFwxYc=; b=JZOBjJKv92UOgKQe2brxZtOxUhC1xN5mgQvTPPr8k8vvNhyxq5u9x8z400EF4Mxj3L1N8F7Pka0dCcXaV0fleucq6EzjBYljNEJm1V2Ht2NF8DF0tGhPIqzpXfhfAnymzhMmSLsmSJGpEtG5foGqS3nfSaYkwinwvmAmJEw9ync= 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+75560+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 1621940303273272.8428964494515; Tue, 25 May 2021 03:58:23 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id F5WyYY1788612xEMtfDj4juW; Tue, 25 May 2021 03:58:22 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.8014.1621940297305837985 for ; Tue, 25 May 2021 03:58:17 -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 ED253D6E; Tue, 25 May 2021 03:58:16 -0700 (PDT) X-Received: from usa.arm.com (a074742.blr.arm.com [10.162.16.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C2FA83F719; Tue, 25 May 2021 03:58:15 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH V2 6/6] Platform/Sgi: Extend SMBIOS support for RD-N2-Cfg1 Date: Tue, 25 May 2021 16:28:01 +0530 Message-Id: <20210525105801.13793-7-pranav.madhu@arm.com> In-Reply-To: <20210525105801.13793-1-pranav.madhu@arm.com> References: <20210525105801.13793-1-pranav.madhu@arm.com> 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,pranav.madhu@arm.com X-Gm-Message-State: HHCwpSaZfuqq0XVkheXsrXKWx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1621940302; bh=XbB9taux1ObB314X9LMIdhshacjuULp2GG+GVBWKiXM=; h=Cc:Date:From:Reply-To:Subject:To; b=OErB/nS47vE+zI3BIOwttGvIjh4lCK816+zp/bFvY6Le79NpbEyhS7OVH0sftNnuQEc Gmks727EabZ7dj/fkFAOAOqGSzm6xSG0xUNFK5fRaRm0Wig57g6MIl/fMOHBLLabe62Wq UrIxk1jSwKA1s380TyWy5doT/Xrcm95EGbo= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Extend the SMBIOS support for RD-N2-Cfg1 platform. RD-N2-Cfg1 platform is a derivative of the RD-N2 platform and so most of the table values for RD-N2 platform is reused. Signed-off-by: Pranav Madhu Reviewed-by: Sami Mujawar --- Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type1SystemInformation.c = | 7 +++++-- Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type4ProcessorInformation.c = | 7 +++++-- Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type7CacheInformation.c = | 18 ++++++++++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type1SystemInfor= mation.c b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type1SystemInforma= tion.c index 367587c07673..e8326cc6ef14 100644 --- a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type1SystemInformation.c +++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type1SystemInformation.c @@ -31,7 +31,8 @@ "RdE1Edge\0" \ "RdV1\0" \ "RdV1Mc\0" \ - "RdN2\0" + "RdN2\0" \ + "RdN2Cfg1\0" =20 typedef enum { ManufacturerName =3D 1, @@ -64,7 +65,9 @@ STATIC GUID mSmbiosUid[] =3D { /* Rd-V1Mc */ {0x1f3a0806, 0x18b5, 0x4eca, {0xad, 0xcd, 0xba, 0x9b, 0x07, 0xb1, 0x0a, = 0xcf}}, /* Rd-N2 */ - {0xf2cded73, 0x37f9, 0x4ec9, {0xd9, 0xf9, 0x89, 0x9b, 0x74, 0x91, 0x20, = 0x49}} + {0xf2cded73, 0x37f9, 0x4ec9, {0xd9, 0xf9, 0x89, 0x9b, 0x74, 0x91, 0x20, = 0x49}}, + /* Rd-N2-Cfg1 */ + {0xa4941d3d, 0xfac3, 0x4ace, {0x9a, 0x7e, 0xce, 0x26, 0x76, 0x64, 0x5e, = 0xda}}, }; =20 /* System information */ diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type4ProcessorIn= formation.c b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type4ProcessorI= nformation.c index 9ecaea3603de..b554ee6dea58 100644 --- a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type4ProcessorInformati= on.c +++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type4ProcessorInformati= on.c @@ -27,7 +27,7 @@ #define SOCKET_TYPE_BASE 3 #define SOCKET_TYPE_NUM 1 #define PROCESSOR_VERSION_BASE (SOCKET_TYPE_BASE + SOCKET_TYPE_NUM) -#define PROCESSOR_VERSION_NUM 8 +#define PROCESSOR_VERSION_NUM 9 #define SERIAL_NUMBER_BASE (PROCESSOR_VERSION_BASE + PROCESSOR_VERSIO= N_NUM) #define TYPE4_STRINGS \ "0x000\0" /* Part Number */ \ @@ -41,6 +41,7 @@ "Neoverse-V1\0" \ "Neoverse-V1\0" \ "Neoverse-N2\0" \ + "Neoverse-N2\0" \ "000-0\0" /* Serial number */ \ "783-3\0" \ "786-1\0" \ @@ -48,7 +49,8 @@ "786-2\0" \ "78A-1\0" \ "78A-2\0" \ - "7B7-1\0" + "7B7-1\0" \ + "7B6-1\0" =20 typedef enum { PartNumber =3D 1, @@ -173,6 +175,7 @@ InstallType4ProcessorInformation ( mArmRdSmbiosType4.Base.ThreadCount =3D CoreCount; break; case RdN2: + case RdN2Cfg1: mArmRdSmbiosType4.Base.CoreCount =3D CoreCount; mArmRdSmbiosType4.Base.EnabledCoreCount =3D CoreCount; mArmRdSmbiosType4.Base.ThreadCount =3D CoreCount; diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type7CacheInform= ation.c b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type7CacheInformati= on.c index 6be62900bd71..aec7c1b585fc 100644 --- a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type7CacheInformation.c +++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type7CacheInformation.c @@ -315,6 +315,24 @@ InstallType7CacheInformation ( mArmRdSmbiosType7[4].Base.InstalledSize2 =3D 32768; // 32MB SLC mArmRdSmbiosType7[4].Base.Associativity =3D CacheAssociativity16Way; break; + case RdN2Cfg1: + /* L1 instruction cache */ + mArmRdSmbiosType7[0].Base.MaximumCacheSize2 =3D 64; // 64KB + mArmRdSmbiosType7[0].Base.InstalledSize2 =3D 64; // 64KB + mArmRdSmbiosType7[0].Base.Associativity =3D CacheAssociativity4Way; + /* L1 data cache */ + mArmRdSmbiosType7[1].Base.MaximumCacheSize2 =3D 64; // 64KB + mArmRdSmbiosType7[1].Base.InstalledSize2 =3D 64; // 64KB + mArmRdSmbiosType7[1].Base.Associativity =3D CacheAssociativity4Way; + /* L2 cache */ + mArmRdSmbiosType7[2].Base.MaximumCacheSize2 =3D 1024; // 1MB + mArmRdSmbiosType7[2].Base.InstalledSize2 =3D 1024; // 1MB + mArmRdSmbiosType7[2].Base.Associativity =3D CacheAssociativity8Way; + /* System level cache */ + mArmRdSmbiosType7[4].Base.MaximumCacheSize2 =3D 8192; // 8MB SLC + mArmRdSmbiosType7[4].Base.InstalledSize2 =3D 8192; // 8MB SLC + mArmRdSmbiosType7[4].Base.Associativity =3D CacheAssociativity16Way; + break; } =20 /* Install valid cache information tables */ --=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 (#75560): https://edk2.groups.io/g/devel/message/75560 Mute This Topic: https://groups.io/mt/83073015/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-