From nobody Tue Feb 10 11:32:54 2026 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+74951+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+74951+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1620719259; cv=none; d=zohomail.com; s=zohoarc; b=R+gmQdAsJxzzMCQiG8ubjLcnx1FhqldmfHU+vSfCzqVpbYcfbO6juepphlVfX5ZbE/31hsP0szP3hjgFVS8S8MBaMY9gPSldatL2lFG8USpNwt1Ab9sMeIWuLQfue6br1991V9nbIM9bh0c775LwZSbLlyBR3tT62IAKlQuWLJE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620719259; 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=2Y0JTcxs9SHkXzwHNd3l9Xc3JDpYcUcZ5AoHSckTRWE=; b=ikObhZuAQV1xap244uY4UgURlWbg52c88pPR1hLDTZk4g4yq3ZCq3RAxqp3mig0kiDZSxf4Z8KnCs8M9/GbfxLNrOGyINE/hbw5LlSH5naIUCociJ5MqPkbfwKlF2oIWOUPUEh6cXC+nFLcABkUdw+pRc2iaTcZ/RFeqMyR817E= 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+74951+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 1620719259455152.4960388757304; Tue, 11 May 2021 00:47:39 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id M1YsYY1788612xGd9Jp19G2Z; Tue, 11 May 2021 00:47:39 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.9762.1620719253280303307 for ; Tue, 11 May 2021 00:47:33 -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 E778E1688; Tue, 11 May 2021 00:47:32 -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 BBD983F73B; Tue, 11 May 2021 00:47:31 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH V2 05/11] Platform/Sgi: Low Power Idle states for RD-V1 platform Date: Tue, 11 May 2021 13:17:08 +0530 Message-Id: <20210511074714.1894-6-pranav.madhu@arm.com> In-Reply-To: <20210511074714.1894-1-pranav.madhu@arm.com> References: <20210511074714.1894-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: eT2itMIFYxnUyIKOk8fLEcM9x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1620719259; bh=3H0+JAp1+0WjmFSJCgvZqo01d74xAxsLfsRZa65NDfU=; h=Cc:Date:From:Reply-To:Subject:To; b=RP9FrvSs7DBSjWjs0rAgorEFC0uH3LVCNdEzWG++qNm7dVoJzWUzL1lvW4ZKz1IAyvr 00oMK+soSI8GfZAG0t+3pe0okiibKDWWHmv9X5YCXUk6uy6tFm11CK7m/dH9pQj7WarDq nQ2NPXqYhnlVzY4aFCaNUGAtvMorz6MzPfc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" RD-V1 platform supports 2 LPI states, LPI1 (Standby WFI) and LPI3 (Power-down). Add idle support for RD-V1 platform. Signed-off-by: Pranav Madhu --- Platform/ARM/SgiPkg/AcpiTables/RdV1/Dsdt.asl | 128 ++++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdV1/Dsdt.asl b/Platform/ARM/Sg= iPkg/AcpiTables/RdV1/Dsdt.asl index 05e8601290e2..fe33b74e3a5b 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdV1/Dsdt.asl +++ b/Platform/ARM/SgiPkg/AcpiTables/RdV1/Dsdt.asl @@ -13,6 +13,86 @@ 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 (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) @@ -21,6 +101,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "= ARMSGI", Name (_HID, "ACPI0007") Name (_UID, 0) Name (_STA, 0xF) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 @@ -32,6 +115,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "= ARMSGI", Name (_HID, "ACPI0007") Name (_UID, 1) Name (_STA, 0xF) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 @@ -43,6 +129,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "= ARMSGI", Name (_HID, "ACPI0007") Name (_UID, 2) Name (_STA, 0xF) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 @@ -54,6 +143,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "= ARMSGI", Name (_HID, "ACPI0007") Name (_UID, 3) Name (_STA, 0xF) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 @@ -65,6 +157,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "= ARMSGI", Name (_HID, "ACPI0007") Name (_UID, 4) Name (_STA, 0xF) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 @@ -76,6 +171,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "= ARMSGI", Name (_HID, "ACPI0007") Name (_UID, 5) Name (_STA, 0xF) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 @@ -87,6 +185,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "= ARMSGI", Name (_HID, "ACPI0007") Name (_UID, 6) Name (_STA, 0xF) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 @@ -98,6 +199,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "= ARMSGI", Name (_HID, "ACPI0007") Name (_UID, 7) Name (_STA, 0xF) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 @@ -109,6 +213,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", = "ARMSGI", Name (_HID, "ACPI0007") Name (_UID, 8) Name (_STA, 0xF) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 @@ -120,6 +227,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", = "ARMSGI", Name (_HID, "ACPI0007") Name (_UID, 9) Name (_STA, 0xF) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 @@ -131,6 +241,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", = "ARMSGI", Name (_HID, "ACPI0007") Name (_UID, 10) Name (_STA, 0xF) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 @@ -142,6 +255,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", = "ARMSGI", Name (_HID, "ACPI0007") Name (_UID, 11) Name (_STA, 0xF) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 @@ -153,6 +269,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", = "ARMSGI", Name (_HID, "ACPI0007") Name (_UID, 12) Name (_STA, 0xF) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 @@ -164,6 +283,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", = "ARMSGI", Name (_HID, "ACPI0007") Name (_UID, 13) Name (_STA, 0xF) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 @@ -175,6 +297,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", = "ARMSGI", Name (_HID, "ACPI0007") Name (_UID, 14) Name (_STA, 0xF) + Method (_LPI, 0, NotSerialized) { + Return (\_SB.PLPI) + } } } =20 @@ -186,6 +311,9 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", = "ARMSGI", Name (_HID, "ACPI0007") Name (_UID, 15) 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 (#74951): https://edk2.groups.io/g/devel/message/74951 Mute This Topic: https://groups.io/mt/82741274/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-