From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.77]) by mx.groups.io with SMTP id smtpd.web09.27077.1658150719117114824 for ; Mon, 18 Jul 2022 06:25:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=MrW/nunV; spf=pass (domain: arm.com, ip: 40.107.7.77, mailfrom: sami.mujawar@arm.com) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Fhi0CmnN8X2m/E/LN/L7/It4yuyfSban4G3pazWZ0nviRuwOG1zDfdp36IxqgK8vmzUiV9XhhCoxem2JQRH2qEk32hFlzfQ6TXrk83oSzhFhF11lMVmBznFg3GX5Ook9KE8CD0c445GYwVW5uFcYQN58+3vCfd+zPlk/DJAxyNWw4V6h6MPMQeC4dtqRBhKUP54zHAFlaP3yoN3A2mD0YZAIz0OUKpMRqthsgu/6h8Gqa7RbDgXa0L2Hm4g7mvsXs542vKkwqz5EpMgcIhdtWACm0EaCCzL1hv6hcerfWGQPSjQUsUCXwSPn+DOpJbNJ8L9Wp6YExKDk8t0Stz3KzA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Bl4Kma/SMlBPMRnfQkwimuFeAw8wy9fB/PXar7BXDfQ=; b=VqV5x+lfZyIE+D5f+fwZm9q5LspvThhS4aNIQ774l8YKHzcQ1PHCEzFDUHV29ChLHgWB13APga2QGuHTF+OpmnmSCmre2eIIHHBEeEgXgSl/AsZQzCbEjgjTpkr2LkKDwqFRnkRXlOAbHWA8KxPgvpDYH0wrRjqanJUN3xAvI1+4ZDxo8wdLurCW5M3AjL40oBGAPx0BEf45h83qB1jNKesJtCLrgpoVAYwchH4bcDibnlfr13AH0EKMKfDAcgGxrkkVZRYz3AhwFGDcs4GpLXn9XiOG/qqPMJdu+kCFCs00A4o7Lp05iwMI28sOe0azPHBBaOMTp/x0M1htSnkvVg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=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=Bl4Kma/SMlBPMRnfQkwimuFeAw8wy9fB/PXar7BXDfQ=; b=MrW/nunVU7GUlKxoelzO+Ggs/jL6Kjm2CQvsuwePXQ4BmHlScfWDVrMGi/YWVAu1R2rCPdI9FK//TPtQNqy6bktlZpNfU8a+Mmv/WKFTb8BKI3sRraSs88jVeLFU0brz9h39DMdm0tBMr8l/X7j03Pjh1ZKzmnB7FLuE/ynRRIk= Received: from AS9P251CA0018.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:50f::16) by DBBPR08MB6236.eurprd08.prod.outlook.com (2603:10a6:10:20c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.12; Mon, 18 Jul 2022 13:25:15 +0000 Received: from AM5EUR03FT005.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:50f:cafe::be) by AS9P251CA0018.outlook.office365.com (2603:10a6:20b:50f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.23 via Frontend Transport; Mon, 18 Jul 2022 13:25:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;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; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT005.mail.protection.outlook.com (10.152.16.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.12 via Frontend Transport; Mon, 18 Jul 2022 13:25:14 +0000 Received: ("Tessian outbound fa99bf31ee7d:v123"); Mon, 18 Jul 2022 13:25:14 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4da77884ba058a45 X-CR-MTA-TID: 64aa7808 Received: from 8139710d10be.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F6928FE7-D289-4EB9-844D-69BF398E20EE.1; Mon, 18 Jul 2022 13:25:07 +0000 Received: from EUR02-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 8139710d10be.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 18 Jul 2022 13:25:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QyUk40lnBRwg2hyTz3ImhcAM8sAnKr/sd2B/jjhYmuOZsrrXsiRHG/mMmMk+5frOJ/BH6zqOaRpoCFSHaVHxL8NuiW+VFWJSwIIJkRewYmKUoffm3J0jQN/l5KRzXgLi+/7UQKpqTsNm90MGa39WFf9rDU2UoNEFOS4Nv7g+zNzhL6OQMWE2VJVDB+pqxUqd/otRJqGC6ZXum3xFv6B2uFmW+SJLgVuC3h0e0U3s8Pfvs7Ou0mMKMCRA/KZdCb8NpNZ0mf64KW67xJ4BUlJP4bE0VvhH49U/eypGZJ1hcjj4zzBIKTIa6e+di1/g4hpDKIFAmFwNNYJxZ4k3NuACRQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Bl4Kma/SMlBPMRnfQkwimuFeAw8wy9fB/PXar7BXDfQ=; b=MuLbuUcrtZbjCssDSbSQC3PZGsrHPU+Ov9MT7V3god0FrGXqe/Zg/z5u9K1R6KcawFF+3NkwPPNBpGLdpSMjyE0ix5bnQm/NOC6QP1nJD0WIbSNWxPaizyBlqlZiNc1VuafEoUOFJk/a8IcCV+TjBltix2bfr1IAMyfF7lVuPxNQdVzYKgOOmMgxmZchiTh3jPobg6xLMzV6PuLG8WyXp9yHLWM50oMIZopOkybLl4pvcQqJdz3b4mMX/6VY2I6wXEDES3yuXRQr4BYqm66EUrO9NU3Ii6V/7CpGixblXN/YlPuSsv95oGAP9QXhE1/nrUMWcDG/7JwGFdrba8j6UA== 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=Bl4Kma/SMlBPMRnfQkwimuFeAw8wy9fB/PXar7BXDfQ=; b=MrW/nunVU7GUlKxoelzO+Ggs/jL6Kjm2CQvsuwePXQ4BmHlScfWDVrMGi/YWVAu1R2rCPdI9FK//TPtQNqy6bktlZpNfU8a+Mmv/WKFTb8BKI3sRraSs88jVeLFU0brz9h39DMdm0tBMr8l/X7j03Pjh1ZKzmnB7FLuE/ynRRIk= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by DU0PR08MB7690.eurprd08.prod.outlook.com (2603:10a6:10:3a6::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.23; Mon, 18 Jul 2022 13:25:05 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::d562:5a52:f638:7fe9]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::d562:5a52:f638:7fe9%5]) with mapi id 15.20.5438.023; Mon, 18 Jul 2022 13:25:05 +0000 Message-ID: <3c56d998-8b61-a0e2-a32a-f8bcdd01efe8@arm.com> Date: Mon, 18 Jul 2022 14:25:03 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH edk2-platforms v1 1/3] Platform/ARM: Juno: Generate ASL description of CPU topology To: Pierre.Gondois@arm.com, devel@edk2.groups.io Cc: Ard Biesheuvel , nd@arm.com References: <20220427145943.402487-1-Pierre.Gondois@arm.com> <20220427145943.402487-2-Pierre.Gondois@arm.com> From: "Sami Mujawar" In-Reply-To: <20220427145943.402487-2-Pierre.Gondois@arm.com> X-ClientProxiedBy: LO2P123CA0058.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1::22) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: ed56690f-a2fe-4f94-f996-08da68c0f31f X-MS-TrafficTypeDiagnostic: DU0PR08MB7690:EE_|AM5EUR03FT005:EE_|DBBPR08MB6236:EE_ x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 8usI5Kv3jJp3MtT1UaC94wkgFKhWIb+g932l8Cf7iqRgQyor2D+SP+wFpeVfEsnmL7xD7Sz92QyQk5S1/OPqXBaNdqDrzSk/aNFMldwy/IlYhyYraaZpdAokWKFS4D7iU+kj0uu2S+8xDYeG+61wJiOm6206Vv+8BLbp7uRwAg27CJx8vXcQ9T3a3NSLUKCLq+gcL9lOPtnGrlyi3Qo2TZ7cnFwtroWqUSbPL4WAb9/Fo7cKD3mjNugC8H0gAImNM+E+0f3wea83QcxyRccVx/UB3T6ULVC8fkfdeLWBOHjDJDqNtMh6gRb2apwE++kra+EjphAkwtis83j6ocyEd1ZZKbcEeEAJOBTOlZEswkfTacI4NkEi+saCURh4Ky6wdzIb4TJ+NcNQ3fXk4Aci5FE6n5X1DbGrzbqEj6g94XY4VGH6SZ7eqKN1EHXvKK0gPG0MgweKhV1cxDKMwmuGHnb18PyKTQ4URTWctRCxcJolxqNQgTVGwSMShUZbNZbXbT40tQu9z55axawzn3HM8z+KgTK/GtPeUGixNI7QvnbQPYRvNjRYfTimk38z00tktJVlFPd0hIpYy4DPOryEFj30oJ7J+g5MOxsv4mxqxGbtImOQU1VvqccRfTayYti8gtRyOvhTGbo2ots7g3iYQAAFJLgVf3xAhNPXxnJNUUo4ca2jiRFG1ARwBAbpNT3whNwsl4RUoSfc9O+7G0MADDINwLJDogXDlrbXgI1bqdAKIb8/1tAMEaoSF4pS+vaphR77Ru7CsULU4Q09jurgZtoAIo5q3Yh1e0PLVfHjJxTmbcAF+Vy6+A0QjjKuKsaCAHyyKb44KAvHZtq1VT5qPQ== 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:(13230016)(4636009)(346002)(366004)(396003)(136003)(39860400002)(376002)(5660300002)(8936002)(30864003)(44832011)(31686004)(2906002)(66556008)(31696002)(86362001)(8676002)(4326008)(316002)(36756003)(6512007)(66476007)(53546011)(26005)(41300700001)(6486002)(186003)(2616005)(478600001)(83380400001)(6506007)(38100700002)(66946007)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7690 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT005.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: bd74167e-fa31-4e6a-7d68-08da68c0ed5a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QUjm7Tolqko4ZnRjtiP+Af4CtbEB2QXXZn6MoAddzgpFXR4eyy0W4g90BA/rdAHxi5VIDBUWOOe4IQFjscw7BdtiuSxKTzHNGYSUO26UAjcgqgz23kOAgDFOigQAghskMyHoUzXdVTaWn5u4U75+rGlBMJYUihXCth590bhUvhqv/alZXLQ/VBm81v3c+WPygUUr0ZBxW9eniw4d0oRQBhj2VgaKkguoNv/6E4asploTWJZoABr/2TYDmLX3ijKS4sXGVpM67L0aD9/Pm8OBDqeLTvwy7aYAC+jzRYYJ5SFPFrbD1ANr9+E+xgouZh5R0GdSyPnIXedNluJXGwX5PX2UNTgkQT7m5WtLqM3YZfYSXddFGraQQGmQGrxwvhJwXhNItMpvip6RClrPyMtyTDNWISH724dcStWJ9MGbOKNL9iKOLY7HOhs//G3brWkViaT2GpY2DtvWhGtKuRFhEsGUcmLHY5bz6drx/h9mymFsoLoY7tcy1nyPbAo5vv3aFI0rvo/uvEyUjQTX1bK5zrik8MuynzYfkxFJOhDs8QF7eqd5Jycju3CatMv25aHZ/BqNvNFrIrFc5sH8wP/Z74od8u4VPmBH7CCsaVKmKoD4/sW2NV6pMnmoYo97Ql8KitYzbvIgNFi94/UvWI4iXrbpXNShaxCXAFNhBcO+itftidYNnO/Z/wtqOQB3+o6Hf4JR7F27a2Oxm011BeMdV34ttXZhTjofzANcox9UiwEmbSoH6NRJpjr6isxYbYzpGUqK2whqJyzy50y+V/j7RBb/iIoq453siajErOM7mkCejPI0S622mvb/31n7hF3Nv9zqYgK5iCC1hv1qcnh8gPF/0DEW31tPiyDV8eELn/k= 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:(13230016)(4636009)(376002)(346002)(396003)(39860400002)(136003)(36840700001)(46966006)(40470700004)(478600001)(6486002)(41300700001)(31686004)(6506007)(36756003)(356005)(6512007)(316002)(86362001)(31696002)(82740400003)(81166007)(26005)(83380400001)(2616005)(336012)(186003)(47076005)(53546011)(40480700001)(40460700003)(8676002)(30864003)(44832011)(5660300002)(8936002)(70206006)(70586007)(36860700001)(4326008)(2906002)(82310400005)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2022 13:25:14.7386 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ed56690f-a2fe-4f94-f996-08da68c0f31f 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: AM5EUR03FT005.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB6236 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Pierre, Thank you for this patch. Please find my response inline marked [SAMI]. Other than the comment below, these changes looks good to me. Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 27/04/2022 03:59 pm, Pierre.Gondois@arm.com wrote: > From: Pierre Gondois > > The Dynamic Tables Framework has been updated to add support for > generating an ASL description of a CPU topology and its _LPI states. > This patch: > - Describes the _LPI states in the Configuration Manager of the Juno > - Add the generation of a new SSDT table describing the CPU topology > and its _LPI states > - Removes the CPU topology description of the DSDT table > > Signed-off-by: Pierre Gondois > --- > .../AslTables/Dsdt.asl | 198 ------------------ > .../ConfigurationManager.c | 196 ++++++++++++++++- > .../ConfigurationManager.h | 20 +- > 3 files changed, 206 insertions(+), 208 deletions(-) > > diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/AslTables/Dsdt.asl b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/AslTables/Dsdt.asl > index 63c70c1e4f06..2270b517cd12 100644 > --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/AslTables/Dsdt.asl > +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/AslTables/Dsdt.asl > @@ -33,204 +33,6 @@ DefinitionBlock("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARM-JUNO", EFI_ACPI_ARM_O > } > Return (Arg3) > } > - Device (CLU0) { // Cluster0 state > - Name(_HID, "ACPI0010") > - Name(_UID, 1) > - Name (_LPI, Package() { > - 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 > - 0x01000000, // Integer Entry method > - ResourceTemplate() { // Null Residency Counter > - Register (SystemMemory, 0, 0, 0, 0) > - }, > - ResourceTemplate() { // Null Usage Counter > - Register (SystemMemory, 0, 0, 0, 0) > - }, > - "CluPwrDn" > - }, > - }) > - Name(PLPI, Package() { > - 0, // Version > - 0, // Level Index > - 2, // Count > - Package() { // WFI for CPU > - 1, // Min residency (uS) > - 1, // Wake latency (uS) > - 1, // Flags > - 0, // Arch Context Flags > - 100, //Residency Counter Frequency > - 0, // No parent state > - ResourceTemplate () { > - // Register Entry method > - Register (FFixedHW, > - 0x20, // Bit Width > - 0x00, // Bit Offset > - 0xFFFFFFFF, // Address > - 0x03, // Access Size > - ) > - }, > - ResourceTemplate() { // Null Residency Counter > - Register (SystemMemory, 0, 0, 0, 0) > - }, > - ResourceTemplate() { // Null Usage Counter > - Register (SystemMemory, 0, 0, 0, 0) > - }, > - "WFI", > - }, > - Package() { // Power Gating state for CPU > - 150, // Min residency (uS) > - 350, // Wake latency (uS) > - 1, // Flags > - 1, // Arch Context Flags > - 100, //Residency Counter Frequency > - 1, // Parent node can be in any state > - ResourceTemplate () { > - // Register Entry method > - Register (FFixedHW, > - 0x20, // Bit Width > - 0x00, // Bit Offset > - 0x00010000, // Address > - 0x03, // Access Size > - ) > - }, > - ResourceTemplate() { // Null Residency Counter > - Register (SystemMemory, 0, 0, 0, 0) > - }, > - ResourceTemplate() { // Null Usage Counter > - Register (SystemMemory, 0, 0, 0, 0) > - }, > - "CorePwrDn" > - }, > - }) > - Device(CPU0) { // A57-0: Cluster 0, Cpu 0 > - Name(_HID, "ACPI0007") > - Name(_UID, 0) > - Method (_LPI, 0, NotSerialized) { > - return(PLPI) > - } > - } > - Device(CPU1) { // A57-1: Cluster 0, Cpu 1 > - Name(_HID, "ACPI0007") > - Name(_UID, 1) > - Method (_LPI, 0, NotSerialized) { > - return(PLPI) > - } > - } > - } > - Device (CLU1) { // Cluster1 state > - Name(_HID, "ACPI0010") > - Name(_UID, 2) > - Name (_LPI, Package() { > - 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 > - 0x01000000, // Integer Entry method > - ResourceTemplate() { // Null Residency Counter > - Register (SystemMemory, 0, 0, 0, 0) > - }, > - ResourceTemplate() { // Null Usage Counter > - Register (SystemMemory, 0, 0, 0, 0) > - }, > - "CluPwrDn" > - }, > - }) > - Name(PLPI, Package() { > - 0, // Version > - 0, // Level Index > - 2, // Count > - Package() { // WFI for CPU > - 1, // Min residency (uS) > - 1, // Wake latency (uS) > - 1, // Flags > - 0, // Arch Context Flags > - 100, //Residency Counter Frequency > - 0, // No parent state > - ResourceTemplate () { > - // Register Entry method > - Register (FFixedHW, > - 0x20, // Bit Width > - 0x00, // Bit Offset > - 0xFFFFFFFF, // Address > - 0x03, // Access Size > - ) > - }, > - ResourceTemplate() { // Null Residency Counter > - Register (SystemMemory, 0, 0, 0, 0) > - }, > - ResourceTemplate() { // Null Usage Counter > - Register (SystemMemory, 0, 0, 0, 0) > - }, > - "WFI", > - }, > - Package() { // Power Gating state for CPU > - 150, // Min residency (uS) > - 350, // Wake latency (uS) > - 1, // Flags > - 1, // Arch Context Flags > - 100, //Residency Counter Frequency > - 1, // Parent node can be in any state > - ResourceTemplate () { > - // Register Entry method > - Register (FFixedHW, > - 0x20, // Bit Width > - 0x00, // Bit Offset > - 0x00010000, // Address > - 0x03, // Access Size > - ) > - }, > - ResourceTemplate() { // Null Residency Counter > - Register (SystemMemory, 0, 0, 0, 0) > - }, > - ResourceTemplate() { // Null Usage Counter > - Register (SystemMemory, 0, 0, 0, 0) > - }, > - "CorePwrDn" > - }, > - }) > - Device(CPU2) { // A53-0: Cluster 1, Cpu 0 > - Name(_HID, "ACPI0007") > - Name(_UID, 2) > - Method (_LPI, 0, NotSerialized) { > - return(PLPI) > - } > - } > - Device(CPU3) { // A53-1: Cluster 1, Cpu 1 > - Name(_HID, "ACPI0007") > - Name(_UID, 3) > - Method (_LPI, 0, NotSerialized) { > - return(PLPI) > - } > - } > - Device(CPU4) { // A53-2: Cluster 1, Cpu 2 > - Name(_HID, "ACPI0007") > - Name(_UID, 4) > - Method (_LPI, 0, NotSerialized) { > - return(PLPI) > - } > - } > - Device(CPU5) { // A53-3: Cluster 1, Cpu 3 > - Name(_HID, "ACPI0007") > - Name(_UID, 5) > - Method (_LPI, 0, NotSerialized) { > - return(PLPI) > - } > - } > - } > > // > // LAN9118 Ethernet > diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c > index 8a0464c5f637..977aba5da5c4 100644 > --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c > +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c > @@ -1,7 +1,7 @@ > /** @file > Configuration Manager Dxe > > - Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.
> + Copyright (c) 2017 - 2022, Arm Limited. All rights reserved.
> > SPDX-License-Identifier: BSD-2-Clause-Patent > > @@ -90,6 +90,14 @@ EDKII_PLATFORM_REPOSITORY_INFO ArmJunoPlatformRepositoryInfo = { > CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdPptt), > NULL > }, > + // SSDT Table (Cpu topology) > + { > + EFI_ACPI_6_3_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE, > + 0, // Unused > + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdSsdtCpuTopology), > + NULL, > + SIGNATURE_64 ('C','P','U','-','T','O','P','O') > + }, > /* PCI MCFG Table > PCIe is only available on Juno R1 and R2. > Add the PCI table entries at the end of the table so that > @@ -277,6 +285,8 @@ EDKII_PLATFORM_REPOSITORY_INFO ArmJunoPlatformRepositoryInfo = { > // UINT32 NoOfPrivateResources > 0, > // CM_OBJECT_TOKEN PrivateResourcesArrayToken > + CM_NULL_TOKEN, > + // CM_OBJECT_TOKEN LpiToken > CM_NULL_TOKEN > }, > // 'big' cluster > @@ -298,7 +308,9 @@ EDKII_PLATFORM_REPOSITORY_INFO ArmJunoPlatformRepositoryInfo = { > // UINT32 NoOfPrivateResources > BIG_CLUSTER_RESOURCE_COUNT, > // CM_OBJECT_TOKEN PrivateResourcesArrayToken > - REFERENCE_TOKEN (BigClusterResources) > + REFERENCE_TOKEN (BigClusterResources), > + // CM_OBJECT_TOKEN LpiToken > + REFERENCE_TOKEN (ClustersLpiRef) > }, > // 'LITTLE' cluster > { > @@ -319,7 +331,9 @@ EDKII_PLATFORM_REPOSITORY_INFO ArmJunoPlatformRepositoryInfo = { > // UINT32 NoOfPrivateResources > LITTLE_CLUSTER_RESOURCE_COUNT, > // CM_OBJECT_TOKEN PrivateResourcesArrayToken > - REFERENCE_TOKEN (LittleClusterResources) > + REFERENCE_TOKEN (LittleClusterResources), > + // CM_OBJECT_TOKEN LpiToken > + REFERENCE_TOKEN (ClustersLpiRef) > }, > // Two 'big' cores > { > @@ -340,7 +354,9 @@ EDKII_PLATFORM_REPOSITORY_INFO ArmJunoPlatformRepositoryInfo = { > // UINT32 NoOfPrivateResources > BIG_CORE_RESOURCE_COUNT, > // CM_OBJECT_TOKEN PrivateResourcesArrayToken > - REFERENCE_TOKEN (BigCoreResources) > + REFERENCE_TOKEN (BigCoreResources), > + // CM_OBJECT_TOKEN LpiToken > + REFERENCE_TOKEN (CoresLpiRef) > }, > { > // CM_OBJECT_TOKEN Token > @@ -360,7 +376,9 @@ EDKII_PLATFORM_REPOSITORY_INFO ArmJunoPlatformRepositoryInfo = { > // UINT32 NoOfPrivateResources > BIG_CORE_RESOURCE_COUNT, > // CM_OBJECT_TOKEN PrivateResourcesArrayToken > - REFERENCE_TOKEN (BigCoreResources) > + REFERENCE_TOKEN (BigCoreResources), > + // CM_OBJECT_TOKEN LpiToken > + REFERENCE_TOKEN (CoresLpiRef) > }, > // Four 'LITTLE' cores > { > @@ -381,7 +399,9 @@ EDKII_PLATFORM_REPOSITORY_INFO ArmJunoPlatformRepositoryInfo = { > // UINT32 NoOfPrivateResources > LITTLE_CORE_RESOURCE_COUNT, > // CM_OBJECT_TOKEN PrivateResourcesArrayToken > - REFERENCE_TOKEN (LittleCoreResources) > + REFERENCE_TOKEN (LittleCoreResources), > + // CM_OBJECT_TOKEN LpiToken > + REFERENCE_TOKEN (CoresLpiRef) > }, > { > // CM_OBJECT_TOKEN Token > @@ -401,7 +421,9 @@ EDKII_PLATFORM_REPOSITORY_INFO ArmJunoPlatformRepositoryInfo = { > // UINT32 NoOfPrivateResources > LITTLE_CORE_RESOURCE_COUNT, > // CM_OBJECT_TOKEN PrivateResourcesArrayToken > - REFERENCE_TOKEN (LittleCoreResources) > + REFERENCE_TOKEN (LittleCoreResources), > + // CM_OBJECT_TOKEN LpiToken > + REFERENCE_TOKEN (CoresLpiRef) > }, > { > // CM_OBJECT_TOKEN Token > @@ -421,7 +443,9 @@ EDKII_PLATFORM_REPOSITORY_INFO ArmJunoPlatformRepositoryInfo = { > // UINT32 NoOfPrivateResources > LITTLE_CORE_RESOURCE_COUNT, > // CM_OBJECT_TOKEN PrivateResourcesArrayToken > - REFERENCE_TOKEN (LittleCoreResources) > + REFERENCE_TOKEN (LittleCoreResources), > + // CM_OBJECT_TOKEN LpiToken > + REFERENCE_TOKEN (CoresLpiRef) > }, > { > // CM_OBJECT_TOKEN Token > @@ -441,7 +465,9 @@ EDKII_PLATFORM_REPOSITORY_INFO ArmJunoPlatformRepositoryInfo = { > // UINT32 NoOfPrivateResources > LITTLE_CORE_RESOURCE_COUNT, > // CM_OBJECT_TOKEN PrivateResourcesArrayToken > - REFERENCE_TOKEN (LittleCoreResources) > + REFERENCE_TOKEN (LittleCoreResources), > + // CM_OBJECT_TOKEN LpiToken > + REFERENCE_TOKEN (CoresLpiRef) > } > }, > > @@ -549,6 +575,84 @@ EDKII_PLATFORM_REPOSITORY_INFO ArmJunoPlatformRepositoryInfo = { > { > { REFERENCE_TOKEN (CacheInfo[4]) }, // -> 'LITTLE' core's L1 I-cache > { REFERENCE_TOKEN (CacheInfo[5]) } // -> 'LITTLE' core's L1 D-cache > + }, > + > + // Low Power Idle state information (LPI) for all cores/clusters > + { > + { // LpiInfo[0] -> Clusters CluPwrDn > + 2500, // MinResidency > + 1150, // WorstCaseWakeLatency > + 1, // Flags > + 1, // ArchFlags > + 100, // ResCntFreq > + 0, // EnableParentState > + 1, // IsInteger [SAMI] IsInteger field is of type BOOLEAN. Therefore, the value here should be TRUE. Similar changes are requires at other places in this file. If you agree, I will make the nessary changes locally before pushing the patch. [/SAMI] > + 0x01000000, // IntegerEntryMethod > + // RegisterEntryMethod (NULL, use IntegerEntryMethod) > + { EFI_ACPI_6_3_SYSTEM_MEMORY, 0, 0, 0, 0 }, > + // ResidencyCounterRegister (NULL) > + { EFI_ACPI_6_3_SYSTEM_MEMORY, 0, 0, 0, 0 }, > + // UsageCounterRegister (NULL) > + { EFI_ACPI_6_3_SYSTEM_MEMORY, 0, 0, 0, 0 }, > + "CluPwrDn" // StateName > + }, > + // LpiInfo[1] -> Cores WFI > + { > + 1, // MinResidency > + 1, // WorstCaseWakeLatency > + 1, // Flags > + 0, // ArchFlags > + 100, // ResCntFreq > + 0, // EnableParentState > + 0, // IsInteger > + 0, // IntegerEntryMethod (0, use RegisterEntryMethod) > + // RegisterEntryMethod > + { > + EFI_ACPI_6_3_FUNCTIONAL_FIXED_HARDWARE, // AddressSpaceId > + 0x20, // RegisterBitWidth > + 0x00, // RegisterBitOffset > + 0x03, // AccessSize > + 0xFFFFFFFF // Address > + }, > + // ResidencyCounterRegister (NULL) > + { EFI_ACPI_6_3_SYSTEM_MEMORY, 0, 0, 0, 0 }, > + // UsageCounterRegister (NULL) > + { EFI_ACPI_6_3_SYSTEM_MEMORY, 0, 0, 0, 0 }, > + "WFI" // StateName > + }, > + // LpiInfo[2] -> Cores CorePwrDn > + { > + 150, // MinResidency > + 350, // WorstCaseWakeLatency > + 1, // Flags > + 1, // ArchFlags > + 100, // ResCntFreq > + 1, // EnableParentState > + 0, // IsInteger > + 0, // IntegerEntryMethod (0, use RegisterEntryMethod) > + // RegisterEntryMethod > + { > + EFI_ACPI_6_3_FUNCTIONAL_FIXED_HARDWARE, // AddressSpaceId > + 0x20, // RegisterBitWidth > + 0x00, // RegisterBitOffset > + 0x03, // AccessSize > + 0x00010000 // Address > + }, > + // ResidencyCounterRegister (NULL) > + { EFI_ACPI_6_3_SYSTEM_MEMORY, 0, 0, 0, 0 }, > + // UsageCounterRegister (NULL) > + { EFI_ACPI_6_3_SYSTEM_MEMORY, 0, 0, 0, 0 }, > + "CorePwrDn" // StateName > + }, > + }, > + // Cluster Low Power Idle state references (LPI) > + { > + { REFERENCE_TOKEN (LpiInfo[0]) } > + }, > + // Cores Low Power Idle state references (LPI) > + { > + { REFERENCE_TOKEN (LpiInfo[1]) }, > + { REFERENCE_TOKEN (LpiInfo[2]) }, > } > }; > > @@ -809,6 +913,55 @@ GetGicCInfo ( > return EFI_NOT_FOUND; > } > > +/** Return Lpi State Infor. > + > + @param [in] This Pointer to the Configuration Manager Protocol. > + @param [in] CmObjectId The Object ID of the CM object requested > + @param [in] SearchToken A unique token for identifying the requested > + CM_ARM_LPI_INFO object. > + @param [in, out] CmObject Pointer to the Configuration Manager Object > + descriptor describing the requested Object. > + > + @retval EFI_SUCCESS Success. > + @retval EFI_INVALID_PARAMETER A parameter is invalid. > + @retval EFI_NOT_FOUND The required object information is not found. > +**/ > +EFI_STATUS > +EFIAPI > +GetLpiInfo ( > + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, > + IN CONST CM_OBJECT_ID CmObjectId, > + IN CONST CM_OBJECT_TOKEN SearchToken, > + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObject > + ) > +{ > + EDKII_PLATFORM_REPOSITORY_INFO * PlatformRepo; > + UINT32 TotalObjCount; > + UINT32 ObjIndex; > + > + if ((This == NULL) || (CmObject == NULL)) { > + ASSERT (This != NULL); > + ASSERT (CmObject != NULL); > + return EFI_INVALID_PARAMETER; > + } > + > + PlatformRepo = This->PlatRepoInfo; > + > + TotalObjCount = ARRAY_SIZE (PlatformRepo->LpiInfo); > + > + for (ObjIndex = 0; ObjIndex < TotalObjCount; ObjIndex++) { > + if (SearchToken == (CM_OBJECT_TOKEN)&PlatformRepo->LpiInfo[ObjIndex]) { > + CmObject->ObjectId = CmObjectId; > + CmObject->Size = sizeof (PlatformRepo->LpiInfo[ObjIndex]); > + CmObject->Data = (VOID*)&PlatformRepo->LpiInfo[ObjIndex]; > + CmObject->Count = 1; > + return EFI_SUCCESS; > + } > + } > + > + return EFI_NOT_FOUND; > +} > + > /** Return a list of Configuration Manager object references pointed to by the > given input token. > > @@ -866,6 +1019,18 @@ GetCmObjRefs ( > CmObject->Count = ARRAY_SIZE (PlatformRepo->LittleCoreResources); > return EFI_SUCCESS; > } > + if (SearchToken == (CM_OBJECT_TOKEN)&PlatformRepo->ClustersLpiRef) { > + CmObject->Size = sizeof (PlatformRepo->ClustersLpiRef); > + CmObject->Data = (VOID*)&PlatformRepo->ClustersLpiRef; > + CmObject->Count = ARRAY_SIZE (PlatformRepo->ClustersLpiRef); > + return EFI_SUCCESS; > + } > + if (SearchToken == (CM_OBJECT_TOKEN)&PlatformRepo->CoresLpiRef) { > + CmObject->Size = sizeof (PlatformRepo->CoresLpiRef); > + CmObject->Data = (VOID*)&PlatformRepo->CoresLpiRef; > + CmObject->Count = ARRAY_SIZE (PlatformRepo->CoresLpiRef); > + return EFI_SUCCESS; > + } > > return EFI_NOT_FOUND; > } > @@ -1142,6 +1307,19 @@ GetArmNameSpaceObject ( > } > break; > > + case EArmObjLpiInfo: > + Status = HandleCmObjectRefByToken ( > + This, > + CmObjectId, > + NULL, > + 0, > + 0, > + Token, > + GetLpiInfo, > + CmObject > + ); > + break; > + > default: { > Status = EFI_NOT_FOUND; > DEBUG (( > diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h > index 771b00c31b9e..1bc242bc9d85 100644 > --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h > +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h > @@ -115,7 +115,7 @@ typedef EFI_STATUS (*CM_OBJECT_HANDLER_PROC) ( > > /** The number of ACPI tables to install > */ > -#define PLAT_ACPI_TABLE_COUNT 10 > +#define PLAT_ACPI_TABLE_COUNT 11 > > /** The number of platform generic timer blocks > */ > @@ -172,6 +172,15 @@ typedef EFI_STATUS (*CM_OBJECT_HANDLER_PROC) ( > */ > #define LITTLE_CORE_RESOURCE_COUNT 2 > > +/** The number of Lpi states for the platform: > + - two for the cores > + - one for the clusters > +*/ > +#define CORES_LPI_STATE_COUNT 2 > +#define CLUSTERS_LPI_STATE_COUNT 1 > +#define LPI_STATE_COUNT (CORES_LPI_STATE_COUNT + \ > + CLUSTERS_LPI_STATE_COUNT) > + > /** A structure describing the platform configuration > manager repository information > */ > @@ -238,6 +247,15 @@ typedef struct PlatformRepositoryInfo { > // 'LITTLE' core private resources > CM_ARM_OBJ_REF LittleCoreResources[LITTLE_CORE_RESOURCE_COUNT]; > > + // Low Power Idle state information (LPI) for all cores/clusters > + CM_ARM_LPI_INFO LpiInfo[LPI_STATE_COUNT]; > + > + // Clusters Low Power Idle state references (LPI) > + CM_ARM_OBJ_REF ClustersLpiRef[CLUSTERS_LPI_STATE_COUNT]; > + > + // Cores Low Power Idle state references (LPI) > + CM_ARM_OBJ_REF CoresLpiRef[CORES_LPI_STATE_COUNT]; > + > /// Juno Board Revision > UINT32 JunoRevision; > } EDKII_PLATFORM_REPOSITORY_INFO;