From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.9659.1620719263043410050 for ; Tue, 11 May 2021 00:47:43 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pranav.madhu@arm.com) 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 AC36A1688; Tue, 11 May 2021 00:47:42 -0700 (PDT) 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 802813F73B; Tue, 11 May 2021 00:47:41 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-platforms][PATCH V2 11/11] Platform/Sgi: ACPI CPPC support for RD-N2 Date: Tue, 11 May 2021 13:17:14 +0530 Message-Id: <20210511074714.1894-12-pranav.madhu@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210511074714.1894-1-pranav.madhu@arm.com> References: <20210511074714.1894-1-pranav.madhu@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Enable ACPI CPPC mechanism for RD-N2 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 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 --- Platform/ARM/SgiPkg/AcpiTables/RdN2/Dsdt.asl | 150 ++++++++++++++++++++ 1 file changed, 150 insertions(+) diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2/Dsdt.asl b/Platform/ARM/= SgiPkg/AcpiTables/RdN2/Dsdt.asl index 125b20b64cee..a318ef48ded9 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2/Dsdt.asl +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2/Dsdt.asl @@ -29,6 +29,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= ) @@ -127,6 +133,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, = 115, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (0) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -145,6 +160,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, = 115, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (1) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -163,6 +187,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, = 115, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (2) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -181,6 +214,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, = 115, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (3) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -199,6 +241,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, = 115, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (4) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -217,6 +268,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, = 115, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (5) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -235,6 +295,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, = 115, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (6) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -253,6 +322,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, = 115, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (7) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -271,6 +349,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD= ", "ARMSGI", Name (_UID, 8) Name (_STA, 0xF) =20 + Name (_CPC, Package() + CPPC_PACKAGE_INIT (0x060005C0, 0x060005C4, 20, 160, 160, 115, = 115, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (8) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -289,6 +376,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD= ", "ARMSGI", Name (_UID, 9) Name (_STA, 0xF) =20 + Name (_CPC, Package() + CPPC_PACKAGE_INIT (0x060005D8, 0x060005DC, 20, 160, 160, 115, = 115, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (9) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -307,6 +403,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD= ", "ARMSGI", Name (_UID, 10) Name (_STA, 0xF) =20 + Name (_CPC, Package() + CPPC_PACKAGE_INIT (0x060005F0, 0x060005F4, 20, 160, 160, 115, = 115, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (10) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -325,6 +430,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD= ", "ARMSGI", Name (_UID, 11) Name (_STA, 0xF) =20 + Name (_CPC, Package() + CPPC_PACKAGE_INIT (0x06000608, 0x0600060C, 20, 160, 160, 115, = 115, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (11) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -343,6 +457,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD= ", "ARMSGI", Name (_UID, 12) Name (_STA, 0xF) =20 + Name (_CPC, Package() + CPPC_PACKAGE_INIT (0x06000620, 0x06000624, 20, 160, 160, 115, = 115, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (12) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -361,6 +484,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD= ", "ARMSGI", Name (_UID, 13) Name (_STA, 0xF) =20 + Name (_CPC, Package() + CPPC_PACKAGE_INIT (0x06000638, 0x0600063C, 20, 160, 160, 115, = 115, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (13) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -379,6 +511,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD= ", "ARMSGI", Name (_UID, 14) Name (_STA, 0xF) =20 + Name (_CPC, Package() + CPPC_PACKAGE_INIT (0x06000650, 0x06000654, 20, 160, 160, 115, = 115, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (14) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } @@ -397,6 +538,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD= ", "ARMSGI", Name (_UID, 15) Name (_STA, 0xF) =20 + Name (_CPC, Package() + CPPC_PACKAGE_INIT (0x06000668, 0x0600066C, 20, 160, 160, 115, = 115, 5) + ) + + Name (_PSD, Package () { + Package () + PSD_INIT (15) + }) + Method (_LPI, 0, NotSerialized) { Return (\_SB.PLPI) } --=20 2.17.1