From nobody Fri Sep 20 22:16:14 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+75362+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+75362+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1621412577; cv=none; d=zohomail.com; s=zohoarc; b=OLLU1O3xBYykSqieJUjkyuj95vem9FOsDjewWMtyPP0NdMaQanW/5pvdSRjdUkl4B/E+0lgd+IoD8V04RKzeSUgZimi6H2HJM5/1wjkDfbza393r1Gtb+dqsIJjsbFO+BZ+AHQCfO8tTqsnNMaabfzSPkxMqTV43Vluf6yT/fBc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621412577; 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=kfdi1DwrrtoGevCcowA7AbZKhf2BwOPKkFMVUrvCGoE=; b=ZxKUW/0JheqqgzJQvaZT0Wk3BiFBl8V+zNMmdLpJN+GGO4PVN7kn+fwFnyipHiR8TYSnabDGxbRzaNGaVdAXZMhtlXYRccNpfWEJ9qUuoJnDMm4vPXr4M9fmVudtBzNaDrJICL6x79Nq8JYk1cNk8azudoxdQvd7Fp4m/aJoGBc= 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+75362+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 16214125774021004.0927211142075; Wed, 19 May 2021 01:22:57 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id srHrYY1788612x0EYlg0pwJC; Wed, 19 May 2021 01:22:56 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.8639.1621412576247033317 for ; Wed, 19 May 2021 01:22:56 -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 194A811B3; Wed, 19 May 2021 01:22:55 -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 E26CD3F73D; Wed, 19 May 2021 01:22:53 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH V1 1/6] Platform/Sgi: Add initial support for RD-N2-Cfg1 platform Date: Wed, 19 May 2021 13:52:42 +0530 Message-Id: <20210519082247.3003-2-pranav.madhu@arm.com> In-Reply-To: <20210519082247.3003-1-pranav.madhu@arm.com> References: <20210519082247.3003-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: cSoRFodvZinffFd3MTZ8gKgSx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1621412576; bh=GwW9ILlWSLOodnVFGAAS4TVrXFHgfngHdjh1v3Ra38Q=; h=Cc:Date:From:Reply-To:Subject:To; b=hxkABVfDKGmgPgbgpoPC5Lc/+JDKAeTmgwMnHV/V4JbZylKqZETwRvqUP3IjD6T7Q1u RJppstRomjvaDMPJtZkYKaBmjEdmQjqtWA966CEKOok7gJ8hdDHbfWXHw1ulvKUhQNAv8 Ohg9CK3c9+Qh/puULxhMCMDGleH7n32Vdeg= 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: Thomas Abraham --- Platform/ARM/SgiPkg/RdN2Cfg1/RdN2Cfg1.dsc | 57 ++++++++++ Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf | 68 ++++++++++++ Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl | 110 ++++++++++++++= ++++++ Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Madt.aslc | 109 ++++++++++++++= +++++ Platform/ARM/SgiPkg/RdN2Cfg1/RdN2Cfg1.fdf.inc | 12 +++ 5 files changed, 356 insertions(+) diff --git a/Platform/ARM/SgiPkg/RdN2Cfg1/RdN2Cfg1.dsc b/Platform/ARM/SgiPk= g/RdN2Cfg1/RdN2Cfg1.dsc new file mode 100644 index 000000000000..0bd149bf56ab --- /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|ARM + 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..8c8ce462c9d3 --- /dev/null +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf @@ -0,0 +1,68 @@ +## @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.PcdGpioController0BaseAddress + gArmSgiTokenSpaceGuid.PcdGpioController0Size + gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt + 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..e28f6e41d10d --- /dev/null +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Madt.aslc @@ -0,0 +1,109 @@ +/** @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, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core1 + 0, 1, GET_MPID(0x100, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core2 + 0, 2, GET_MPID(0x200, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core3 + 0, 3, GET_MPID(0x300, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core4 + 0, 4, GET_MPID(0x400, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core5 + 0, 5, GET_MPID(0x500, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core6 + 0, 6, GET_MPID(0x600, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core7 + 0, 7, GET_MPID(0x700, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + }, + // 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 (#75362): https://edk2.groups.io/g/devel/message/75362 Mute This Topic: https://groups.io/mt/82931740/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 Sep 20 22:16:14 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+75364+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+75364+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1621412578; cv=none; d=zohomail.com; s=zohoarc; b=Uz1fkclBHMH+5frvZEESxLfyl0Vz9XVf1EoMxvRKbQ3/bWSjHcMRk8E7PwbHai4MguMwXIjF1f3UIoQiAo862SWl6Z9uLZxcGzNamR+I42XAczjyzqUbx2RwRr0AgTe6Uh6QotiWEq2O96089pbZwReRqwUt6rz41pX0g0SNMpg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621412578; 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=s8xpoAurDl+AyYp3STxB7pL2cd61IX10YrMVvZ1bdec=; b=oEgFWgSSrhTKty/joweLXxkNNiOhpmsqgCNrU9gvwpQk6T0Gwtwz0DeFAWFi+R7/GpTvldzkExzTHZFPGpb+mlJ49UIcLpYpOZwz9YR0Odfi7mVvmidA3TA6dpqOXL6XrqRfZ+sswRFXYUvENJOxNpu/S8ipJTxE+Hr/EowTpcA= 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+75364+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 162141257834222.292565979324195; Wed, 19 May 2021 01:22:58 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id S3m7YY1788612xOmzZFGWSNX; Wed, 19 May 2021 01:22:57 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.8647.1621412577039820556 for ; Wed, 19 May 2021 01:22:57 -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 B2E7BED1; Wed, 19 May 2021 01:22:56 -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 872FC3F73D; Wed, 19 May 2021 01:22:55 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH V1 2/6] Platform/Sgi: ACPI PPTT table for RD-N2-Cfg1 platform Date: Wed, 19 May 2021 13:52:43 +0530 Message-Id: <20210519082247.3003-3-pranav.madhu@arm.com> In-Reply-To: <20210519082247.3003-1-pranav.madhu@arm.com> References: <20210519082247.3003-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: QthUwzcllSZnqC9dTgJ9J9gVx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1621412577; bh=JD053P4TzmLXJBGxY/DKfk80ldMgkbM1LjWuY+5NsT8=; h=Cc:Date:From:Reply-To:Subject:To; b=BkVefYQPFLc1Hw15a4nQZeB47xRSIlbCYwrcOuncf/spwZYjvQM6jyY5m3fx0NDl9UP UWvTXkQSK06sB/5MjFAWl6lIYSpeGaDRhXs4uRzK4tgPdNKPIUzrLy9Th6+4LPjzRoK/D wnnwRBk5lG1Dnu8CCAALR/r4qVigtXbvVJQ= 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 Reviewed-by: Thomas Abraham --- 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 8c8ce462c9d3..59e9dfceec76 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 (#75364): https://edk2.groups.io/g/devel/message/75364 Mute This Topic: https://groups.io/mt/82931742/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 Sep 20 22:16:14 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+75365+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+75365+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1621412579; cv=none; d=zohomail.com; s=zohoarc; b=AUp65fvb9wVG9QWcRXb7EMVQtLxZaSJJPmf25V9mUQFd5y5JZLstCp+LjqNrpqREVEdVb0TCTx8Akl+1Tfn+hRd2EBPqBUiXjSW+8ikwAlMhanrLhR47E0hlzeMtPjeZsICWFOwv2XOejVY8gZwmd00y1RjOueIBH8VKNYJPaRo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621412579; 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=/uA+D8/0sbqlOiCM+Z7/3dYfg0je/jChIR0LI6XN81c=; b=lfbOmv24d7wjHwU2N9HZY85XGYwiIKoUjBVtEF2zhY6+FU64U5e3FwjvhHBxNM+Zci/ty8Il2sTl71N+vlYkLraBCPAGDkXDvQYMGh14GTHqrL9TxN1oV/D9xaLCUldGOSuo/vyth8PZRb81sObAQryrKOTJ3xuv5CThG8iRIPs= 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+75365+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 1621412579859579.0746775739835; Wed, 19 May 2021 01:22:59 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id HjoFYY1788612x5fXFaLZ625; Wed, 19 May 2021 01:22:59 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.8640.1621412578733105293 for ; Wed, 19 May 2021 01:22:58 -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 566F5ED1; Wed, 19 May 2021 01:22:58 -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 2C0B53F73D; Wed, 19 May 2021 01:22:56 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH V1 3/6] Platform/Sgi: Low Power Idle states for RD-N2-Cfg1 Date: Wed, 19 May 2021 13:52:44 +0530 Message-Id: <20210519082247.3003-4-pranav.madhu@arm.com> In-Reply-To: <20210519082247.3003-1-pranav.madhu@arm.com> References: <20210519082247.3003-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: 06G2MqMS1pP2U1gEOoMNA2srx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1621412579; bh=sCzGvshUaEA/vsyT97dzMzUPiMguhzg91Q/lbHkGF0E=; h=Cc:Date:From:Reply-To:Subject:To; b=qBt1CGrKGsPEuk4Ab25WodZZofJY4b0cuUtI63xHigDwWi/qe9m5RsSkpkKTyF/ljkd ef07ZiDKRKG576zP7vs56jhwwt2GlcAIRYcELS4L28sm+2VP3dvBukmj23kdLYMo7jllL WfI5K4hZd0KeqMqB6Eb4gLiXjGUXlYmXYhg= 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 Reviewed-by: Thomas Abraham --- 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 (#75365): https://edk2.groups.io/g/devel/message/75365 Mute This Topic: https://groups.io/mt/82931743/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 Sep 20 22:16:14 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+75366+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+75366+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1621412586; cv=none; d=zohomail.com; s=zohoarc; b=XKfs0HMUGtYDLBlvdKoC/X/KBhtDGEj5ySH0UOVNAgxzPKFh7t0PHZ+xWZrKBCDgL7pF2DePWj1MZt/2si9lB80i62H14xtfc1YRa3UHu/xg/a6hnA7tWmM2nkhQb9UQSSuA8U8LzkGMYMORyY48wDX3k2REbroFT024KH2mXtg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621412586; 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=xtCMyNUBSGcl7nDk/ZFfNH2S0iIPoHQxMkrHoExXmfQ=; b=elQ7AkrQjbWtUDg2US6JRObrxnM3LcVYY90hbBl3CN9fttsUafz8lsbUTzQVv8WW5TNCCO/d+BUBXPlFl5yyjePLujN4QCPanibLqxujLq1MKCFqJB3FC2CJX4KSHJ0S8EJoTyEpzzwbJLcKQeaUI4VHiDCKFCE+hMQYOTZbXGs= 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+75366+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 1621412586531975.8532060748215; Wed, 19 May 2021 01:23:06 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id wtEzYY1788612xyh2cRnvGNp; Wed, 19 May 2021 01:23:06 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.8657.1621412580351039508 for ; Wed, 19 May 2021 01:23:00 -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 EDC1E11B3; Wed, 19 May 2021 01:22:59 -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 C35B23F73D; Wed, 19 May 2021 01:22:58 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH V1 4/6] Platform/Sgi: ACPI CPPC support for RD-N2-Cfg1 Date: Wed, 19 May 2021 13:52:45 +0530 Message-Id: <20210519082247.3003-5-pranav.madhu@arm.com> In-Reply-To: <20210519082247.3003-1-pranav.madhu@arm.com> References: <20210519082247.3003-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: ciisfLS9ovobX28OhJ3iyzCCx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1621412586; bh=yF/M3rc3d8Ir5ek/d1rC3zKF6jIZDmbApcMsOJrg6TQ=; h=Cc:Date:From:Reply-To:Subject:To; b=qQCVRsaorUCJKIPgwVgJzis8zdmaxrC7k9exYGT0tImbAT8FEWyFl7/5x3exM6ByKVB qYyGE2mWGebM0i+vCgAjUTCWgy7QiZqvAeAKkOFohfmsURHzhj2HUBjz/HPgoEKDnwh/I 0oQvlISJJH5RQjmCjQaL/zoJEkn2+AzpbYk= 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 Reviewed-by: Thomas Abraham --- 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 (#75366): https://edk2.groups.io/g/devel/message/75366 Mute This Topic: https://groups.io/mt/82931745/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 Sep 20 22:16:14 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+75367+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+75367+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1621412587; cv=none; d=zohomail.com; s=zohoarc; b=AfD7SdreuFN9I1URQXmVjRUWrMLT6hEbu7ynnvCLCNZcczrN22HyBYmY099en45Nh+trPzwuTKYugeOhsBdiS18d3J2m5bKyBU8m/WwcA9iOIMpNBOZ35pzKfgL62BMkbvKjfpwfgJszXFdwFAmzQfkfgJ99NtTY02o7wqtQAlM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621412587; 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=IETEJjYV3a/OMdhkzsq+zqETnlTFyOHt6SYf/bkBrno=; b=jk+YxFYD/A1Yna5E0b7yGUO4z0iSCcex/8fl8qAi56jSo6I3+zu0CJENh4+BYqF4XIj4r7J6SfjhHMzmQFHZvEcUplry3kfRQlLY/KWO6VhxRkPBp1KsymcL5qky8MjK/x214oovcv7eA1XPwnXPKrNjxv9PY419/I9RuSJvhYU= 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+75367+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 162141258786478.21400478526652; Wed, 19 May 2021 01:23:07 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Hs4iYY1788612xDuepKVoWHH; Wed, 19 May 2021 01:23:07 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.8679.1621412581926256703 for ; Wed, 19 May 2021 01:23:02 -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 9058CED1; Wed, 19 May 2021 01:23:01 -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 65ECA3F73D; Wed, 19 May 2021 01:23:00 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH V1 5/6] Platform/Sgi: Define RD-N2-Cfg1 platform id values Date: Wed, 19 May 2021 13:52:46 +0530 Message-Id: <20210519082247.3003-6-pranav.madhu@arm.com> In-Reply-To: <20210519082247.3003-1-pranav.madhu@arm.com> References: <20210519082247.3003-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: HKGwOJo8i5OFWlGXYIX4bXEdx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1621412587; bh=KUn2AIg4yZtfXBKZRq4OOvHAFhRYfJ29g0zZJ9SAmc0=; h=Cc:Date:From:Reply-To:Subject:To; b=VR5eWsfAXhM97B4z6coT4BDZxr+6N1VCOnEJ9L7qYscgX05Ppqmpb1cln28HWxXeWNM hYlwc82YOTBoZv6YB3gK++5XjwYGW373tc68/bls/jXQbpAEbq7UPbZFae3Yc7XEtzLiU rYd2CliVanrV0+EP/3yePTYuHZeRAlkYL58= 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 Reviewed-by: Thomas Abraham --- 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 (#75367): https://edk2.groups.io/g/devel/message/75367 Mute This Topic: https://groups.io/mt/82931746/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 Sep 20 22:16:14 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+75368+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+75368+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1621412584; cv=none; d=zohomail.com; s=zohoarc; b=K/XBCsCR3ptAiGx9Xsp9ckKO/hYx90YDiHvq3E6+4W7KyIh/pLsMHkt3MBgOY+9eLNgDX1Jvh9iJeP4NJo0nJ6DPQeZof9p6VdgHse6EJSVuTAHX5m9SV2pVuOPrc3up1BQFgRTGPlCYi5AYA/qipySfAVczaNsM3pT1U460HRk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621412584; 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=9mBtetGD1tCUPffkjnnqTx5Pq86G7m5ES0ZXO7ICxJQ=; b=XxEgKoOJ6e0Z+g4zdXIBlTgjmaHJiXstpr7nm4LqGHMYryiRbPtl4te2hCNpkSlmntnycsRGG3WGX7qWCbU8H9pAbQ5XnUNv8Hu4VuXwS9AKDZXw6KSZGfCYu0hwIIVdC+QmxshmrVdFSHhua7066AbsxbLdbspaJUmqv1NEFn4= 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+75368+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 1621412584703713.3246644555225; Wed, 19 May 2021 01:23:04 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id bkOEYY1788612x9T6P6qcvHF; Wed, 19 May 2021 01:23:04 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.8651.1621412583583691048 for ; Wed, 19 May 2021 01:23:03 -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 33A9BED1; Wed, 19 May 2021 01:23:03 -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 08F853F73D; Wed, 19 May 2021 01:23:01 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH V1 6/6] Platform/Sgi: Extend SMBIOS support for RD-N2-Cfg1 Date: Wed, 19 May 2021 13:52:47 +0530 Message-Id: <20210519082247.3003-7-pranav.madhu@arm.com> In-Reply-To: <20210519082247.3003-1-pranav.madhu@arm.com> References: <20210519082247.3003-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: 3Ju4es3FGim0LQjShn5Ut2YUx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1621412584; bh=PIf11bfkUdlFegXkWncVrhbEiZ3kfvX40u1O7bPThyA=; h=Cc:Date:From:Reply-To:Subject:To; b=mExx2iadhmD2lgdenCRhqiW9093x+hx2q9zJTzg6cJg2idMYWSJzCSiu4Fc0Sk7Is20 H6tp1ULWzPWqp+lAxNtqIgFdhbK/IGi7fjD/G5zridL7UV2GYD9iBDoPitC1AL+k+EqP2 OMHrkKlIhfAC5oeu04DcPE7PXegSyGHXkTM= 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 Reviewed-by: Thomas Abraham --- 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 (#75368): https://edk2.groups.io/g/devel/message/75368 Mute This Topic: https://groups.io/mt/82931747/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-