From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.57]) by mx.groups.io with SMTP id smtpd.web09.23595.1621865665679039146 for ; Mon, 24 May 2021 07:14:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=f430HZq0; spf=pass (domain: arm.com, ip: 40.107.20.57, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jeSqLmTjB9Cz4LRsAuK1hK84RFnTWKAtMC9NyaL3RPg=; b=f430HZq0WZlzaLSs0fzr8eCvlG/s4SALwaGRYxtD5WrMlhNGt1gWTrrDB2sNK5ghn6kk1mHMI6v+cOmu/xgHjelDgMN8Izhcu1fjpVdqYDUvHXO9DLF3VrH1mmabnj8iWM3+KgN5e/GTrAQwF0UNsJqKZNvVM6XKGnQZgLf9qZg= Received: from DU2PR04CA0032.eurprd04.prod.outlook.com (2603:10a6:10:234::7) by AM9PR08MB6018.eurprd08.prod.outlook.com (2603:10a6:20b:2df::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Mon, 24 May 2021 14:14:23 +0000 Received: from DB5EUR03FT017.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:234:cafe::89) by DU2PR04CA0032.outlook.office365.com (2603:10a6:10:234::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Mon, 24 May 2021 14:14:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT017.mail.protection.outlook.com (10.152.20.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend Transport; Mon, 24 May 2021 14:14:23 +0000 Received: ("Tessian outbound 3050e7a5b95d:v92"); Mon, 24 May 2021 14:14:23 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 78f031d77c596e1d X-CR-MTA-TID: 64aa7808 Received: from 3f805963f69a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 91A4D26F-6CA6-4E30-BE06-663EC1F62C31.1; Mon, 24 May 2021 14:14:17 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 3f805963f69a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 24 May 2021 14:14:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NwpJmBXDQRs4pC/rBGg7mTbkZ+ny3zrmeZsrpuFNb3x5pDM7tZd0uX69bJYuHJU7uT1Q7fkhhW4irrwcaDmripPbT/WCvxoAfT64v/lITl72AQ2udjGyr8vEasMegtA8MyEMfsBo1nSNJfSnNqIWmeWC0gI12MSa6Ftncd337i22opb2aCQg8rODuMTd7OmyDeTr1cKy7BhEe4JtRlArfhAAGegjh+phXdIRa92+1Unmi6egy9KitRu9x0CRkU0Q5V6Q+EydeScSm8PHYvJxnsKwNafvN/BNyyrXQT9cFKgkHxmNgXVGgRnSNeqQhuZ2Wa/fTkIidjOh4uykpK7Lbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jeSqLmTjB9Cz4LRsAuK1hK84RFnTWKAtMC9NyaL3RPg=; b=cvcLdE4qWGnwSdJ51x0+STFBgm0mLrARA/p0gNR4L2aEXjRfYZjY8HdcfimLXaRFgEZ3aK1fNG0qUOOtUUErb4Sph6Q2PY1O+ThzJbifRILTSWF8Nj9+NIlx+eRhb2EV8VSWvP02ij1VTQZw3ZT13ovxEAZFLXAwxGUi0rf9Vw79uo6osv95uQI5vVrTF5pYccqoxPvIjHQv+C+u2Q94X9ezS4fmUBLKn1qc0scMf5eFy35nEioXfB+dO2Szz3XItXEGTEctiXbpBZdlksOdUc7PsbyNuUhz8qB+tiTKs8iiokL5JsxA+gGCJWcyzrbm53dutcEZ/nd1bZMXp/nrGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jeSqLmTjB9Cz4LRsAuK1hK84RFnTWKAtMC9NyaL3RPg=; b=f430HZq0WZlzaLSs0fzr8eCvlG/s4SALwaGRYxtD5WrMlhNGt1gWTrrDB2sNK5ghn6kk1mHMI6v+cOmu/xgHjelDgMN8Izhcu1fjpVdqYDUvHXO9DLF3VrH1mmabnj8iWM3+KgN5e/GTrAQwF0UNsJqKZNvVM6XKGnQZgLf9qZg= Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by AS8PR08MB6437.eurprd08.prod.outlook.com (2603:10a6:20b:33b::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Mon, 24 May 2021 14:14:16 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::80cb:878d:c8f1:2688]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::80cb:878d:c8f1:2688%7]) with mapi id 15.20.4150.027; Mon, 24 May 2021 14:14:16 +0000 Subject: Re: [edk2-platforms][PATCH V1 4/6] Platform/Sgi: ACPI CPPC support for RD-N2-Cfg1 To: Pranav Madhu , devel@edk2.groups.io Cc: Ard Biesheuvel , nd@arm.com References: <20210519082247.3003-1-pranav.madhu@arm.com> <20210519082247.3003-5-pranav.madhu@arm.com> From: "Sami Mujawar" Message-ID: Date: Mon, 24 May 2021 15:14:14 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 In-Reply-To: <20210519082247.3003-5-pranav.madhu@arm.com> X-Originating-IP: [217.140.106.52] X-ClientProxiedBy: LO2P265CA0507.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:13b::14) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.1.196.43] (217.140.106.52) by LO2P265CA0507.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:13b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.27 via Frontend Transport; Mon, 24 May 2021 14:14:15 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6340a3b7-dec2-4ebf-91fb-08d91ebe3b12 X-MS-TrafficTypeDiagnostic: AS8PR08MB6437:|AM9PR08MB6018: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:2887;OLM:2887; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: UR8dTLe/DnZ7NEUXnk7TJf/Ocrc/9KGoUvGHeO8dh7ukYroCrm5dgZCYf3RDMzgTxR75UqT8+VqiEtOZW/En2e7tOzmzeZW3jJ8rK/CmppZzPerBWWhc42PlYyJSnTzAiOJL6aa+zDL14Fku6B1dYCgDU5ux1m/THbhNasmroFp2ABJ5vBDSv1awydBGx50XA9aFWJzx2jknDO+ZbvNvDwaoUZkIk7qNv7ppPlQYOP6F4P1MR1BUYc0AZK9EUOa36Y5XN316jG03m6Z2Zpa3jahkHx7OX3oqYVnv83wiHg/GnmM+PLOp5qRapovz4UrXeOCEgPsp9Je0EXmcPQHmQ3ZH0fN81XgP+iosKEjAX8x2joTiIoRCFBwnz8EqA1hCk0TU6uKhUKNGmVem0nDL2Zq9vwW59Z0eKYMSx+ZSEskX2EPqNFH13xXop2ua26zN2l6AZFtQNoHKiY8U6vVFGgtCV4tQDVvYSpaibKTscmz2XpADP5+h3iG/l8bP1a2RIvo6r5pe8AwHT+Mc65vQwKNGIe7cLbxY2h/SuzWS7A1VH19BEtLCKhi4iCbtHReKAIUF4B5sjXxj7iF5b7neZeRVkPwC8YmkaZAawC71O3i/QfqFeOVZ787ZBGvYS9ENGX9643eZ5FtwbC/kcgaRAIG0U1GbiuPTB+hEwinu6MY6dGRSQJFDfNz/GgBPsBAjsVhMwahEBr2azQtKksiQdQo5VqclLbnWIW3Sp2nA9cw= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(346002)(39860400002)(366004)(136003)(376002)(396003)(8676002)(2616005)(52116002)(956004)(31696002)(53546011)(44832011)(83380400001)(33964004)(8936002)(26005)(86362001)(38100700002)(38350700002)(478600001)(2906002)(6486002)(5660300002)(66946007)(36756003)(66556008)(316002)(31686004)(19627235002)(186003)(16576012)(66476007)(16526019)(4326008)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?b1daYjlsVGRGcWJjTFVHYzhZbk1OdmFOWGxlTTN2bG1SZ0x5VDhOK1RJdUhu?= =?utf-8?B?MjdQUXY0SEw5NFdWQkxyelo1em54TkNaMEZxTVNqWVRPZ3MxYkJMU1BCbkl0?= =?utf-8?B?cW9BMDBCS3l2R0hCOVgvQ0xKMndkeVI2ak40NVZYelA4OHA1S0pWSEN3QmtC?= =?utf-8?B?M3IxaTBmNGJNUlFUUnR0bDVTMndlVEpSa2hEOHVpdExJVCtFU1M4aDZ5ekpt?= =?utf-8?B?blpvVXM0cWZiQ2l3bTd0a1FEbnZqd1l3TXlIWFlucVViVnJxbnlUUlhZdkRC?= =?utf-8?B?d29QUHIwNm9WbU1sY0lKMnNpcWdCNG1qLzR5SDBNVlEwMURPeXJScmJITEth?= =?utf-8?B?aFk3MGZ5Wk90SzYzMHR4VXQxeXBScXRBVTlxRUNlSmlLT1dISy9jVzFjcHg0?= =?utf-8?B?OWJUSGYydU84SUdhUmF1d0pFMzJ4QnRMcE1MS2xpVG16M29kcnlVUGU3YlJ5?= =?utf-8?B?TVlXZlJqYUZHdG5ZQ3Jla09FVHNSNTdqRTZQM0pBS3hQMlBmR0VwRWFPdTdM?= =?utf-8?B?bnJWZ0g4c1hEd1hjc20wdk5iVzY0dDNqNmRaMWRPR0JzWXRpdWRKS2Z0dTlw?= =?utf-8?B?UFB3RFhaV1pNdGFtQm5McDUxOWxwVjY4Zkx2RmZVTjVsWFlzMXhWVnJ2cm1M?= =?utf-8?B?bEo5NnI2QUJibFArVkRNbWF3bjNXdFNpanJhaHJxbEcwSEpPQ0M2ZzAvS3JG?= =?utf-8?B?MEFnTWp1eityb2pZYk9xdDZzTFhKeGVscDVrcFpyZENBT0FOQ20wYURVbmpy?= =?utf-8?B?MGRiM1dpenRibXN1T1Yzb1NCdkg0bkpsNWlJYVA2NDFYVW04c1pGRWwwUDRz?= =?utf-8?B?OWV0ZDkzQ0U3Qm9JRzF3czlxbm5XMjVUMlB3MUd2R2xmNGNZR0IzWXM2OXh3?= =?utf-8?B?ejgxaDk3Q2xMRmdER2xualpnSHpVaWpzU1V1Z0htRG1Lc3JJdkM2VkdueUZu?= =?utf-8?B?NkZ5MEFDakJqUFh0WDVXZjRLeERiQzRuRkZWbGorWUdPMFdIZGlXSlM0a1Vi?= =?utf-8?B?RjV6RHhnbkgxaUtSSjg4YXRTTDBSUmFQS1ZlTmdwV2V5QmNKUFVzcXFFaXR1?= =?utf-8?B?bXZtRDJtdkZOSDJYRmtrVU5DUGcxQ3ZjVnRiZUQ3cmdzdDF4YTlZdjk5U3Yz?= =?utf-8?B?cFk3amNBMXl1UEVtOWk2ZlI1ZjBpQjZCSkk0bXFlTDVkYUpvbjNDR0NxdStE?= =?utf-8?B?anl0M1ZHU2V2S0pySUFhVHV4UjQ5RWU1SHZlcjJTVUZCQjBnRGxiRUpYNWts?= =?utf-8?B?UWswTVVySXVxNmZBdUI5S1Z3Y0NOYzRYQWNzZkRFaE52THIxOWhmaERlejhw?= =?utf-8?B?Ym9wTTJ5eFg1cVNqV1A3YXMvblZCY3F2ZDg5WkUyUGl3b2pORGFPTFJtMFVi?= =?utf-8?B?MGsyaFpUd3gwalRwcWlxM0llZU5wRHoydkx4a2RnTDZmVG9taTNXdmtwMTdT?= =?utf-8?B?bmxkaVZoaVk0YTZRcTFIbWVXbi9SV3AzNlV0Nm9LNGd6ZWFRS2FVbVM3Vlk5?= =?utf-8?B?S1FLZTN4YXpFYkRmNFBwNEtRVmRaMTF5SFhkL3hOdXFGa1NQTnN6dzhjR1lM?= =?utf-8?B?VVRJb0NabnkwV3c3WklYMS95eXFYTU1GQWVicHFLY3VsSjZkNVBzSkFKSzFX?= =?utf-8?B?RU00TEwveTJKMlk0Sk9wNHRBa1ZvQWpIS2JTMWdXQzN4cm42aDMrV3FjWlRJ?= =?utf-8?B?U0lac0c2NVA2UlBpS3cwS3Bwb0l5aFVWUWo2UG1PNE4wNzdFdGwvMzZLRm9L?= =?utf-8?Q?NKrhrGVRMqFFWRv3EmpTM/rjEzvyTH/kK2E7VND?= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6437 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: e20d76fd-cafd-4262-1bcc-08d91ebe36b0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ImQHlxaBvMliuVuwNI1jCZ8V9x3a6ZhzTf8ZQgLdlvMnq3aY4OGHxyG3SlvEJBxYWF1iqz1WWFYwT0jtuo7jlaDx8iy006UCL+BUYvC5UAPiIZmuW1/e3m4elZUX0xad8CDV8q/ZEYCsDUi7nD2to0JbfUNKIGy2zYEES5dUJ+w7DyJ9e/Kj2TP/wb7m4f+0HwYkNxqSrY3Nh7RtP9zCY5OD54CiLltGsnibDqAWl1BZYKVEGnqfydNvSFUl+68lE10mj8I9E3i7pOqmwq39VWOj9Sf6FGBdJNASzCOYEa1T1pmtiaN719mlvSZcYgUOpgSq+029U9Thdeeqv9aGjiC1FSEj6moi7eyRRZN4IZ2bSC6yss1TWeJTtpISFUVmijjWfueJuAThvDTaQV4+bymsALaYP2NEK8UrWlJEALnuTCj8n82QctoNkwR2p0D2RCftMFRwiJypwS7lPi8lcE54p9PjLp+64UcQWJB4ikfJpv/oLW1yWz8AIp41ywfVBFNrZ40KQUenBHtCUqDYhJaRSWVrX3LTYrlcDoFBQnrOwpeaZiMxBe375+aRqqWCqeOQpN993kBugu1yngc3sJun4zMNj+kvqtOXEhqYYMELPL4p7EZk53vK6M7R9cJGpFwM9IiR/GZ05+0uEz9PFA2LjDe5Gi9qsX+4CeK8IGE3LcCJQWaUJQwdiM6RINi/ X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(39860400002)(396003)(346002)(376002)(136003)(46966006)(36840700001)(336012)(478600001)(16526019)(8676002)(26005)(8936002)(4326008)(82740400003)(19627235002)(70586007)(36756003)(70206006)(2616005)(44832011)(956004)(16576012)(5660300002)(81166007)(186003)(31696002)(53546011)(356005)(47076005)(83380400001)(36860700001)(86362001)(33964004)(31686004)(316002)(2906002)(6486002)(82310400003)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2021 14:14:23.3238 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6340a3b7-dec2-4ebf-91fb-08d91ebe3b12 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6018 Content-Type: multipart/alternative; boundary="------------89AD96C2A9F3690681CC0F4F" Content-Language: en-GB --------------89AD96C2A9F3690681CC0F4F Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi Pranav, This patch looks good to me. Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 19/05/2021 09:22 AM, Pranav Madhu wrote: > 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 > --- > 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/ARM/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) > > + 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) > } > @@ -151,6 +166,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "ARMSGI", > Name (_UID, 1) > Name (_STA, 0xF) > > + 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) > } > @@ -169,6 +193,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "ARMSGI", > Name (_UID, 2) > Name (_STA, 0xF) > > + 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) > } > @@ -187,6 +220,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "ARMSGI", > Name (_UID, 3) > Name (_STA, 0xF) > > + 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) > } > @@ -205,6 +247,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "ARMSGI", > Name (_UID, 4) > Name (_STA, 0xF) > > + 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) > } > @@ -223,6 +274,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "ARMSGI", > Name (_UID, 5) > Name (_STA, 0xF) > > + 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) > } > @@ -241,6 +301,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "ARMSGI", > Name (_UID, 6) > Name (_STA, 0xF) > > + 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) > } > @@ -259,6 +328,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "ARMSGI", > Name (_UID, 7) > Name (_STA, 0xF) > > + 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) > } --------------89AD96C2A9F3690681CC0F4F Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit

Hi Pranav,

This patch looks good to me.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar


On 19/05/2021 09:22 AM, Pranav Madhu wrote:
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 <pranav.madhu@arm.com>
---
 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/ARM/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)
 
+        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)
         }
@@ -151,6 +166,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "ARMSGI",
         Name (_UID, 1)
         Name (_STA, 0xF)
 
+        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)
         }
@@ -169,6 +193,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "ARMSGI",
         Name (_UID, 2)
         Name (_STA, 0xF)
 
+        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)
         }
@@ -187,6 +220,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "ARMSGI",
         Name (_UID, 3)
         Name (_STA, 0xF)
 
+        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)
         }
@@ -205,6 +247,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "ARMSGI",
         Name (_UID, 4)
         Name (_STA, 0xF)
 
+        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)
         }
@@ -223,6 +274,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "ARMSGI",
         Name (_UID, 5)
         Name (_STA, 0xF)
 
+        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)
         }
@@ -241,6 +301,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "ARMSGI",
         Name (_UID, 6)
         Name (_STA, 0xF)
 
+        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)
         }
@@ -259,6 +328,15 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "ARMSGI",
         Name (_UID, 7)
         Name (_STA, 0xF)
 
+        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)
         }

--------------89AD96C2A9F3690681CC0F4F--