From nobody Sat Apr 27 03:40:23 2024 Delivered-To: importer@patchew.org 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+81733+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1633891295037713.9192593231857; Sun, 10 Oct 2021 11:41:35 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id BYqeYY1788612xIaeQar7P29; Sun, 10 Oct 2021 11:41:34 -0700 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.66]) by mx.groups.io with SMTP id smtpd.web10.1811.1633891293757026070 for ; Sun, 10 Oct 2021 11:41:34 -0700 X-Received: from AS9PR06CA0095.eurprd06.prod.outlook.com (2603:10a6:20b:465::28) by DB7PR08MB2970.eurprd08.prod.outlook.com (2603:10a6:5:17::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.24; Sun, 10 Oct 2021 18:41:29 +0000 X-Received: from AM5EUR03FT040.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:465:cafe::b4) by AS9PR06CA0095.outlook.office365.com (2603:10a6:20b:465::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Sun, 10 Oct 2021 18:41:29 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81733+1787277+3901457@groups.io; helo=mail02.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT040.mail.protection.outlook.com (10.152.17.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Sun, 10 Oct 2021 18:41:28 +0000 X-Received: ("Tessian outbound a8bfe25d7364:v103"); Sun, 10 Oct 2021 18:41:27 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 66259a118ab3a05e X-CR-MTA-TID: 64aa7808 X-Received: from c4c3e889fbeb.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id B5D76E7D-5F5E-46BA-B094-972A1361B11E.1; Sun, 10 Oct 2021 18:30:23 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c4c3e889fbeb.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sun, 10 Oct 2021 18:30:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WTUbLNErGxRUw0YtIHSB5SVAeVBbG0THoKedI6DGkXZJgTIEmbf3FED6ko4ict6b0UbV3WQh++SWgUnPX2mzu1zbhIguS26bU3g/DBicPeAoHIMisny1K77wpQLdmu0khQCLRuQVnQDHhh0bAJkkP4NWZD2OnCgtZqFobbYsOTHHXsxaxevn64A+ubHADa9b1yCQO3TsH9aVvegtr2yqSuQ4Fz8Ra4h/1Dgiwz16TA4+z/It2qTRzL9XbTuqPuC8HTn2ID/HCPOOw3fBMW10YVNgkD+imJCvGRJaNVRs9GNoDYcar2ypGnLwklGzoX8iYEBX91UUKwUXwHDN0i9nqQ== 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=XZeOKSdYT5f3z5VOvXMDMbKwnbr+amutDkVFZcx70Jo=; b=Q+ZlJAu6Gx3GnFvYwYdwx0stMa/WVoq8pJgK61Kg0nsHRf9lwx4O4vDMdUm/igMyWAn2UpXpBJKda3bgxorhw0vgwcL5CXOw7NqDT9sB/fFNDY+Av5RW0vG+kwfUMZzbfDp4pV7HZVAii3rmBSen1G7tFQT8kGxivpgxVUhiyBO2vY4OAfSfKyLaiAMlDahcVZQXQAKvyYix+9JxX17t8rNG1qc0zeJdJe1+DEmA5BxUVndHVewVWEjhpxpupgb3Dc3DzwpUZni+ByKT7c5MZSfIf9LObsXmNKaRCT+pvnb4ifs8ar8RLQwgh0deAUo0K/LW5txDVI8C3X0lo1NcOQ== 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 Authentication-Results-Original: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; X-Received: from PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) by PAXPR08MB6542.eurprd08.prod.outlook.com (2603:10a6:102:158::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Sun, 10 Oct 2021 18:30:22 +0000 X-Received: from PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::e5a7:9474:4463:d258]) by PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::e5a7:9474:4463:d258%2]) with mapi id 15.20.4587.025; Sun, 10 Oct 2021 18:30:22 +0000 From: "Khasim Mohammed" To: devel@edk2.groups.io Cc: nd@arm.com, Khasim Syed Mohammed Subject: [edk2-devel] [PATCH v2 1/7] Silicon/ARM/NeoverseN1Soc: Fix missing function documentation Date: Sun, 10 Oct 2021 23:59:50 +0530 Message-Id: <20211010182956.13526-2-khasim.mohammed@arm.com> In-Reply-To: <20211010182956.13526-1-khasim.mohammed@arm.com> References: <20211010182956.13526-1-khasim.mohammed@arm.com> X-ClientProxiedBy: LO4P123CA0392.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::19) To PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) MIME-Version: 1.0 X-Received: from e116623.arm.com (217.140.99.251) by LO4P123CA0392.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.20 via Frontend Transport; Sun, 10 Oct 2021 18:30:21 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0d251080-2a82-4699-11a4-08d98c1d924c X-MS-TrafficTypeDiagnostic: PAXPR08MB6542:|DB7PR08MB2970: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: Hrpkxfc/Are+iQ9HpBj7l9csIDh7fCK9AYZJlx8ks2e/YdA3NGmyokYaz//8t1waH5AgJSeEGtBfUV3HqLYXQ1DJ38FtcxZNmb6mxoAET/D8M4e+ECnyFUZzQQbqkJLC9WmUzpRgh1mxhi2r19JNrumMCslGuBy0Pa78cGoUIGhPA/6Lpd08UmDlTfSKJ9foKI+g88MulYxBnr75k0S0y/AaychwDCGoL7wLX81GZKb1OchlE+nGAtN23sUs2I2AP+Js0CTK/Vc773xqrQM7LzuDD+BxPjjjLPfFSYc213z6mc5BOmiRjT60oktdzv/quKkQFCHqPloRWv2jxwTTKTjsWBF0fLSpYZGp3NpZx6AydLdPvMHykPkLLvdaI0tsnIQprcuUJo6DP4GB4Qq+EUWThsledxGS3SEu3sfZpT5VcGZDh16pD9oE8efLt6Xuax1XWs8zenGEs+BMGk1fAccAE8Vr3LnQ8UwGo2kr1k1b0Qhr+56R31yhfdHJZxZI+8I7X7f2HXL6BTHXdhJbp/H+Eu5LJUNUNcPbLmVJ0pRsXEgPQlMLKk+OYVIiFJDhy1Mi5Qx4H7CjrBRzU13QvnuOeHWWdu0CR1A62I31rR2lszf0BuRgYiLIxTNJl9YXZdkerW1DIVu7q/Rmz7huj7GZH4atr0H+YxKLrGNLMe7AI9lwswUFdv7bjd7uefBWy50W5lgF1EAC7mvGPox+NQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA4PR08MB5902.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(1076003)(83380400001)(6666004)(8676002)(8936002)(956004)(2616005)(6486002)(5660300002)(26005)(38100700002)(38350700002)(66946007)(316002)(36756003)(7696005)(186003)(52116002)(66556008)(66476007)(86362001)(2906002)(6916009)(508600001)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6542 Original-Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 19c298e1-a90f-4eb6-8c1a-08d98c1c050c X-Microsoft-Antispam-Message-Info: OtiQRaoZ8yyqGp7q8FnMJBvpIqPHat8eUQqj5xUIHt+zRzhRM31/eJS2IM2MZnEjQR+8OemGYS8Qj1XpxCmj75SsPWbgRzw7ygSguNmiKCwvrN2pL6ZwDk2vb5PeQ/zF/roFN2Jg4bh9J6bKKwVv3B0TmD2lWj/rtuCWoWBv6Z8zDgneF+aJ1Ja5rb8Y3QCooHQlDQL9zEcO5xG6taC8+1QtFVymDkOTXHSG69Tm9Y1U9iVn/JPhOgoduQNRRPdKdXjoNSbdw/fFqtSqZg1zOWIductkPrUrfWgJ63scLnu3JvAGnTtGzCb5PlEgBsxE1SOxfOsbLrG8q7gg8u/llSjDbU3uDd22w24FpvQLHBKsXKJovgW7fV+pOLGz8JoEI+SAoF7SECDxIDQE+aXM2PTB0+T3rR0Qr5fGgJzDXDij3DIFofw3/CB6EGJnMA/HxG3OwX2w80olaxxzOECXRADC98R1gobuWLs6EYVvOYvWhuNqOPM/W/mSpFuI+AkMzfuaMYArH/MJueT0pioi3cQitOa0HeHySxJvMCQBoH3yBA26iBb0iZ8jl5XwaNF1qkGUeMIMfrw4BE1cJCNSvMdpA6iKIRS/JmsqarRmF5/95iE1A6Q8KZANYc2D7+dfK/tXcve+mmW+s0G5YTykGdktnEsWdjSem8+szNPFeYYNZEzHysYdyZADlP6CheNYncyhnjTN97sBIfX9SCew9A== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2021 18:41:28.5515 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0d251080-2a82-4699-11a4-08d98c1d924c 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: AM5EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB2970 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,khasim.mohammed@arm.com X-Gm-Message-State: 81nppvbleWWnUnsX5hEBxsPJx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1633891294; bh=8afpwTlc64cs3vK1i2baBO5gu8/jXOZBG9C53l/ptSk=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=tLVS6WZDOVxAShk0fPdHeVVm0IcO6qJ/KGRGXOfH2cpdXkSLiT3RBcjU6ZaiIfBiHwF UE1iW/2EGRqNBpSQjHOERl7IBaW47iK/rH1Oa/wqCrN1I3M0fdPSrGk2lz6lYTLBPVQDE 9w7FeYE2QPcztWk7GLdbDElVFh8drLEZBA8= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1633891296819100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This patch adds missing documentation for few of the functions and fixes few formatting changes. Signed-off-by: Khasim Syed Mohammed --- .../PciHostBridgeLib/PciHostBridgeLib.c | 18 ++++---- .../Library/PlatformLib/PlatformLib.c | 43 ++++++++++++++++--- 2 files changed, 47 insertions(+), 14 deletions(-) diff --git a/Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBrid= geLib.c b/Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeL= ib.c index 9332939f63..ac88415fd2 100644 --- a/Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.c +++ b/Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.c @@ -1,10 +1,10 @@ /** @file -* PCI Host Bridge Library instance for ARM Neoverse N1 platform -* -* Copyright (c) 2019 - 2020, ARM Limited. All rights reserved. -* -* SPDX-License-Identifier: BSD-2-Clause-Patent -* + PCI Host Bridge Library instance for ARM Neoverse N1 platform + + Copyright (c) 2019 - 2021, ARM Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + **/ =20 #include @@ -96,7 +96,7 @@ STATIC PCI_ROOT_BRIDGE mPciRootBridge[] =3D { /** Return all the root bridge instances in an array. =20 - @param Count Return the count of root bridge instances. + @param Count Return the count of root bridge instances. =20 @return All the root bridge instances in an array. The array should be passed into PciHostBridgeFreeRootBridges() @@ -115,8 +115,8 @@ PciHostBridgeGetRootBridges ( /** Free the root bridge instances array returned from PciHostBridgeGetRootB= ridges(). =20 - @param Bridges The root bridge instances array. - @param Count The count of the array. + @param Bridges The root bridge instances array. + @param Count The count of the array. **/ VOID EFIAPI diff --git a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.c b/= Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.c index f722080e56..d5ec0ff30d 100644 --- a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.c +++ b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.c @@ -1,9 +1,9 @@ /** @file -* -* Copyright (c) 2018-2020, ARM Limited. All rights reserved. -* -* SPDX-License-Identifier: BSD-2-Clause-Patent -* + + Copyright (c) 2018-2021, ARM Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + **/ =20 #include @@ -17,6 +17,12 @@ STATIC ARM_CORE_INFO mCoreInfoTable[] =3D { { 0x1, 0x1 } // Cluster 1, Core 1 }; =20 +/** + Return the current Boot Mode. + + This function returns the boot reason on the platform. + +**/ EFI_BOOT_MODE ArmPlatformGetBootMode ( VOID @@ -25,6 +31,15 @@ ArmPlatformGetBootMode ( return BOOT_WITH_FULL_CONFIGURATION; } =20 +/** + Initialize controllers that must be setup in the normal world. + + This function is called by the ArmPlatformPkg/Pei or ArmPlatformPkg/Pei/= PlatformPeim + in the PEI phase. + + @param[in] MpId Processor ID + +**/ RETURN_STATUS ArmPlatformInitialize ( IN UINTN MpId @@ -33,6 +48,15 @@ ArmPlatformInitialize ( return RETURN_SUCCESS; } =20 +/** + Populate the Platform core information. + + This function populates the ARM_MP_CORE_INFO_PPI with information about = the cores. + + @param[out] CoreCount Number of cores + @param[out] ArmCoreTable Table containing information about the cores + +**/ EFI_STATUS PrePeiCoreGetMpCoreInfo ( OUT UINTN *CoreCount, @@ -56,6 +80,15 @@ EFI_PEI_PPI_DESCRIPTOR gPlatformPpiTable[] =3D { } }; =20 +/** + Return the Platform specific PPIs + + This function exposes the N1Sdp Specific PPIs. + + @param[out] PpiListSize Size in Bytes of the Platform PPI List + @param[out] PpiList Platform PPI List + +**/ VOID ArmPlatformGetPlatformPpiList ( OUT UINTN *PpiListSize, --=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 (#81733): https://edk2.groups.io/g/devel/message/81733 Mute This Topic: https://groups.io/mt/86220127/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 Sat Apr 27 03:40:23 2024 Delivered-To: importer@patchew.org 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+81727+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 163389067255784.85434657108328; Sun, 10 Oct 2021 11:31:12 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id hHcEYY1788612xAk07940YfQ; Sun, 10 Oct 2021 11:31:12 -0700 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.75]) by mx.groups.io with SMTP id smtpd.web09.1730.1633890670312561908 for ; Sun, 10 Oct 2021 11:31:11 -0700 X-Received: from DB8PR06CA0054.eurprd06.prod.outlook.com (2603:10a6:10:120::28) by HE1PR08MB2681.eurprd08.prod.outlook.com (2603:10a6:7:30::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.20; Sun, 10 Oct 2021 18:31:06 +0000 X-Received: from DB5EUR03FT012.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:120:cafe::12) by DB8PR06CA0054.outlook.office365.com (2603:10a6:10:120::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.24 via Frontend Transport; Sun, 10 Oct 2021 18:31:06 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81727+1787277+3901457@groups.io; helo=mail02.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT012.mail.protection.outlook.com (10.152.20.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Sun, 10 Oct 2021 18:31:06 +0000 X-Received: ("Tessian outbound 2e7020cc8961:v103"); Sun, 10 Oct 2021 18:31:06 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: cb574a2f44278784 X-CR-MTA-TID: 64aa7808 X-Received: from 9c48b252b0b2.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id BC8A40AD-B3AD-46D3-BF5A-ACB1D6D74A98.1; Sun, 10 Oct 2021 18:30:58 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 9c48b252b0b2.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sun, 10 Oct 2021 18:30:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T0jsnrImSz5AUW3yZyV2dLj5/9pIgymoGq3yc2ZOowBfoJmcfzaWcCtPph8LXKmEI/7B9OW9tJ2waAERcfYsOgaqsiNmTv3bAgInKatsRvZ97jYFvU4sMKmfu4EpfAr9ltylrYo8H00wwXdil9Sn+hUPG+X88QixFv/zsDQFcU7TbaWM/FfKsUtuwTt3FTg2+D+XRxib/zlBOxaDuBZiRx9TGQXeWYPXb9lWfT5iboIJhomwClIOu9yFlOxVr1MhDQ4KEA8hFjeD152excEiC+Mn840MuwAEC3MMhnzjcsS5t2uOnoYCuJN0R5kJyB10aj/0k0lkRuCikrxGm8QeaQ== 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=iJZSCscgD6malb9b6nEwptbMnTA4VWohSfmxP3j7qD8=; b=ob2krxGscjMxO8igzJYtgLDfI54b2AHfmpx82AKBnrNOIIXM2+9mYBGWn/VxWErOu39dP2MEiDxVUxzNyGti8IDUuu6YORa/JRsrPcy5z+iiDTldRIUJqVYn1Ok4L1xu3iv2cyPmqk+n7/+8RgEVGF6t4lEv2xgsvKBZ9iWYvH8hNRWtxeuE91rgyaY90tG9kTXy/gIvFWa+PZYvV2OsOxjCl0ApFqV1Dbd+yxInso34axUuQXGIOXP/yNcovgPO8BBgHU6A3wzCWMBaI6zeFHRcwdaO/rJ3Uz8MDDwZCYji+YTKJ6YsR2wcNhs/BKa20yGnmUL1kOPE62GLOUe6hw== 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 Authentication-Results-Original: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; X-Received: from PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) by PAXPR08MB6542.eurprd08.prod.outlook.com (2603:10a6:102:158::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Sun, 10 Oct 2021 18:30:57 +0000 X-Received: from PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::e5a7:9474:4463:d258]) by PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::e5a7:9474:4463:d258%2]) with mapi id 15.20.4587.025; Sun, 10 Oct 2021 18:30:57 +0000 From: "Khasim Mohammed" To: devel@edk2.groups.io Cc: nd@arm.com, Khasim Syed Mohammed , Chandni Cherukuri Subject: [edk2-devel] [PATCH v2 2/7] Silicon/ARM/NeoverseN1Soc: Define new PCDs and configure memory map Date: Sun, 10 Oct 2021 23:59:51 +0530 Message-Id: <20211010182956.13526-3-khasim.mohammed@arm.com> In-Reply-To: <20211010182956.13526-1-khasim.mohammed@arm.com> References: <20211010182956.13526-1-khasim.mohammed@arm.com> X-ClientProxiedBy: LO4P123CA0392.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::19) To PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) MIME-Version: 1.0 X-Received: from e116623.arm.com (217.140.99.251) by LO4P123CA0392.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.20 via Frontend Transport; Sun, 10 Oct 2021 18:30:55 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0e365654-1dd9-4b87-eb5e-08d98c1c1f69 X-MS-TrafficTypeDiagnostic: PAXPR08MB6542:|HE1PR08MB2681: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: q4lzjF6tNip/OxD9QxQgabc1Uj9frntvtHHB4nZOnl4MMvUQcEFk5h8Vf59lv+eSWo3iwPTkjLLsgFnA3/RpxfBQ3VEmekpIvNXaRTCdIGT2dLdHe5yt6aXOJHAbkuDJdYsrULs/WSyz/HLnO2eYScUq9tiTvOJ+eLnXPCo2/+vSQGc4b5pSssJ0WsDIbqCMA6grnDgUaLmIk76SCa7TsVs2qaUBF3B3tmPF+0uv4D/PVzWZSXqiaHmgPYJUWdjNvq16XSot+xa+CnIB11HerRJsR1P0K3mkca6vFLwXmAKDhRRK+CN8e2IM3FuYl0QAwdDHVbyc/OPxP1M1rFv7b/WegJyso7IesajkFFlhlNqKSZP/6fWW7kGQhwZFpFUmVQ9qplhwEBQVSSkhe0TVhtHt5ohj/VtWduVFt46gYf/NbNPnkjWGnmpW+vXiXoxqYyxj/uuEwKYi+pQ0h6y4iAfZFqVI6xkcRz4ovMCnJG6/8ghK5WejOqLV0SqKMTw9eAPKSqcRUwA3lRrPcrrzzceJvuireX/tx6ADBOHmHUC5EMgU26THUQgaEaPdxJd2HSSbqnj39tIMLPIHipl/y+iP3reVto2jg+PXk0kCA/UgSPF3IZ6WiCDMlYwJHJ5zyLN+b6gIiyWfUtPPy2ou0wqYa8GnRZ43Qckz93qIAzLjhLnlOvP5JoXMEdWdy48hhZZ4fR1fSe601nDkqBvDBw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA4PR08MB5902.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(1076003)(83380400001)(6666004)(8676002)(8936002)(30864003)(956004)(2616005)(6486002)(5660300002)(26005)(38100700002)(38350700002)(66946007)(316002)(54906003)(36756003)(7696005)(186003)(52116002)(66556008)(66476007)(19627235002)(86362001)(2906002)(6916009)(508600001)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6542 Original-Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT012.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: cb3d4d32-958d-4df6-9033-08d98c1c199e X-Microsoft-Antispam-Message-Info: 9HSMG4NDVM7eT8XGHGBZZwsuZbPly1TzTr+yvwvR7TRnGI8rXcf6mQlSwfm5vVaTr1H3d4dh//HSQ0CgVdavEcIzkKAT4ML7tRnpIhHccAZxbJVr+BRY/mtWUoIUIYtNaQmRMZ5ORmmh36H/QjJSmW7A1/RRHggH5FgV0h0vB/ID3AzMYaNcKjhQpRvCHDeIEkytUdxjeIuhrzkG7sARXGJ3heXbfFn2IRIiG0sSnznQVPbaxm+6MMfTLrtSPG4Fzueb0nZH9wgHF8uJTF25OklwFcb9MBT2xxVMIowRqBMKrhyq3m+3bFcdSTwD/yg8PbFR+cKIUF0CK944Tjjmwv/YH465wgwxhxwU97OVtwBNSVO6mtoNaMF18ezja+SlbDG/vvi32kHTiN+B6egFY+tULrCd1bD5ObV/KMkfqtPsHtH7lVTd6Z0xPaDBcsACy/x9zRDYTSMUiziSnOYJJWZnWD5RhzZUVRZ8C4IL/TQWrUX1Xj+rQ4BFzOGWST9aJDVmt79w5okCMZAmDnU6mcMCnU6w6HHJqG83E4rz48SCL6gdsMu2oywGgrBNRyw+4owKXyiD+lZa/YFsf/7oBxk8VXbjRT//Aeom351pGIshOBsVzxL5CYqzC3bFupgwk1lQfYxU7ayAyQN08CdETz3OZR9bsmoP6NM9KFVoPZ0QlFoPM+XGKYAQcAwRSQtu5pA6xmD8s1ODDs3NBo6IXg== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2021 18:31:06.3554 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0e365654-1dd9-4b87-eb5e-08d98c1c1f69 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: DB5EUR03FT012.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR08MB2681 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,khasim.mohammed@arm.com X-Gm-Message-State: 2py0kEJT07xncazMuxqHd6Rax1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1633890672; bh=2tjY5DD1vJCkSwPZKFqvoSH7Rw5+GUVseizizoqLBTI=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=tES4dd8tiUERl9SFtD9CG4urj40D/2FVDfTpO2Rtn2wTiGBXqaWdTVPH/4+SDec4qyn f/rBxcKlmonJU2VNkvpswRahDHQPlfrznH3/F4U+0vZOnqUGh3LP3vnH4INbm5T0MQC9K pc8xxc0v2/BLcW9SQDeLbpCSC8NrcAo0eXQ= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1633891576644100002 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This patch introduces new PCDs required to enable chip to chip interface and corresponding memory map is updated. Signed-off-by: Chandni Cherukuri Signed-off-by: Khasim Syed Mohammed Reviewed-by: Pierre Gondois --- .../Library/PlatformLib/PlatformLib.inf | 28 +++++-- .../Library/PlatformLib/PlatformLibMem.c | 84 ++++++++++++++++--- Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec | 35 +++++++- 3 files changed, 125 insertions(+), 22 deletions(-) diff --git a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf = b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf index 166c9e0444..8e2154aadf 100644 --- a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf +++ b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf @@ -1,6 +1,7 @@ ## @file +# Platform Library for N1Sdp. # -# Copyright (c) 2018-2020, ARM Limited. All rights reserved. +# Copyright (c) 2018-2021, ARM Limited. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -29,13 +30,17 @@ AArch64/Helper.S | GCC =20 [FixedPcd] - gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress - - gArmTokenSpaceGuid.PcdSystemMemoryBase - gArmTokenSpaceGuid.PcdSystemMemorySize - gArmTokenSpaceGuid.PcdArmPrimaryCore - gArmTokenSpaceGuid.PcdArmPrimaryCoreMask - + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixBusMax + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixBusMin + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixExpressBaseAddress + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio32Base + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio32Size + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio64Base + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio64Size + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixRootPortConfigBaseAddress + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixRootPortConfigBaseSize + gArmNeoverseN1SocTokenSpaceGuid.PcdDramBlock2Base + gArmNeoverseN1SocTokenSpaceGuid.PcdExtMemorySpace gArmNeoverseN1SocTokenSpaceGuid.PcdPcieBusMax gArmNeoverseN1SocTokenSpaceGuid.PcdPcieBusMin gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio32Base @@ -45,7 +50,12 @@ gArmNeoverseN1SocTokenSpaceGuid.PcdPcieRootPortConfigBaseAddress gArmNeoverseN1SocTokenSpaceGuid.PcdPcieRootPortConfigBaseSize =20 - gArmNeoverseN1SocTokenSpaceGuid.PcdDramBlock2Base + gArmTokenSpaceGuid.PcdArmPrimaryCore + gArmTokenSpaceGuid.PcdArmPrimaryCoreMask + gArmTokenSpaceGuid.PcdSystemMemoryBase + gArmTokenSpaceGuid.PcdSystemMemorySize + + gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress =20 [Guids] gEfiHobListGuid ## CONSUMES ## SystemTable diff --git a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c= b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c index f9b3d03753..1c4a445c5e 100644 --- a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c +++ b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c @@ -1,9 +1,9 @@ /** @file -* -* Copyright (c) 2018 - 2020, ARM Limited. All rights reserved. -* -* SPDX-License-Identifier: BSD-2-Clause-Patent -* + + Copyright (c) 2018 - 2021, ARM Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + **/ =20 #include @@ -13,7 +13,7 @@ #include =20 // The total number of descriptors, including the final "end-of-table" des= criptor. -#define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 13 +#define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 19 =20 /** Returns the Virtual Memory Map of the platform. @@ -21,21 +21,23 @@ This Virtual Memory Map is used by MemoryInitPei Module to initialize th= e MMU on your platform. =20 - @param[out] VirtualMemoryMap Array of ARM_MEMORY_REGION_DESCRIPTOR descr= ibing - a Physical-to-Virtual Memory mapping. This = array - must be ended by a zero-filled entry. + @param[in] VirtualMemoryMap Array of ARM_MEMORY_REGION_DESCRIPTOR des= cribing + a Physical-to-Virtual Memory mapping. Thi= s array + must be ended by a zero-filled entry. **/ VOID ArmPlatformGetVirtualMemoryMap ( IN ARM_MEMORY_REGION_DESCRIPTOR **VirtualMemoryMap ) { - UINTN Index =3D 0; + UINTN Index; ARM_MEMORY_REGION_DESCRIPTOR *VirtualMemoryTable; EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttributes; NEOVERSEN1SOC_PLAT_INFO *PlatInfo; UINT64 DramBlock2Size; + UINT64 RemoteDdrSize; =20 + Index =3D 0; PlatInfo =3D (NEOVERSEN1SOC_PLAT_INFO *)NEOVERSEN1SOC_PLAT_INFO_STRUCT_B= ASE; DramBlock2Size =3D ((UINT64)(PlatInfo->LocalDdrSize - NEOVERSEN1SOC_DRAM_BLOCK1_SIZE / SIZE_1GB) * @@ -55,6 +57,24 @@ ArmPlatformGetVirtualMemoryMap ( FixedPcdGet64 (PcdDramBlock2Base), DramBlock2Size); =20 + if (PlatInfo->MultichipMode =3D=3D 1) { + RemoteDdrSize =3D ((PlatInfo->RemoteDdrSize - 2) * SIZE_1GB); + + BuildResourceDescriptorHob ( + EFI_RESOURCE_SYSTEM_MEMORY, + ResourceAttributes, + FixedPcdGet64 (PcdExtMemorySpace) + FixedPcdGet64 (PcdSystemMemoryBa= se), + PcdGet64 (PcdSystemMemorySize) + ); + + BuildResourceDescriptorHob ( + EFI_RESOURCE_SYSTEM_MEMORY, + ResourceAttributes, + FixedPcdGet64 (PcdExtMemorySpace) + FixedPcdGet64 (PcdDramBlock2Base= ), + RemoteDdrSize + ); + } + ASSERT (VirtualMemoryMap !=3D NULL); Index =3D 0; =20 @@ -114,6 +134,32 @@ ArmPlatformGetVirtualMemoryMap ( VirtualMemoryTable[Index].Length =3D PcdGet64 (PcdPcieMmio64Siz= e); VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUT= E_DEVICE; =20 + // CCIX RC Configuration Space + VirtualMemoryTable[++Index].PhysicalBase =3D PcdGet32 (PcdCcixRootPortC= onfigBaseAddress); + VirtualMemoryTable[Index].VirtualBase =3D PcdGet32 (PcdCcixRootPortC= onfigBaseAddress); + VirtualMemoryTable[Index].Length =3D PcdGet32 (PcdCcixRootPortC= onfigBaseSize); + VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUT= E_DEVICE; + + // CCIX ECAM Configuration Space + VirtualMemoryTable[++Index].PhysicalBase =3D PcdGet32 (PcdCcixExpressBa= seAddress); + VirtualMemoryTable[Index].VirtualBase =3D PcdGet32 (PcdCcixExpressBa= seAddress); + VirtualMemoryTable[Index].Length =3D (FixedPcdGet32 (PcdCcixBus= Max) - + FixedPcdGet32 (PcdCcixBusMi= n) + 1) * + SIZE_1MB; + VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUT= E_DEVICE; + + // CCIX MMIO32 Memory Space + VirtualMemoryTable[++Index].PhysicalBase =3D PcdGet32 (PcdCcixMmio32Bas= e); + VirtualMemoryTable[Index].VirtualBase =3D PcdGet32 (PcdCcixMmio32Bas= e); + VirtualMemoryTable[Index].Length =3D PcdGet32 (PcdCcixMmio32Siz= e); + VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUT= E_DEVICE; + + // CCIX MMIO64 Memory Space + VirtualMemoryTable[++Index].PhysicalBase =3D PcdGet64 (PcdCcixMmio64Bas= e); + VirtualMemoryTable[Index].VirtualBase =3D PcdGet64 (PcdCcixMmio64Bas= e); + VirtualMemoryTable[Index].Length =3D PcdGet64 (PcdCcixMmio64Siz= e); + VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUT= E_DEVICE; + // SubSystem Pheripherals - UART0 VirtualMemoryTable[++Index].PhysicalBase =3D NEOVERSEN1SOC_UART0_BASE; VirtualMemoryTable[Index].VirtualBase =3D NEOVERSEN1SOC_UART0_BASE; @@ -138,6 +184,24 @@ ArmPlatformGetVirtualMemoryMap ( VirtualMemoryTable[Index].Length =3D NEOVERSEN1SOC_EXP_PERIPH_B= ASE0_SZ; VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUT= E_DEVICE; =20 + if (PlatInfo->MultichipMode =3D=3D 1) { + //Remote DDR (2GB) + VirtualMemoryTable[++Index].PhysicalBase =3D PcdGet64 (PcdExtMemorySp= ace) + + PcdGet64 (PcdSystemMemoryB= ase); + VirtualMemoryTable[Index].VirtualBase =3D PcdGet64 (PcdExtMemorySp= ace) + + PcdGet64 (PcdSystemMemoryB= ase); + VirtualMemoryTable[Index].Length =3D PcdGet64 (PcdSystemMemor= ySize); + VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIB= UTE_WRITE_THROUGH; + + //Remote DDR + VirtualMemoryTable[++Index].PhysicalBase =3D PcdGet64 (PcdExtMemorySp= ace) + + PcdGet64 (PcdDramBlock2Bas= e); + VirtualMemoryTable[Index].VirtualBase =3D PcdGet64 (PcdExtMemorySp= ace) + + PcdGet64 (PcdDramBlock2Bas= e); + VirtualMemoryTable[Index].Length =3D RemoteDdrSize; + VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIB= UTE_WRITE_THROUGH; + } + // End of Table VirtualMemoryTable[++Index].PhysicalBase =3D 0; VirtualMemoryTable[Index].VirtualBase =3D 0; diff --git a/Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec b/Silicon/ARM/Neov= erseN1Soc/NeoverseN1Soc.dec index 54b793a937..eea2d58402 100644 --- a/Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec +++ b/Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec @@ -1,5 +1,7 @@ +## @file +# Describes the entire platform configuration. # -# Copyright (c) 2018 - 2020, ARM Limited. All rights reserved. +# Copyright (c) 2018 - 2021, ARM Limited. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -33,8 +35,8 @@ gArmNeoverseN1SocTokenSpaceGuid.PcdPcieBusMax|17|UINT32|0x00000005 gArmNeoverseN1SocTokenSpaceGuid.PcdPcieBusMin|0|UINT32|0x00000006 gArmNeoverseN1SocTokenSpaceGuid.PcdPcieIoBase|0x0|UINT32|0x00000007 - gArmNeoverseN1SocTokenSpaceGuid.PcdPcieIoMaxBase|0x00FFFFFF|UINT32|0x000= 00008 - gArmNeoverseN1SocTokenSpaceGuid.PcdPcieIoSize|0x01000000|UINT32|0x000000= 09 + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieIoMaxBase|0x001FFFF|UINT32|0x0000= 0008 + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieIoSize|0x020000|UINT32|0x00000009 gArmNeoverseN1SocTokenSpaceGuid.PcdPcieIoTranslation|0x75200000|UINT32|0= x0000000A gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio32Base|0x71200000|UINT32|0x00= 00000B gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio32MaxBase|0x751FFFFF|UINT32|0= x0000000C @@ -44,3 +46,30 @@ gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio64MaxBase|0x28FFFFFFFF|UINT64= |0x00000010 gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio64Size|0x2000000000|UINT64|0x= 00000011 gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio64Translation|0x0|UINT64|0x00= 000012 + + # CCIX + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixBusCount|18|UINT32|0x00000016 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixBusMax|17|UINT32|0x00000017 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixBusMin|0|UINT32|0x00000018 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixExpressBaseAddress|0x68000000|UIN= T32|0x00000019 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixIoBase|0x0|UINT32|0x0000001A + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixIoMaxBase|0x01FFFF|UINT32|0x00000= 01B + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixIoSize|0x020000|UINT32|0x0000001C + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixIoTranslation|0x6D200000|UINT32|0= x00000001D + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio32Base|0x69200000|UINT32|0x00= 00001E + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio32MaxBase|0x6D1FFFFF|UINT32|0= x00000001F + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio32Size|0x04000000|UINT32|0x00= 000020 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio32Translation|0x0|UINT32|0x00= 000021 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio64Base|0x2900000000|UINT64|0x= 00000022 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio64MaxBase|0x48FFFFFFFF|UINT64= |0x00000023 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio64Size|0x2000000000|UINT64|0x= 00000024 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio64Translation|0x0|UINT64|0x00= 000025 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixRootPortConfigBaseAddress|0x62000= 000|UINT32|0x00000026 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixRootPortConfigBaseSize|0x00001000= |UINT32|0x00000027 + + gArmNeoverseN1SocTokenSpaceGuid.PcdExtMemorySpace|0x40000000000|UINT64|0= x00000029 + + # Remote Chip PCIe + gArmNeoverseN1SocTokenSpaceGuid.PcdRemotePcieIoTranslation|0x40075200000= |UINT64|0x0000004A + gArmNeoverseN1SocTokenSpaceGuid.PcdRemotePcieMmio32Translation|0x4000000= 0000|UINT64|0x0000004B + gArmNeoverseN1SocTokenSpaceGuid.PcdRemotePcieMmio64Translation|0x4000000= 0000|UINT64|0x0000004C --=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 (#81727): https://edk2.groups.io/g/devel/message/81727 Mute This Topic: https://groups.io/mt/86219906/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 Sat Apr 27 03:40:23 2024 Delivered-To: importer@patchew.org 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+81728+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 163389067315124.08165499899269; Sun, 10 Oct 2021 11:31:13 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id and6YY1788612x93HJYN8oUe; Sun, 10 Oct 2021 11:31:12 -0700 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.53]) by mx.groups.io with SMTP id smtpd.web09.1731.1633890671781425176 for ; Sun, 10 Oct 2021 11:31:12 -0700 X-Received: from DB3PR08CA0006.eurprd08.prod.outlook.com (2603:10a6:8::19) by DB6PR0801MB1992.eurprd08.prod.outlook.com (2603:10a6:4:76::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.20; Sun, 10 Oct 2021 18:31:08 +0000 X-Received: from DB5EUR03FT059.eop-EUR03.prod.protection.outlook.com (2603:10a6:8:0:cafe::15) by DB3PR08CA0006.outlook.office365.com (2603:10a6:8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.25 via Frontend Transport; Sun, 10 Oct 2021 18:31:08 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81728+1787277+3901457@groups.io; helo=mail02.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT059.mail.protection.outlook.com (10.152.21.175) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Sun, 10 Oct 2021 18:31:08 +0000 X-Received: ("Tessian outbound e27daf245730:v103"); Sun, 10 Oct 2021 18:31:08 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2edb2e80537d8cc1 X-CR-MTA-TID: 64aa7808 X-Received: from bffac5d04ef5.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5A725E87-CEE1-4EAE-BD1A-A1B1F5914569.1; Sun, 10 Oct 2021 18:31:01 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id bffac5d04ef5.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sun, 10 Oct 2021 18:31:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OTn51PXoRpsy8bfp1ErRX2Cai0Uc5qajVKwwefiPbwTIhCibezNRaqgZJBdaDSuiMovC6Do0YH5mKhqp/U0ifB87Sma502pZ04V+t5wAYmx+VaXaHChLTBkie/9uWWcWWH65XdAUDw4w+mx2deRRQX76Zm5XuUuB85bBScLSZd5YtIrwpeYf8CZ3ssP4ODM8MmeIrNIiHxT342bYp7tFPScqu9UB0Oi5j+FKFcp/Yqcdx/8lXiYYIIZkEmsYCHL9Y0rhBWJKVV1iapleg7J038hUHPvrjbQsQ1EeyMQ2tJzUgclwzcuB2sIWqS7dS3VclUz4TTfk1h+Tjr8coE+O+w== 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=0lsRbNa/Csk3sqZwpskl186vjzzP4NV6V+ZruPfpak8=; b=KzNP6FMH42is/uTjV5azAiDTNpw1E49XEWQ9Cld43lf6tEpviKMzUHLBuQlLonCWYox2xOInAmOnOW29wY1GuqrzgvAyvoI1LTvTeLiYBokaIHN8vSoGqgOo1HF+vqD1XwZVinHZNmZ1cGNhgm0UGWsIM5teUD0cP0c1GDL/tcVHx/1aZh9jjoVC6YN5f2JlhbqKdCBv+g7pa/0ogsfTYI0n3FBdWNTMFnPkdnP2pxv+cetgQ/FCR5bTrvtkmCIqCSlM1jhQBkdDUnVwqd6sVpQb7vu8d5HHeAeQb8kI9Xw6riSVNSxlpvrbw3WSqW5bl91CAAvcVdKJebR6FRYccw== 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 Authentication-Results-Original: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; X-Received: from PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) by PAXPR08MB6542.eurprd08.prod.outlook.com (2603:10a6:102:158::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Sun, 10 Oct 2021 18:31:00 +0000 X-Received: from PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::e5a7:9474:4463:d258]) by PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::e5a7:9474:4463:d258%2]) with mapi id 15.20.4587.025; Sun, 10 Oct 2021 18:31:00 +0000 From: "Khasim Mohammed" To: devel@edk2.groups.io Cc: nd@arm.com, Khasim Syed Mohammed , Deepak Pandey Subject: [edk2-devel] [PATCH v2 3/7] Platform/ARM/N1Sdp: Introduce platform DXE driver Date: Sun, 10 Oct 2021 23:59:52 +0530 Message-Id: <20211010182956.13526-4-khasim.mohammed@arm.com> In-Reply-To: <20211010182956.13526-1-khasim.mohammed@arm.com> References: <20211010182956.13526-1-khasim.mohammed@arm.com> X-ClientProxiedBy: LO4P123CA0392.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::19) To PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) MIME-Version: 1.0 X-Received: from e116623.arm.com (217.140.99.251) by LO4P123CA0392.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.20 via Frontend Transport; Sun, 10 Oct 2021 18:30:59 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 585916c9-557e-4e9d-79c2-08d98c1c2074 X-MS-TrafficTypeDiagnostic: PAXPR08MB6542:|DB6PR0801MB1992: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6790;OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: /N07/8pIBpy97cUPC1AVpvM78s7jV2NYkfhfB8Tzib1T4XI0hjQisbiJAhr7ZwPBNAtwlUiSchVMa5vaAB0OAMeY3h4H4zbuw828EUKa0h3JgS1jZgRoIVgAZHDMz18YWPiqz1L20zr5UzyTktTGKnRemyUCkzRlMCqfu4xSGAZNBU+AIYrhzQxC52QlO/rNH9DaPXdXWJFJcmE8Z5nbLT+CJ+IDLHhKH7A26PxWuk3isEQCnlPBo5erW2sw2kyDQzOkkqw39apw3bOKUXwCFea7umqRRW/RIk/LD4nJHb4EjWrWnMEwGvQqgE/PwPuyXqZ/iuWsjLsNrXs8S9rGsuhj76cGn2aGGSzYHb8/UbdWJ3HGhllKaqHsNq82gr9NLLhAf79hp2U4tE5bsdE83xm6/EqoSAsesRBGM/hoFgNzfTbw2UhLrfVJ4O8eXqFLEz66QlAdq+KXrfP/QqoB8Kd51BjvgQCIsjQ4xLZgZ0YDwFJNDBSmKMbwsauc6ywa665Icdi10SqUh3TsNH7DnGwo1v/8JD3Bw10RGIoHhfedj0OIgc+I4pB1s/XvV8GrA+ajTpVmqAMUJbuPQtUXSId7H8fEowcuCJuCwPVysqi1w7fTkgis8KxVhoeUP+fdoy6jgppusgevnxjoyIetD9iS0JXWAh7IrYwXMGgYP2ZknG2oYToEGkaasJz6V3+kriT+s0Vs0wdrvqt0nN4zIg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA4PR08MB5902.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(1076003)(83380400001)(6666004)(8676002)(8936002)(956004)(2616005)(6486002)(5660300002)(26005)(38100700002)(38350700002)(66946007)(316002)(54906003)(36756003)(7696005)(186003)(52116002)(66556008)(66476007)(19627235002)(86362001)(2906002)(6916009)(508600001)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6542 Original-Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT059.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 81c3faea-9ecc-4755-7bb7-08d98c1c1b96 X-Microsoft-Antispam-Message-Info: rWfZaOI3Ye2CdLANwyzFMEZobRHigoQ2mEO1tC4SlGj5YspWWJysxmeWeholM8yT5Qn98uF9GLrd+ubf/YDvPwhapsQ6mVGQemMFp31j/e+DpDRD8JjnZ5/wuXc4wtTuF4dBcb1i5n1F3OiA7JxhlNTD9f/ZQ815uzO8VdHyARk/uPYOtVT/9ZyqSoGaErkMwnNCiZr2QqwEQn50YXJaBPhvWossy0VaCIEBoJnN1Zhbm3whVtyC5QX+iwV1wIImfQwBhiDnCABS8ae/fslFogaLV2uBEm736rKUYaO99nxSI4EPXBNWvgqfOqGcEY1x+ZZBrVvZpjnrnjThwGHuQAVpDUWF6lyJCPNHEqaHYYoz9oRlh3pbBWrSpxzpYaoVQujWl0yMkY3VsMeO1fTXs4PEboOk4dPig3QugV6xDlExdhTy7BzsWDFh3kKuv+nf0Yu1K7OsKXKmgYNkGvoKcoswSH02lYE07mOXJatxMA0H5BX7dfpyvHwqENNZNhgynZTkw8tK1V6tcdkAHoNC+3E7qetNkt+T6uIm8oj0WC0+S3KBETg+d6IXiHTqVAq07xWy2ujBfhq6wyYDBEXfb7YOvTZlJm2wWkTIv0161u4gKiE6spcA4t9hyORu/rbSWKx6WCg6L4Fn0Q66OPNqp3sJ6NxglBrCPZRf7g0ALK/cVN3H1aiD767XKiwV/R2nCiBW23T0mxiFpAR2F3qCVw== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2021 18:31:08.1038 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 585916c9-557e-4e9d-79c2-08d98c1c2074 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: DB5EUR03FT059.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1992 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,khasim.mohammed@arm.com X-Gm-Message-State: EDIS0xKU5M8fdwMmGGXkjPYix1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1633890672; bh=9ehASEAgt8YVfcBGtxkQQUhsuLM0y7LBlxL7khB6nVk=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=GwtFjNZIjFgfhXGYRUEsEOS8kuXVQLeBKTfU+k60mkNZJV6++AEhN5C407i2HfhK5Um zplaTj72HKqZ8K09xUwZ0XaR154AKeFxbmFXq3JQb0k+gXIfYCrRTiLSYZp3xtrZ6o4nD VO3RRUw+zVDamc6E5rH0rJydCEPZD7bRdp8= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1633890674770100002 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add an initial platform DXE driver and support for ramdisk devices. Signed-off-by: Deepak Pandey Signed-off-by: Khasim Syed Mohammed --- .../N1Sdp/Drivers/PlatformDxe/PlatformDxe.c | 51 +++++++++++++++++++ .../N1Sdp/Drivers/PlatformDxe/PlatformDxe.inf | 44 ++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.c create mode 100644 Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.inf diff --git a/Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.c b/Platfor= m/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.c new file mode 100644 index 0000000000..3abe2228ad --- /dev/null +++ b/Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.c @@ -0,0 +1,51 @@ +/** @file + + Copyright (c) 2021, ARM Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include + +/** + Entrypoint of Platform Dxe Driver + + @param ImageHandle[in] The firmware allocated handle for the EFI = image. + @param SystemTable[in] A pointer to the EFI System Table. + + @retval EFI_SUCCESS The entry point is executed successfully. +**/ +EFI_STATUS +EFIAPI +ArmN1SdpEntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + EFI_RAM_DISK_PROTOCOL *RamDisk; + EFI_DEVICE_PATH_PROTOCOL *DevicePath; + + Status =3D EFI_UNSUPPORTED; + if (FeaturePcdGet (PcdRamDiskSupported)) { + Status =3D gBS->LocateProtocol (&gEfiRamDiskProtocolGuid, NULL, (VOID*= *) &RamDisk); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: Couldn't find the RAM Disk protocol - %r\n= ", __FUNCTION__, Status)); + return Status; + } + + Status =3D RamDisk->Register ( + (UINTN)PcdGet32 (PcdRamDiskBase), + (UINTN)PcdGet32 (PcdRamDiskSize), + &gEfiVirtualCdGuid, + NULL, + &DevicePath); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: Failed to register RAM Disk - %r\n", __FUN= CTION__, Status)); + } + } + return Status; +} diff --git a/Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.inf b/Platf= orm/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.inf new file mode 100644 index 0000000000..925bde4063 --- /dev/null +++ b/Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.inf @@ -0,0 +1,44 @@ +## @file +# Platform DXE driver for N1Sdp +# +# Copyright (c) 2021, ARM Limited. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001B + BASE_NAME =3D PlatformDxe + FILE_GUID =3D 11fc8b5a-377d-47a8-aee9-0093d3d3407f + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + ENTRY_POINT =3D ArmN1SdpEntryPoint + +[Sources.common] + PlatformDxe.c + +[Packages] + ArmPkg/ArmPkg.dec + ArmPlatformPkg/ArmPlatformPkg.dec + EmbeddedPkg/EmbeddedPkg.dec + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + Platform/ARM/N1Sdp/N1SdpPlatform.dec + +[LibraryClasses] + HobLib + UefiDriverEntryPoint + +[Protocols] + gEfiRamDiskProtocolGuid + +[FeaturePcd] + gArmN1SdpTokenSpaceGuid.PcdRamDiskSupported + +[FixedPcd] + gArmN1SdpTokenSpaceGuid.PcdRamDiskBase + gArmN1SdpTokenSpaceGuid.PcdRamDiskSize + +[Depex] + gEfiRamDiskProtocolGuid --=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 (#81728): https://edk2.groups.io/g/devel/message/81728 Mute This Topic: https://groups.io/mt/86219908/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 Sat Apr 27 03:40:23 2024 Delivered-To: importer@patchew.org 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+81729+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1633890689357874.5225247653925; Sun, 10 Oct 2021 11:31:29 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id u65vYY1788612xJttRet6o8E; Sun, 10 Oct 2021 11:31:29 -0700 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.45]) by mx.groups.io with SMTP id smtpd.web08.1652.1633890687598288471 for ; Sun, 10 Oct 2021 11:31:28 -0700 X-Received: from AS8PR04CA0095.eurprd04.prod.outlook.com (2603:10a6:20b:31e::10) by VI1PR08MB3549.eurprd08.prod.outlook.com (2603:10a6:803:89::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Sun, 10 Oct 2021 18:31:23 +0000 X-Received: from VE1EUR03FT062.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:31e:cafe::f) by AS8PR04CA0095.outlook.office365.com (2603:10a6:20b:31e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.24 via Frontend Transport; Sun, 10 Oct 2021 18:31: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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81729+1787277+3901457@groups.io; helo=mail02.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT062.mail.protection.outlook.com (10.152.18.252) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Sun, 10 Oct 2021 18:31:22 +0000 X-Received: ("Tessian outbound 16951d3c485e:v103"); Sun, 10 Oct 2021 18:31:22 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 629cce301346a17f X-CR-MTA-TID: 64aa7808 X-Received: from 5691fc01cd10.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 41464BC8-0CFA-4448-95F0-4A57ECA3DACA.1; Sun, 10 Oct 2021 18:31:14 +0000 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5691fc01cd10.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sun, 10 Oct 2021 18:31:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ADYyWGxEJrvuaRiRl1Znic7Njvj7f6g76RFNMQygJSzDu9jX1+9O5bPy/eNLxEF7prOnlX8r1CCs8GSewGIdOtk8yNAPoVmG7ecz1uwSMpkgp/uTF2d6d9fLcfUGc1a/Mf9bVU292aDw9br48FpdBIx1z2iaRAL4QRXDBO/LhenpF1K+sXNzkCrBG+7PnMSP8BcaqYgD+2SMcDDVVIonD3phtxneJ6UBfYwbdqSdULZbh3YmTnn9a+lr6HVHvfzw8a+9bMZrz2BNvNT4xODHGwr3eVJ/pgDSkR8OeDgAuy/Fe+Shs6D80um1B+uWvzOknQb/p8iiUSe02HUBK64+CA== 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=AzxORUQiyiMZXyma12uSiYOqga0iz0C8RI2NZNFm700=; b=I5XI8vE5lWJrX1uFDhgP9l0XFB+xlo7dFfiCRKogWw27wpWp+Aihl06sn9iOW8GjNvQZ+eubxY8A0szsDZYwOOhBUDG2wRwgKTc1SKfQ+LDau3OwQyzED534YbwUpDwnNnK9zGDWENNQm1jyw7Q24oIrekNSzlMOzcB4RHSjsNc6P9VOAw/gS6rAZjD6wWbZhKxDlPjagAewvH8x2J67cCkMbetUVS55l4QOntdO6//NkIN7F9D+sBRIduDzBg9Z8/swV3shgdlvznez8WFfEjJlgHutmvjfRyJtMyAap+fa4O9WugCojD4J9h8qn24LWOdd+NHvWIU9i0EPuXdrDA== 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 Authentication-Results-Original: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; X-Received: from PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) by PA4PR08MB6288.eurprd08.prod.outlook.com (2603:10a6:102:f3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Sun, 10 Oct 2021 18:31:04 +0000 X-Received: from PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::e5a7:9474:4463:d258]) by PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::e5a7:9474:4463:d258%2]) with mapi id 15.20.4587.025; Sun, 10 Oct 2021 18:31:04 +0000 From: "Khasim Mohammed" To: devel@edk2.groups.io Cc: nd@arm.com, Khasim Syed Mohammed , Deepak Pandey Subject: [edk2-devel] [PATCH v2 4/7] Platform/ARM/N1Sdp: Enable N1Sdp platform specific configurations Date: Sun, 10 Oct 2021 23:59:53 +0530 Message-Id: <20211010182956.13526-5-khasim.mohammed@arm.com> In-Reply-To: <20211010182956.13526-1-khasim.mohammed@arm.com> References: <20211010182956.13526-1-khasim.mohammed@arm.com> X-ClientProxiedBy: LO4P123CA0392.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::19) To PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) MIME-Version: 1.0 X-Received: from e116623.arm.com (217.140.99.251) by LO4P123CA0392.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.20 via Frontend Transport; Sun, 10 Oct 2021 18:31:03 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 43c9123d-b9be-4565-93f3-08d98c1c294e X-MS-TrafficTypeDiagnostic: PA4PR08MB6288:|VI1PR08MB3549: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:935;OLM:935; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: YWDHx0GnkjkU1QGq/s4I7gAXi2rTVvqFBxtp6i8ipelzEDpci9Yo04VtC88NTt2mfcVgTD3nE31Bf8mzs1ja+8hgvLEgKCz607DZFm7cI2mQlthVV8MaOuEsMWp63itji6A/E7EBUx62yRMjJ+nK947EphkncBm4WsKGdw4laV+2OF1nzjcSTFdOSabZFYAOalnfNToNQXIV7217GP6zira8tA9KsMIbTaFHaSJOKPKdSPw2MX2W+UYaS+fjlUsdvh/gXNvzeT6DFKZXm9ZIAQ6JnHeQwnXmj84ushqwllRjdDTc4e69YzfAJ13BFfmsPD0Jn+oeuKJ6PHEgAm0ZAFtnxJTiJu2kjPPypa9hQ6OVus2Bu5SAAt3B9TP8mfomJyCC5fbI48BsqqXgmpxt/M5RdwheeyWIo2c9aqE+Gxs3LMut0LLKg7B8YkFCAPhrMNTVngg1UmTEV1STzJZ1rcZhZitohCMbRudVGIxS5x/4TvQdmtiUYfpdG0i+7zBOmZrNklXy6btOKWhVoDfpctcpigb4rbxty6DnjZ9mGz3EDvsOUmIMwlSju34rYM4qaTOW6axzx7D9kEmmlrAPNaVgvLlLtMpHlNl2e5i+MHf43nqhvweMh3++1bWxBrLcjpFxtfs0o/81UDUhnwl9cREno0SzlyxqQTEbOYnkGB14gDYeejzqAulNyEh2PXb/N42nBBIXh6IOw+jptI+5p8hL2xT3PxAvHoNmdsRNqBA= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA4PR08MB5902.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(6666004)(66946007)(508600001)(6916009)(5660300002)(2616005)(956004)(86362001)(83380400001)(66476007)(66556008)(36756003)(6486002)(2906002)(1076003)(19627235002)(52116002)(7696005)(4326008)(26005)(38350700002)(38100700002)(316002)(8676002)(54906003)(186003)(8936002)(32563001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6288 Original-Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT062.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 6ff4b4e3-ea8a-4cbc-0191-08d98c1c1e21 X-Microsoft-Antispam-Message-Info: 7wi8clM9hrq1eyWh5MC6HzNH4L3EFI5dVswRD9I3u2JJjWNsTiGRUXVUreJW5mP4okTMIL8kUZgYRXpxP2nUpR/+mYW5LJG99pfRYFFQJ20yTfAAOjWHoFR2I0n1iaQz0yKecWc02cPRPnydYuq+nrmNocp3obrnLZXc1IKSUX3utvwNtz513SDMYEK4cvOSZFIUCzRIfmXXtxbzxnr+D2zWr0kMBYT8CcFmgcsMNbMvudds8+PC7BAFrsvXBykSphMs5MK9+bjNlEhEX7AB80VlcSGjPngTr1csXZoAHr7XuBoOYCmg0jIBS9m/7RzuK6W7OnjeErcOkdV9no5FPFT/8+nTY5x+qk82bnQKZa5tEwH5x/islEhUmsNzbiJ+GvvPX64HC7bcHsDGHn7yIogoGt1wWCHYtXCJNeCmUoeiTTQtspXy8GF0mtwwiEjDpNntjBhH3d3510WOig1gO8+oaz7Crw/EJdc7KcHnSJ9iO2anRzdzR6pNJ/HzETKdpkQb/W17HfaxMPoCwA/MTyND80gt6zq9XRQPJcYHPaIwqmi8ATEqci/XhCwew6aCbhinjwec8erWJjKQo9WfPoPkl2wRYfyNIUvNWkgrD7oNefJ0naXFUWo+T6gNMDd9WXygiiuAD8rjVF6qxjiCIEVzNZ5PnCbPpLx5N2ssL2l2czVvh+DVmDRSokP8TMAKJtEfvWcauYKf60Fj+l4p1vkTQFGhWv5qscReRIst21U= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2021 18:31:22.8264 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 43c9123d-b9be-4565-93f3-08d98c1c294e 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: VE1EUR03FT062.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3549 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,khasim.mohammed@arm.com X-Gm-Message-State: phmZnYqOFqgjY9IxmP3kpuFfx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1633890689; bh=j4xsf+VdbMgWrTugzu0SUj9oWTyCBMr8mVfzzm6ZoBk=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=Kiue9rw13vGxWVU2F66DHbEsAmtiOf6ipcphUzmUUqVH+kAhqEsybsh9PU5wkxI0x1S EcVTsxVFrfEiafdhkmazDjD0ZWlhHA5eWv2+afQQyHVqs5iXegbH7gMVZCeRFvLia4xYO BUTRKbrl+9o+cw8U/1Y03z1NeuNllNVndBs= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1633890690046100002 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This patch adds PCDs and updates the fdf file for N1Sdp platform specific configurations. Signed-off-by: Deepak Pandey Signed-off-by: Khasim Syed Mohammed --- Platform/ARM/N1Sdp/N1SdpPlatform.dec | 98 ++++++++++++++++++++++++++++ Platform/ARM/N1Sdp/N1SdpPlatform.dsc | 28 +++++++- Platform/ARM/N1Sdp/N1SdpPlatform.fdf | 13 +++- 3 files changed, 136 insertions(+), 3 deletions(-) create mode 100644 Platform/ARM/N1Sdp/N1SdpPlatform.dec diff --git a/Platform/ARM/N1Sdp/N1SdpPlatform.dec b/Platform/ARM/N1Sdp/N1Sd= pPlatform.dec new file mode 100644 index 0000000000..d56891b985 --- /dev/null +++ b/Platform/ARM/N1Sdp/N1SdpPlatform.dec @@ -0,0 +1,98 @@ +## @file +# Describes the N1Sdp configuration. +# +# Copyright (c) 2021, ARM Limited. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +[Defines] + DEC_SPECIFICATION =3D 0x0001001A + PACKAGE_NAME =3D N1SdpPlatform + PACKAGE_GUID =3D 29aacb23-61e8-4fe2-8a06-793537cd26e9 + PACKAGE_VERSION =3D 0.1 + +##########################################################################= ###### +# +# Include Section - list of Include Paths that are provided by this packag= e. +# Comments are used for Keywords and Module Types. +# +# Supported Module Types: +# BASE SEC PEI_CORE PEIM DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_D= RIVER DXE_SAL_DRIVER UEFI_DRIVER UEFI_APPLICATION +# +##########################################################################= ###### +[Includes.common] + +[LibraryClasses] + ArmPlatformLib|Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib= .inf + +[Guids.common] + gArmN1SdpTokenSpaceGuid =3D { 0xd8f1624a, 0x98c1, 0x4f64, { 0xa6, 0x41,= 0x19, 0x5e, 0xb5, 0x3b, 0x26, 0x0f } } + +[PcdsFixedAtBuild] + gArmN1SdpTokenSpaceGuid.PcdRamDiskBase|0x88000000|UINT32|0x00000001 + gArmN1SdpTokenSpaceGuid.PcdRamDiskSize|0x18000000|UINT32|0x00000002 + + # PCIe + gArmN1SdpTokenSpaceGuid.PcdPcieExpressBaseAddress|0x70000000|UINT32|0x00= 000007 + + # External memory + gArmNeoverseN1SocTokenSpaceGuid.PcdExtMemorySpace|0|UINT64|0x00000029 + +[PcdsFeatureFlag.common] + gArmN1SdpTokenSpaceGuid.PcdRamDiskSupported|FALSE|BOOLEAN|0x00000003 + +[PcdsFixedAtBuild.common] + # CoreSight Debug and Trace components + # CoreSight ETMs + gArmN1SdpTokenSpaceGuid.PcdCsEtm0Base|0x402040000|UINT64|0x0000002D + gArmN1SdpTokenSpaceGuid.PcdCsEtm0MaxBase|0x402040FFF|UINT64|0x0000002E + gArmN1SdpTokenSpaceGuid.PcdCsEtm1Base|0x402140000|UINT64|0x0000002F + gArmN1SdpTokenSpaceGuid.PcdCsEtm1MaxBase|0x402140FFF|UINT64|0x00000030 + gArmN1SdpTokenSpaceGuid.PcdCsEtm2Base|0x403040000|UINT64|0x00000031 + gArmN1SdpTokenSpaceGuid.PcdCsEtm2MaxBase|0x403040FFF|UINT64|0x00000032 + gArmN1SdpTokenSpaceGuid.PcdCsEtm3Base|0x403140000|UINT64|0x00000033 + gArmN1SdpTokenSpaceGuid.PcdCsEtm3MaxBase|0x403140FFF|UINT64|0x00000034 + + # CoreSight TMC (ETRs/ETFs/ETBs) + gArmN1SdpTokenSpaceGuid.PcdCsEtf0Base|0x400410000|UINT64|0x00000035 + gArmN1SdpTokenSpaceGuid.PcdCsEtf0MaxBase|0x400410FFF|UINT64|0x00000036 + gArmN1SdpTokenSpaceGuid.PcdCsEtf1Base|0x400420000|UINT64|0x00000037 + gArmN1SdpTokenSpaceGuid.PcdCsEtf1MaxBase|0x400420FFF|UINT64|0x00000038 + gArmN1SdpTokenSpaceGuid.PcdCsEtf2Base|0x400010000|UINT64|0x00000039 + gArmN1SdpTokenSpaceGuid.PcdCsEtf2MaxBase|0x400010FFF|UINT64|0x0000003A + gArmN1SdpTokenSpaceGuid.PcdCsEtrBase|0x400120000|UINT64|0x00000043 + gArmN1SdpTokenSpaceGuid.PcdCsEtrMaxBase|0x400120FFF|UINT64|0x00000044 + + # CoreSight Dynamic Funnel(s) + gArmN1SdpTokenSpaceGuid.PcdCsFunnel0Base|0x4000B0000|UINT64|0x0000003B + gArmN1SdpTokenSpaceGuid.PcdCsFunnel0MaxBase|0x4000B0FFF|UINT64|0x0000003C + gArmN1SdpTokenSpaceGuid.PcdCsFunnel1Base|0x4000A0000|UINT64|0x0000003D + gArmN1SdpTokenSpaceGuid.PcdCsFunnel1MaxBase|0x4000A0FFF|UINT64|0x0000003E + + # CoreSight Dynamic Replicator(s) + gArmN1SdpTokenSpaceGuid.PcdCsReplicatorBase|0x400110000|UINT64|0x0000003F + gArmN1SdpTokenSpaceGuid.PcdCsReplicatorMaxBase|0x400110FFF|UINT64|0x0000= 0040 + + # CoreSight TPIU + gArmN1SdpTokenSpaceGuid.PcdCsTpiuBase|0x400130000|UINT64|0x00000041 + gArmN1SdpTokenSpaceGuid.PcdCsTpiuMaxBase|0x400130FFF|UINT64|0x00000042 + + # CoreSight STM and STM Stimulus + gArmN1SdpTokenSpaceGuid.PcdCsStmBase|0x400800000|UINT64|0x00000045 + gArmN1SdpTokenSpaceGuid.PcdCsStmMaxBase|0x400800FFF|UINT64|0x00000046 + gArmN1SdpTokenSpaceGuid.PcdCsStmStimulusBase|0x4D000000|UINT32|0x00000047 + gArmN1SdpTokenSpaceGuid.PcdCsStmStimulusSize|0x1000000|UINT32|0x00000048 + + # CoreSight Components' Size + # + # Newton TRMs specify the size for these coresight components as 64K. + # The actual size is just 4K though 64K is reserved. Access to the + # unmapped reserved region results in a DECERR response. + # + gArmN1SdpTokenSpaceGuid.PcdCsComponentSize|0x1000|UINT32|0x00000049 + + # Remote Chip PCIe + gArmN1SdpTokenSpaceGuid.PcdRemotePcieIoTranslation|0x40075200000|UINT64|= 0x0000004A + gArmN1SdpTokenSpaceGuid.PcdRemotePcieMmio32Translation|0x40000000000|UIN= T64|0x0000004B + gArmN1SdpTokenSpaceGuid.PcdRemotePcieMmio64Translation|0x40000000000|UIN= T64|0x0000004C diff --git a/Platform/ARM/N1Sdp/N1SdpPlatform.dsc b/Platform/ARM/N1Sdp/N1Sd= pPlatform.dsc index 61e7a909f8..d5ada590e1 100644 --- a/Platform/ARM/N1Sdp/N1SdpPlatform.dsc +++ b/Platform/ARM/N1Sdp/N1SdpPlatform.dsc @@ -1,8 +1,11 @@ +## @file +# Component description file specific for N1Sdp # -# Copyright (c) 2018 - 2020, ARM Limited. All rights reserved. +# Copyright (c) 2018 - 2021, ARM Limited. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # +## =20 ##########################################################################= ###### # @@ -33,6 +36,9 @@ TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf =20 + # file explorer library support + FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf + [LibraryClasses.common.SEC] HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAlloc= ationLib.inf @@ -71,6 +77,9 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf +!if $(TARGET) !=3D RELEASE + DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibS= erialPort.inf +!endif =20 [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION= , LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_DRIVE= R] PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf @@ -82,11 +91,16 @@ ##########################################################################= ###### =20 [PcdsFeatureFlag.common] + gArmN1SdpTokenSpaceGuid.PcdRamDiskSupported|TRUE gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE =20 [PcdsFixedAtBuild.common] gArmTokenSpaceGuid.PcdVFPEnabled|1 =20 + # RAM Disk + gArmN1SdpTokenSpaceGuid.PcdRamDiskBase|0x88000000 + gArmN1SdpTokenSpaceGuid.PcdRamDiskSize|0x18000000 + # Stacks for MPCores in Normal World gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0x80000000 gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x40000 @@ -99,6 +113,9 @@ # Secondary DDR memory gArmNeoverseN1SocTokenSpaceGuid.PcdDramBlock2Base|0x8080000000 =20 + # External memory + gArmNeoverseN1SocTokenSpaceGuid.PcdExtMemorySpace|0x40000000000 + # GIC Base Addresses gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x2C000000 gArmTokenSpaceGuid.PcdGicDistributorBase|0x30000000 @@ -198,6 +215,9 @@ BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf } =20 + # Platform driver + Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.inf + # Human Interface Support MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf =20 @@ -236,6 +256,9 @@ # SATA Controller MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf =20 + # NVMe boot devices + MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf + # Usb Support MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf @@ -244,3 +267,6 @@ MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDevic= eDxe.inf + + # RAM Disk + MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf diff --git a/Platform/ARM/N1Sdp/N1SdpPlatform.fdf b/Platform/ARM/N1Sdp/N1Sd= pPlatform.fdf index c4e1f7b4b8..6b097438ad 100644 --- a/Platform/ARM/N1Sdp/N1SdpPlatform.fdf +++ b/Platform/ARM/N1Sdp/N1SdpPlatform.fdf @@ -1,8 +1,10 @@ +## @file +# FDF file of N1Sdp # -# Copyright (c) 2018 - 2020, ARM Limited. All rights reserved. +# Copyright (c) 2018 - 2021, ARM Limited. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent -# +## =20 ##########################################################################= ###### # @@ -109,6 +111,9 @@ READ_LOCK_STATUS =3D TRUE # SATA Controller INF MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf =20 + # NVMe boot devices + INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf + # Usb Support INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf @@ -137,10 +142,14 @@ READ_LOCK_STATUS =3D TRUE =20 # FV FileSystem INF MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.i= nf + INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf =20 # UEFI applications INF ShellPkg/Application/Shell/Shell.inf =20 + # Platform driver + INF Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.inf + # Bds INF MdeModulePkg/Application/UiApp/UiApp.inf INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.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 (#81729): https://edk2.groups.io/g/devel/message/81729 Mute This Topic: https://groups.io/mt/86219913/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 Sat Apr 27 03:40:23 2024 Delivered-To: importer@patchew.org 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+81731+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1633890691049966.2367805699719; Sun, 10 Oct 2021 11:31:31 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id X3olYY1788612xa7sssaPjE7; Sun, 10 Oct 2021 11:31:30 -0700 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.50]) by mx.groups.io with SMTP id smtpd.web11.1745.1633890689435068223 for ; Sun, 10 Oct 2021 11:31:30 -0700 X-Received: from DB6P193CA0021.EURP193.PROD.OUTLOOK.COM (2603:10a6:6:29::31) by AM0PR08MB4610.eurprd08.prod.outlook.com (2603:10a6:208:104::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.24; Sun, 10 Oct 2021 18:31:25 +0000 X-Received: from DB5EUR03FT036.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:29:cafe::ad) by DB6P193CA0021.outlook.office365.com (2603:10a6:6:29::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.24 via Frontend Transport; Sun, 10 Oct 2021 18:31:24 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81731+1787277+3901457@groups.io; helo=mail02.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT036.mail.protection.outlook.com (10.152.20.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Sun, 10 Oct 2021 18:31:24 +0000 X-Received: ("Tessian outbound b9598e0ead92:v103"); Sun, 10 Oct 2021 18:31:24 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: bc34addbc45ff7c5 X-CR-MTA-TID: 64aa7808 X-Received: from 5691fc01cd10.4 by 64aa7808-outbound-1.mta.getcheckrecipient.com id CE2DF59D-331C-430B-A524-274C0A1D21FD.1; Sun, 10 Oct 2021 18:31:14 +0000 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5691fc01cd10.4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sun, 10 Oct 2021 18:31:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VWKXBk++qYesxI4VgQzuYsdg3CIhWg5eIZjN6s6DXmhZg8uxa/DovMieiuzLqfrXowpzVupcyjFAELcQlLVAA02QKh6cQ/72wrPlvKx6vkgYgGj0ZnwPFrc4gZ2TWViNSFyV+fyEPhc026VGIA9siltXCpqGBBhj91wp2086BYVo4i35/m7G6x0JW9xb255vJgJGHPcywe5oEmBmzhqc06WtAbKgZ5KO3aN9JUYMo9VLF5pu5zCklVJg1adJ5863Q/BUMGXLkqgUwOpwOm+hGAvcOTKyh60DgMkguaRUaGRQYSLYvksVdJhRBS+jZbmwau+RtRFKcx5/sf6CxvUTqg== 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=p/i7y4czaqvYeMoHPUgXL8XpQ6/MRVkqYyLd/LJ4PoI=; b=FNEkaL8Xkf1cW2z4g4zD3yiFexiqx3U6Tp+x62/LkNeSfRftNTGVkzVNADidyhP4dnAupbvKaKaICwpnhGPrgihNDcdFbgz+ANg3Ul21PQb4t3BTcfXQbUoXuc8ypadSR68vXQZ/vHIiHxi3SwfT1FdzShWb2XFKd56p7K9hYrUqiAvmLcNonv180SLq6Xbif31nCkygG6DA1/7AqxVFsLH4UmE8XbUmCHJs+xoaf9eX1Y4noX42MboQ2mb/e+7by2iweIO1GOh0inXT+ItkZZgascYs2BrWV/ztDq4yyPtSv35O2GX3vMIUY36BmIah7d/RM/2CJHxHw0rbwNyUEA== 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 Authentication-Results-Original: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; X-Received: from PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) by PA4PR08MB6288.eurprd08.prod.outlook.com (2603:10a6:102:f3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Sun, 10 Oct 2021 18:31:06 +0000 X-Received: from PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::e5a7:9474:4463:d258]) by PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::e5a7:9474:4463:d258%2]) with mapi id 15.20.4587.025; Sun, 10 Oct 2021 18:31:06 +0000 From: "Khasim Mohammed" To: devel@edk2.groups.io Cc: nd@arm.com, Khasim Syed Mohammed , Sami Mujawar , Chandni Cherukuri , anukou01 , Manoj Kumar Subject: [edk2-devel] [PATCH v2 5/7] Platform/ARM/N1Sdp: Introduce platform specific asl tables Date: Sun, 10 Oct 2021 23:59:54 +0530 Message-Id: <20211010182956.13526-6-khasim.mohammed@arm.com> In-Reply-To: <20211010182956.13526-1-khasim.mohammed@arm.com> References: <20211010182956.13526-1-khasim.mohammed@arm.com> X-ClientProxiedBy: LO4P123CA0392.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::19) To PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) MIME-Version: 1.0 X-Received: from e116623.arm.com (217.140.99.251) by LO4P123CA0392.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.20 via Frontend Transport; Sun, 10 Oct 2021 18:31:04 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b5fcd4a6-53cb-4e29-5b54-08d98c1c2a78 X-MS-TrafficTypeDiagnostic: PA4PR08MB6288:|AM0PR08MB4610: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:3044;OLM:3044; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 6zMgM4oCV8/SUAwtGAp/crHxTROmIA+CtEbPFTSYKOYLvrU+eCdX8f97rZHfeV1zBA0h6KuzuLt+GVL3KtvVFycxTSciR6Pkm19nr68w4FPwj33DUAZGRHcw6Az82rOAYB37uHGdBO4boS6yeqmc5jD4+yrgvH5ukpe0hThoukkSxwltP2yO3MLD0yLQiE3cmeA1CmnnnkBer4fwR2jBHnjIdT7IBDy29apWkakIaEatC3KTSy62biklK5sWYJKmcahqgZND6x1JMJ3QsslzpfTom+2VWdmWaWHfk2xbjthIdgLQoe3qh2Y5fQ2cak2KT35Jb0FAWvyXhTuSpA+WB5+MzXgZf6q81ZFuvb2izXEBLtyRvA0hp/MAkczk2pkt2TXyr4aAVTwA6APo0bdiErRJ9tO4PvmnHO7pcjLgiBl3mTj6PCe5EWdvgLXdL3jFzrsIsA7tJDknsi2ovqZlwDeTwnguMgDwD5xhAf+V6NWYkB2j0xMFdjogmeSNO7jCCHvaEtmh/EayR0M0hjC8O4AV/+78KCzAOQ8psO1pfRqgSPTGMFAsaoCqjv8ErhBae4Wpga2ZXQmrFmDm8lfYIxu6KXAzZl25Rjs8YoRLFUml0svzUBseWxq6gVt6jl0/xHjpLwoXyqFNyEB9/Kv1lE4x/Y63i+LWkfd9/9vdUzfnDbtgC35V6kLTRYBaTSPvk6qZU3GAuE0to0KZtUFs8w== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA4PR08MB5902.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(6666004)(30864003)(66946007)(508600001)(6916009)(5660300002)(2616005)(956004)(86362001)(83380400001)(66476007)(66556008)(36756003)(6486002)(2906002)(1076003)(52116002)(7696005)(4326008)(26005)(38350700002)(38100700002)(316002)(8676002)(54906003)(186003)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6288 Original-Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT036.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 5a59a411-c14a-4080-8794-08d98c1c1f4b X-Microsoft-Antispam-Message-Info: 7pSM86fSYOLm3XK+UzWCk4tAQal0h1diwX/R8ZCCyxCcm7XKHoBUYcdIoJpN7j2kLWXgKqYc+vukoCdVVg5DxuScbFjGZAKzdcZqhXZ+AiYH79+tfD5aZo9Lb2X/yRXw5YdQ6Yzb+Msg3HHhI8nloSFRLqA0qVjG+iQEWz+tCgmE6Sf0Fok26+WTtLDCXpe67ki48G192DN7tmtjoxZGJKJL0Nss3p9Te32vcpprZiSnq4znDWj+5xLzCzgdvMcd1HOW8EberAY7nTRmSSoPlRx3lL4MK5fh2WGNt7fQlAZjywWy9HaTtkkTF1PZCm9+xEs0hpj9RiMWB9pLx2s2VING0CQhrunCJM6Q07VLLSmu21K8fpZH1AcE87Yv5PUOl5NIWGnHhHMQ3lf32TyhXjL0rLdHWHARL51nkm9Xn2COCBDMSnJb6iR+2tOM+n20xJ6IjhTT962zKj2YcRn5uqnRDWqg0npicVRgo/BEe2IR2T0emA0f1jnqSgtsyDDkMkYZR87Flv0SLmE8J7KcEARD3dL8E52xwFjHD4Q7SIdxzM+OxKOS1HuMRaJIGgDgkU390QUKn3X/iTkGP3w1geqyCOElMW2n7Mou8DamX9QNHImGmctdVp3UhTfMGxSXhD3icU4CpuivPyt2e1uFTwUS/f72PYO222khy6bRGpRl343PcZeWxX8V7q/TcLaIRZbNTYH39WxEEGJ/VUzsyg== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2021 18:31:24.9069 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b5fcd4a6-53cb-4e29-5b54-08d98c1c2a78 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: DB5EUR03FT036.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4610 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,khasim.mohammed@arm.com X-Gm-Message-State: bSZuKqNBlaHJaEmej4bVJ8cCx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1633890690; bh=ucongSsuaA62J0ohxEL0YOinVPGtGaUjGnMs3h/KBC4=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=rDCJCu7wpUtTNleiua6s69gefLQN3hCcOSnJWhSr3NZomboXnyf4z2A9NEKHQoqPQAQ 3USSvHWab2PKqUTWhy7am+erIkje+ROrVyOI+Q0LpYR3I7j4Vpfawi3KjUvxRNFtmkk3N +SpCjiuEyh6zvpnts2eJ6G32bmpwiEVDxHQ= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1633890691982100007 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This patch creates Dsdt.asl, SsdtPci.asl and SsdtRemotePci.asl files to provide the platform specific APCI table entries. Three PCI root ports are available on N1Sdp, PCI0 is the default root port PCI1 is the CCIX root port and PCI2 is the Remote host root port. The Remote host specific entries are defined in a separate file SsdtRemotePci.asl to avoid confusions with other PCI entries and for better readability and understanding of interfaces. Signed-off-by: Sami Mujawar Signed-off-by: Khasim Syed Mohammed Signed-off-by: Chandni Cherukuri Signed-off-by: anukou01 Signed-off-by: Manoj Kumar --- .../AslTables/Dsdt.asl | 477 ++++++++++++++++++ .../AslTables/SsdtPci.asl | 247 +++++++++ .../AslTables/SsdtRemotePci.asl | 156 ++++++ 3 files changed, 880 insertions(+) create mode 100644 Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationMa= nagerDxe/AslTables/Dsdt.asl create mode 100644 Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationMa= nagerDxe/AslTables/SsdtPci.asl create mode 100644 Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationMa= nagerDxe/AslTables/SsdtRemotePci.asl diff --git a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDx= e/AslTables/Dsdt.asl b/Platform/ARM/N1Sdp/ConfigurationManager/Configuratio= nManagerDxe/AslTables/Dsdt.asl new file mode 100644 index 0000000000..0d7dde1a73 --- /dev/null +++ b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/AslTa= bles/Dsdt.asl @@ -0,0 +1,477 @@ +/** @file + Differentiated System Description Table Fields (DSDT) + + Copyright (c) 2021, ARM Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include "N1SdpAcpiHeader.h" +#include "NeoverseN1Soc.h" + +#define ACPI_GRAPH_REV 0 +#define ACPI_GRAPH_UUID "ab02a46b-74c7-45a2-bd68-f7d344ef2153" + +#define CORESIGHT_GRAPH_UUID "3ecbc8b6-1d0e-4fb3-8107-e627f805c6cd" + +#define CS_LINK_MASTER 1 +#define CS_LINK_SLAVE 0 + +#define DSD_CS_GRAPH_BEGIN(_nports) \ + Package () { \ + 1, \ + ToUUID(CORESIGHT_GRAPH_UUID), \ + _nports, + +#define DSD_CS_GRAPH_END \ + } + +#define DSD_GRAPH_BEGIN(_nports) \ + ToUUID(ACPI_GRAPH_UUID), \ + Package() { \ + ACPI_GRAPH_REV, \ + 1, \ + DSD_CS_GRAPH_BEGIN(_nports) + +#define DSD_GRAPH_END \ + DSD_CS_GRAPH_END \ + } + +#define DSD_PORTS_BEGIN(_nports) \ + Name (_DSD, Package () { \ + DSD_GRAPH_BEGIN(_nports) + +#define DSD_PORTS_END \ + DSD_GRAPH_END \ + }) + +#define CS_PORT(_port, _rport, _rphandle, _dir) \ + Package () { _port, _rport, _rphandle, _dir} + +#define CS_INPUT_PORT(_port, _rport, _rphandle) \ + CS_PORT(_port, _rport, _rphandle, CS_LINK_SLAVE) + +#define CS_OUTPUT_PORT(_port, _rport, _rphandle) \ + CS_PORT(_port, _rport, _rphandle, CS_LINK_MASTER) + +DefinitionBlock("Dsdt.aml", "DSDT", 1, "ARMLTD", "N1Sdp", EFI_ACPI_ARM_OEM= _REVISION) { + Scope(_SB) { + Device(CP00) { // Ares-0: Cluster 0, Cpu 0 + Name(_HID, "ACPI0007") + Name(_UID, 0) + Name(_STA, 0xF) + Device(ETM0) { // ETM on Cluster0 CPU0 + Name (_HID, "ARMHC500") + Name (_CID, "ARMHC500") + Name (_CRS, ResourceTemplate() { + QWordMemory ( + ResourceProducer, + PosDecode, + MinFixed, + MaxFixed, + Cacheable, + ReadWrite, + 0x00000000, // Granularity + FixedPcdGet64 (PcdCsEtm0Base), // Min Base Addr= ess + FixedPcdGet64 (PcdCsEtm0MaxBase), // Max Base Addr= ess + 0, // Translate + FixedPcdGet32 (PcdCsComponentSize) // Length + ) + }) + DSD_PORTS_BEGIN(1) + CS_OUTPUT_PORT(0, 0, \_SB_.SFN0) + DSD_PORTS_END + } // ETM0 + } + + Device(CP01) { // Ares-1: Cluster 0, Cpu 1 + Name(_HID, "ACPI0007") + Name(_UID, 1) + Name(_STA, 0xF) + Device(ETM1) { // ETM on Cluster0 CPU1 + Name (_HID, "ARMHC500") + Name (_CID, "ARMHC500") + Name (_CRS, ResourceTemplate() { + QWordMemory ( + ResourceProducer, + PosDecode, + MinFixed, + MaxFixed, + Cacheable, + ReadWrite, + 0x00000000, // Granularity + FixedPcdGet64 (PcdCsEtm1Base), // Min Base Address + FixedPcdGet64 (PcdCsEtm1MaxBase), // Max Base Address + 0, // Translate + FixedPcdGet32 (PcdCsComponentSize) // Length + ) + }) + DSD_PORTS_BEGIN(1) + CS_OUTPUT_PORT(0, 1, \_SB_.SFN0) + DSD_PORTS_END + } // ETM1 + } + + Device(CP02) { // Ares-2: Cluster 1, Cpu 0 + Name(_HID, "ACPI0007") + Name(_UID, 2) + Name(_STA, 0xF) + Device(ETM2) { // ETM on Cluster1 CPU0 + Name (_HID, "ARMHC500") + Name (_CID, "ARMHC500") + Name (_CRS, ResourceTemplate() { + QWordMemory ( + ResourceProducer, + PosDecode, + MinFixed, + MaxFixed, + Cacheable, + ReadWrite, + 0x00000000, // Granularity + FixedPcdGet64 (PcdCsEtm2Base), // Min Base Address + FixedPcdGet64 (PcdCsEtm2MaxBase), // Max Base Address + 0, // Translate + FixedPcdGet32 (PcdCsComponentSize) // Length + ) + }) + DSD_PORTS_BEGIN(1) + CS_OUTPUT_PORT(0, 0, \_SB_.SFN1) + DSD_PORTS_END + } // ETM2 + } + + Device(CP03) { // Ares-3: Cluster 1, Cpu 1 + Name(_HID, "ACPI0007") + Name(_UID, 3) + Name(_STA, 0xF) + Device(ETM3) { // ETM on Cluster0 CPU0 + Name (_HID, "ARMHC500") + Name (_CID, "ARMHC500") + Name (_CRS, ResourceTemplate() { + QWordMemory ( + ResourceProducer, + PosDecode, + MinFixed, + MaxFixed, + Cacheable, + ReadWrite, + 0x00000000, // Granularity + FixedPcdGet64 (PcdCsEtm3Base), // Min Base Address + FixedPcdGet64 (PcdCsEtm3MaxBase), // Max Base Address + 0, // Translate + FixedPcdGet32 (PcdCsComponentSize) // Length + ) + }) + + DSD_PORTS_BEGIN(1) + CS_OUTPUT_PORT(0, 1, \_SB_.SFN1) + DSD_PORTS_END + } // ETM3 + } + + Device(ETF0) { + Name(_HID, "ARMHC97C") // TMC + Name(_CID, "ARMHC97C") // TMC + Name(_CRS, ResourceTemplate() { + QWordMemory ( + ResourceProducer, + PosDecode, + MinFixed, + MaxFixed, + Cacheable, + ReadWrite, + 0x00000000, // Granularity + FixedPcdGet64 (PcdCsEtf0Base), // Min Base Address + FixedPcdGet64 (PcdCsEtf0MaxBase), // Max Base Address + 0, // Translate + FixedPcdGet32 (PcdCsComponentSize) // Length + ) + }) + + DSD_PORTS_BEGIN(2) + CS_OUTPUT_PORT(0, 0, \_SB_.FUN), + CS_INPUT_PORT(0, 0, \_SB_.SFN0) + DSD_PORTS_END + } // ETF0 + + Device(ETF1) { + Name(_HID, "ARMHC97C") // TMC + Name(_CID, "ARMHC97C") // TMC + Name(_CRS, ResourceTemplate() { + QWordMemory ( + ResourceProducer, + PosDecode, + MinFixed, + MaxFixed, + Cacheable, + ReadWrite, + 0x00000000, // Granularity + FixedPcdGet64 (PcdCsEtf1Base), // Min Base Address + FixedPcdGet64 (PcdCsEtf1MaxBase), // Max Base Address + 0, // Translate + FixedPcdGet32 (PcdCsComponentSize) // Length + ) + }) + + DSD_PORTS_BEGIN(2) + CS_OUTPUT_PORT(0, 1, \_SB_.FUN), + CS_INPUT_PORT(0, 0, \_SB_.SFN1) + DSD_PORTS_END + } // ETF1 + + Device(ETF2) { + Name(_HID, "ARMHC97C") // TMC + Name(_CID, "ARMHC97C") // TMC + Name(_CRS, ResourceTemplate() { + QWordMemory ( + ResourceProducer, + PosDecode, + MinFixed, + MaxFixed, + Cacheable, + ReadWrite, + 0x00000000, // Granularity + FixedPcdGet64 (PcdCsEtf2Base), // Min Base Address + FixedPcdGet64 (PcdCsEtf2MaxBase), // Max Base Address + 0, // Translate + FixedPcdGet32 (PcdCsComponentSize) // Length + ) + }) + + DSD_PORTS_BEGIN(2) + CS_OUTPUT_PORT(0, 5, \_SB_.MFUN), + CS_INPUT_PORT(0, 0, \_SB_.STM0) + DSD_PORTS_END + } // ETF2 + + Device(FUN) { + Name(_HID, "ARMHC9FF") + Name(_CID, "ARMHC9FF") + Name(_CRS, ResourceTemplate() { + QWordMemory ( + ResourceProducer, + PosDecode, + MinFixed, + MaxFixed, + Cacheable, + ReadWrite, + 0x00000000, // Granularity + FixedPcdGet64 (PcdCsFunnel0Base), // Min Base Address + FixedPcdGet64 (PcdCsFunnel0MaxBase), // Max Base Address + 0, // Translate + FixedPcdGet32 (PcdCsComponentSize) // Length + ) + }) + DSD_PORTS_BEGIN(3) + CS_OUTPUT_PORT(0, 0, \_SB_.MFUN), + CS_INPUT_PORT(0, 0, \_SB_.ETF0), + CS_INPUT_PORT(1, 0, \_SB_.ETF1) + DSD_PORTS_END + } // FUN + + Device(STM0) { + Name(_HID, "ARMHC502") // STM + Name(_CID, "ARMHC502") + Name(_CRS, ResourceTemplate() { + QWordMemory ( + ResourceProducer, + PosDecode, + MinFixed, + MaxFixed, + Cacheable, + ReadWrite, + 0x00000000, // Granularity + FixedPcdGet64 (PcdCsStmBase), // Min Base Address + FixedPcdGet64 (PcdCsStmMaxBase), // Max Base Address + 0, // Translate + FixedPcdGet32 (PcdCsComponentSize) // Length + ) + Memory32Fixed(ReadWrite, + FixedPcdGet32 (PcdCsStmStimulusBase), + FixedPcdGet32 (PcdCsStmStimulusSize)) + }) + + DSD_PORTS_BEGIN(1) + CS_OUTPUT_PORT(0, 0, \_SB_.ETF2) + DSD_PORTS_END + } + + Device(MFUN) { // Master Funnel + Name(_HID, "ARMHC9FF") // Funnel + Name(_CID, "ARMHC9FF") // Funnel + Name(_CRS, ResourceTemplate() { + QWordMemory ( + ResourceProducer, + PosDecode, + MinFixed, + MaxFixed, + Cacheable, + ReadWrite, + 0x00000000, // Granularity + FixedPcdGet64 (PcdCsFunnel1Base), // Min Base Address + FixedPcdGet64 (PcdCsFunnel1MaxBase), // Max Base Address + 0, // Translate + FixedPcdGet32 (PcdCsComponentSize) // Length + ) + }) + + DSD_PORTS_BEGIN(3) + CS_OUTPUT_PORT(0, 0, \_SB_.REP), + CS_INPUT_PORT(0, 0, \_SB_.FUN), + CS_INPUT_PORT(5, 0, \_SB_.ETF2) + DSD_PORTS_END + } // MFUN + + Device(REP) { + Name(_HID, "ARMHC98D") // Replicator + Name(_CID, "ARMHC98D") // Replicator + Name(_CRS, ResourceTemplate() { + QWordMemory ( + ResourceProducer, + PosDecode, + MinFixed, + MaxFixed, + Cacheable, + ReadWrite, + 0x00000000, // Granularity + FixedPcdGet64 (PcdCsReplicatorBase), // Min Base Address + FixedPcdGet64 (PcdCsReplicatorMaxBase), // Max Base Address + 0, // Translate + FixedPcdGet32 (PcdCsComponentSize) // Length + ) + }) + + DSD_PORTS_BEGIN(3) + CS_OUTPUT_PORT(0, 0, \_SB_.TPIU), + CS_OUTPUT_PORT(1, 0, \_SB_.ETR), + CS_INPUT_PORT(0, 0, \_SB_.MFUN) + DSD_PORTS_END + } // REP + + Device(TPIU) { + Name(_HID, "ARMHC979") // TPIU + Name(_CID, "ARMHC979") // TPIU + Name(_CRS, ResourceTemplate() { + QWordMemory ( + ResourceProducer, + PosDecode, + MinFixed, + MaxFixed, + Cacheable, + ReadWrite, + 0x00000000, // Granularity + FixedPcdGet64 (PcdCsTpiuBase), // Min Base Address + FixedPcdGet64 (PcdCsTpiuMaxBase), // Max Base Address + 0, // Translate + FixedPcdGet32 (PcdCsComponentSize) // Length + ) + }) + + DSD_PORTS_BEGIN(1) + CS_INPUT_PORT(0, 0, \_SB_.REP) + DSD_PORTS_END + } // TPIU + + Device(ETR) { + Name(_HID, "ARMHC97C") // TMC + Name(_CID, "ARMHC97C") // TMC + Name(_CCA, 0) // The ETR on this platform is not coh= erent + Name(_CRS, ResourceTemplate() { + QWordMemory ( + ResourceProducer, + PosDecode, + MinFixed, + MaxFixed, + Cacheable, + ReadWrite, + 0x00000000, // Granularity + FixedPcdGet64 (PcdCsEtrBase), // Min Base Address + FixedPcdGet64 (PcdCsEtrMaxBase), // Max Base Address + 0, // Translate + FixedPcdGet32 (PcdCsComponentSize) // Length + ) + }) + + Name(_DSD, Package() { + DSD_GRAPH_BEGIN(1) + CS_INPUT_PORT(0, 1, \_SB_.REP) + DSD_GRAPH_END, + + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package() { + Package(2) {"arm,scatter-gather", 1} + } + }) + + } // ETR + + Device(SFN0) { // Static Funnel 0 + Name(_HID, "ARMHC9FE") // Funnel + Name(_CID, "ARMHC9FE") // Funnel + + DSD_PORTS_BEGIN(3) + CS_OUTPUT_PORT(0, 0, \_SB_.ETF0), + CS_INPUT_PORT(0, 0, \_SB_.CP00.ETM0), + CS_INPUT_PORT(1, 0, \_SB_.CP01.ETM1) + DSD_PORTS_END + } // SFN0 + + Device(SFN1) { // Static Funnel 1 + Name(_HID, "ARMHC9FE") // Funnel + Name(_CID, "ARMHC9FE") // Funnel + + DSD_PORTS_BEGIN(3) + CS_OUTPUT_PORT(0, 0, \_SB_.ETF1), + CS_INPUT_PORT(0, 0, \_SB_.CP02.ETM2), + CS_INPUT_PORT(1, 0, \_SB_.CP03.ETM3) + DSD_PORTS_END + } // SFN1 + + Device(CMN6) { + Name(_HID, "ARMHC600") + + Name(_CRS, ResourceTemplate () { + // Region location is platform specific + // Other name(s) of this region: PERIPHBASE + QWordMemory ( + ResourceConsumer, + PosDecode, + MinFixed, + MaxFixed, + NonCacheable, + ReadWrite, + 0x00000000, + 0x50000000, + 0x5FFFFFFF, + 0x00000000, + 0x10000000, + , + , + CFGR + ) + + // Sub-region location is platform specific + // Other name(s) of this region: ROOTNODEBASE + QWordMemory ( + ResourceConsumer, + PosDecode, + MinFixed, + MaxFixed, + NonCacheable, + ReadWrite, + 0x00000000, + 0x50D00000, + 0x50D03FFF, + 0x00000000, + 0x00004000, + , + , + ROOT + ) + + // CMN600_INTREQPMU_DTC0 + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 78 } + }) + } + } // Scope(_SB) +} diff --git a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDx= e/AslTables/SsdtPci.asl b/Platform/ARM/N1Sdp/ConfigurationManager/Configura= tionManagerDxe/AslTables/SsdtPci.asl new file mode 100644 index 0000000000..87a4fdaf88 --- /dev/null +++ b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/AslTa= bles/SsdtPci.asl @@ -0,0 +1,247 @@ +/** @file + Secondary System Description Table (SSDT) + + Copyright (c) 2021, ARM Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include "N1SdpAcpiHeader.h" + +/* + See ACPI 6.4 Section 6.2.13 + + There are two ways that _PRT can be used. + + In the first model, a PCI Link device is used to provide additional + configuration information such as whether the interrupt is Level or + Edge triggered, it is active High or Low, Shared or Exclusive, etc. + + In the second model, the PCI interrupts are hardwired to specific + interrupt inputs on the interrupt controller and are not + configurable. In this case, the Source field in _PRT does not + reference a device, but instead contains the value zero, and the + Source Index field contains the global system interrupt to which the + PCI interrupt is hardwired. + + We use the first model with link indirection to set the correct + interrupt type as PCI defaults (Level Triggered, Active Low) are not + compatible with GICv2. +*/ +#define LNK_DEVICE(Unique_Id, Link_Name, irq) \ + Device(Link_Name) { \ + Name(_HID, EISAID("PNP0C0F")) \ + Name(_UID, Unique_Id) \ + Name(_PRS, ResourceTemplate() { \ + Interrupt(ResourceProducer, Level, ActiveHigh, Exclusive) { irq } \ + }) \ + Method (_CRS, 0) { Return (_PRS) } \ + Method (_SRS, 1) { } \ + Method (_DIS) { } \ +} + +#define PRT_ENTRY(Address, Pin, Link) = \ + Package (4) { = \ + Address, /* uses the same format as _ADR */ = \ + Pin, /* The PCI pin number of the device (0-INTA, 1-INTB, 2-INTC,= 3-INTD) */ \ + Link, /* Interrupt allocated via Link device */ = \ + Zero /* global system interrupt number (no used) */ = \ +} + +/* + See Reference [1] 6.1.1 + "High word-Device #, Low word-Function #. (for example, device 3, + function 2 is 0x00030002). To refer to all the functions on a device #, + use a function number of FFFF)." +*/ +#define ROOT_PRT_ENTRY(Pin, Link) PRT_ENTRY(0x0000FFFF, Pin, Link) // D= evice 0 for Bridge. + +DefinitionBlock("SsdtPci.aml", "SSDT", 1, "ARMLTD", "N1Sdp", + EFI_ACPI_ARM_OEM_REVISION) +{ + Scope (_SB) { + + // PCI Root Complex + LNK_DEVICE(1, LNKA, 201) + LNK_DEVICE(2, LNKB, 202) + LNK_DEVICE(3, LNKC, 203) + LNK_DEVICE(4, LNKD, 204) + LNK_DEVICE(5, LNKE, 233) + LNK_DEVICE(6, LNKF, 234) + LNK_DEVICE(7, LNKG, 235) + LNK_DEVICE(8, LNKH, 236) + + // PCI Root Complex + Device(PCI0) { + Name (_HID, EISAID("PNP0A08")) // PCI Express Root Bridge + Name (_CID, EISAID("PNP0A03")) // Compatible PCI Root Bridge + Name (_SEG, Zero) // PCI Segment Group number + Name (_BBN, Zero) // PCI Base Bus Number + Name (_CCA, 1) // Cache Coherency Attribute + + // Root Complex 0 + Device (RP0) { + Name(_ADR, 0xF0000000) // Dev 0, Func 0 + } + + // PCI Routing Table + Name(_PRT, Package() { + ROOT_PRT_ENTRY(0, LNKA), // INTA + ROOT_PRT_ENTRY(1, LNKB), // INTB + ROOT_PRT_ENTRY(2, LNKC), // INTC + ROOT_PRT_ENTRY(3, LNKD), // INTD + }) + + // Root complex resources + Method (_CRS, 0, Serialized) { + Name (RBUF, ResourceTemplate () { + WordBusNumber ( // Bus numbers assig= ned to this root + ResourceProducer, + MinFixed, + MaxFixed, + PosDecode, + 0, // AddressGranularity + FixedPcdGet32 (PcdPcieBusMin), // AddressMinimum - = Minimum Bus Number + FixedPcdGet32 (PcdPcieBusMax), // AddressMaximum - = Maximum Bus Number + 0, // AddressTranslatio= n - Set to 0 + FixedPcdGet32 (PcdPcieBusCount) // RangeLength - Num= ber of Busses + ) + + DWordMemory ( // 32-bit BAR Windows + ResourceProducer, + PosDecode, + MinFixed, + MaxFixed, + Cacheable, + ReadWrite, + 0x00000000, // Granularity + FixedPcdGet32 (PcdPcieMmio32Base), // Min Base Address + FixedPcdGet32 (PcdPcieMmio32MaxBase), // Max Base Address + FixedPcdGet32 (PcdPcieMmio32Translation), // Translate + FixedPcdGet32 (PcdPcieMmio32Size) // Length + ) + + QWordMemory ( // 64-bit BAR Windows + ResourceProducer, + PosDecode, + MinFixed, + MaxFixed, + Cacheable, + ReadWrite, + 0x00000000, // Granularity + FixedPcdGet64 (PcdPcieMmio64Base), // Min Base Address + FixedPcdGet64 (PcdPcieMmio64MaxBase), // Max Base Address + FixedPcdGet64 (PcdPcieMmio64Translation), // Translate + FixedPcdGet64 (PcdPcieMmio64Size) // Length + ) + + DWordIo ( // IO window + ResourceProducer, + MinFixed, + MaxFixed, + PosDecode, + EntireRange, + 0x00000000, // Granularity + FixedPcdGet32 (PcdPcieIoBase), // Min Base Address + FixedPcdGet32 (PcdPcieIoMaxBase), // Max Base Address + FixedPcdGet32 (PcdPcieIoTranslation), // Translate + FixedPcdGet32 (PcdPcieIoSize), // Length + , + , + , + TypeTranslation + ) + }) // Name(RBUF) + + Return (RBUF) + } // Method (_CRS) + } + + // CCIX Root Complex + Device(PCI1) { + Name (_HID, EISAID("PNP0A08")) // PCI Express Root Bridge + Name (_CID, EISAID("PNP0A03")) // Compatible PCI Root Bridge + Name (_SEG, 1) // PCI Segment Group number + Name (_BBN, Zero) // PCI Base Bus Number + Name (_CCA, 1) // Cache Coherency Attribute + + // Root Complex 1 + Device (RP1) { + Name(_ADR, 0xF0000000) // Dev 0, Func 0 + } + + // PCI Routing Table + Name(_PRT, Package() { + ROOT_PRT_ENTRY(0, LNKE), // INTA + ROOT_PRT_ENTRY(1, LNKF), // INTB + ROOT_PRT_ENTRY(2, LNKG), // INTC + ROOT_PRT_ENTRY(3, LNKH), // INTD + }) + + // Root complex resources + Method (_CRS, 0, Serialized) { + Name (RBUF, ResourceTemplate () { + WordBusNumber ( // Bus numbers assigned to this root + ResourceProducer, + MinFixed, + MaxFixed, + PosDecode, + 0, // AddressGranularity + FixedPcdGet32 (PcdCcixBusMin), // AddressMinimum - = Minimum Bus Number + FixedPcdGet32 (PcdCcixBusMax), // AddressMaximum - = Maximum Bus Number + 0, // AddressTranslatio= n - Set to 0 + FixedPcdGet32 (PcdCcixBusCount) // RangeLength - Num= ber of Busses + ) + + DWordMemory ( // 32-bit BAR Windows + ResourceProducer, + PosDecode, + MinFixed, + MaxFixed, + Cacheable, + ReadWrite, + 0x00000000, // Granularity + FixedPcdGet32 (PcdCcixMmio32Base), // Min Base Address + FixedPcdGet32 (PcdCcixMmio32MaxBase), // Max Base Address + FixedPcdGet32 (PcdCcixMmio32Translation), // Translate + FixedPcdGet32 (PcdCcixMmio32Size) // Length + ) + + QWordMemory ( // 64-bit BAR Windows + ResourceProducer, + PosDecode, + MinFixed, + MaxFixed, + Cacheable, + ReadWrite, + 0x00000000, // Granularity + FixedPcdGet64 (PcdCcixMmio64Base), // Min Base Address + FixedPcdGet64 (PcdCcixMmio64MaxBase), // Max Base Address + FixedPcdGet64 (PcdCcixMmio64Translation), // Translate + FixedPcdGet64 (PcdCcixMmio64Size) // Length + ) + + DWordIo ( // IO window + ResourceProducer, + MinFixed, + MaxFixed, + PosDecode, + EntireRange, + 0x00000000, // Granularity + FixedPcdGet32 (PcdCcixIoBase), // Min Base Address + FixedPcdGet32 (PcdCcixIoMaxBase), // Max Base Address + FixedPcdGet32 (PcdCcixIoTranslation), // Translate + FixedPcdGet32 (PcdCcixIoSize), // Length + , + , + , + TypeTranslation + ) + }) // Name(RBUF) + + Return (RBUF) + } // Method (_CRS) + } + + } +} diff --git a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDx= e/AslTables/SsdtRemotePci.asl b/Platform/ARM/N1Sdp/ConfigurationManager/Con= figurationManagerDxe/AslTables/SsdtRemotePci.asl new file mode 100644 index 0000000000..2af3a63c5c --- /dev/null +++ b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/AslTa= bles/SsdtRemotePci.asl @@ -0,0 +1,156 @@ +/** @file + Secondary System Description Table (SSDT) + + Copyright (c) 2021, ARM Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include "N1SdpAcpiHeader.h" + +/* + See ACPI 6.4 Section 6.2.13 + + There are two ways that _PRT can be used. + + In the first model, a PCI Link device is used to provide additional + configuration information such as whether the interrupt is Level or + Edge triggered, it is active High or Low, Shared or Exclusive, etc. + + In the second model, the PCI interrupts are hardwired to specific + interrupt inputs on the interrupt controller and are not + configurable. In this case, the Source field in _PRT does not + reference a device, but instead contains the value zero, and the + Source Index field contains the global system interrupt to which the + PCI interrupt is hardwired. + + We use the first model with link indirection to set the correct + interrupt type as PCI defaults (Level Triggered, Active Low) are not + compatible with GICv2. +*/ +#define LNK_DEVICE(Unique_Id, Link_Name, irq) \ + Device(Link_Name) { \ + Name(_HID, EISAID("PNP0C0F")) \ + Name(_UID, Unique_Id) \ + Name(_PRS, ResourceTemplate() { \ + Interrupt(ResourceProducer, Level, ActiveHigh, Exclusive) { irq } \ + }) \ + Method (_CRS, 0) { Return (_PRS) } \ + Method (_SRS, 1) { } \ + Method (_DIS) { } \ +} + +#define PRT_ENTRY(Address, Pin, Link) = \ + Package (4) { = \ + Address, /* uses the same format as _ADR */ = \ + Pin, /* The PCI pin number of the device (0-INTA, 1-INTB, 2-INTC,= 3-INTD) */ \ + Link, /* Interrupt allocated via Link device */ = \ + Zero /* global system interrupt number (no used) */ = \ +} + +/* + See Reference [1] 6.1.1 + "High word-Device #, Low word-Function #. (for example, device 3, + function 2 is 0x00030002). To refer to all the functions on a device #, + use a function number of FFFF)." +*/ +#define ROOT_PRT_ENTRY(Pin, Link) PRT_ENTRY(0x0000FFFF, Pin, Link) // D= evice 0 for Bridge. + +DefinitionBlock("SsdtRemotePci.aml", "SSDT", 1, "ARMLTD", "N1Sdp", + EFI_ACPI_ARM_OEM_REVISION) +{ + Scope (_SB) { + + // Remote PCI Root Complex + LNK_DEVICE(9, LNKI, 681) + LNK_DEVICE(10, LNKJ, 682) + LNK_DEVICE(11, LNKK, 683) + LNK_DEVICE(12, LNKL, 684) + + //Remote PCIe root complex + Device(PCI2) { + Name (_HID, EISAID("PNP0A08")) // PCI Express Root Bridge + Name (_CID, EISAID("PNP0A03")) // Compatible PCI Root Bridge + Name (_SEG, 2) // PCI Segment Group number + Name (_BBN, Zero) // PCI Base Bus Number + Name (_CCA, 1) // Cache Coherency Attribute + + // Remote Root Complex 0 + Device (RP0) { + Name(_ADR, 0xF0000000) // Dev 0, Func 0 + } + + // PCI Routing Table + Name(_PRT, Package() { + ROOT_PRT_ENTRY(0, LNKI), // INTA + ROOT_PRT_ENTRY(1, LNKJ), // INTB + ROOT_PRT_ENTRY(2, LNKK), // INTC + ROOT_PRT_ENTRY(3, LNKL), // INTD + }) + + // Root complex resources + Method (_CRS, 0, Serialized) { + Name (RBUF, ResourceTemplate () { + WordBusNumber ( // Bus numbers assig= ned to this root + ResourceProducer, + MinFixed, + MaxFixed, + PosDecode, + 0, // AddressGranularity + FixedPcdGet32 (PcdPcieBusMin), // AddressMinimum - = Minimum Bus Number + FixedPcdGet32 (PcdPcieBusMax), // AddressMaximum - = Maximum Bus Number + 0, // AddressTranslatio= n - Set to 0 + FixedPcdGet32 (PcdPcieBusCount) // RangeLength - Num= ber of Busses + ) + + QWordMemory ( // 32-bit BAR Windows + ResourceProducer, + PosDecode, + MinFixed, + MaxFixed, + Cacheable, + ReadWrite, + 0x00000000, // Granularity + FixedPcdGet32 (PcdPcieMmio32Base), // Min Base Address + FixedPcdGet32 (PcdPcieMmio32MaxBase), // Max Base Address + FixedPcdGet32 (PcdRemotePcieMmio32Translation), // Translate + FixedPcdGet32 (PcdPcieMmio32Size) // Length + ) + + QWordMemory ( // 64-bit BAR Windows + ResourceProducer, + PosDecode, + MinFixed, + MaxFixed, + Cacheable, + ReadWrite, + 0x00000000, // Granularity + FixedPcdGet64 (PcdPcieMmio64Base), // Min Base Address + FixedPcdGet64 (PcdPcieMmio64MaxBase), // Max Base Address + FixedPcdGet64 (PcdRemotePcieMmio64Translation), // Translate + FixedPcdGet64 (PcdPcieMmio64Size) // Length + ) + + QWordIo ( // IO window + ResourceProducer, + MinFixed, + MaxFixed, + PosDecode, + EntireRange, + 0x00000000, // Granularity + FixedPcdGet32 (PcdPcieIoBase), // Min Base Address + FixedPcdGet32 (PcdPcieIoMaxBase), // Max Base Address + FixedPcdGet64 (PcdRemotePcieIoTranslation), // Translate + FixedPcdGet32 (PcdPcieIoSize), // Length + , + , + , + TypeTranslation + ) + }) // Name(RBUF) + + Return (RBUF) + } // Method (_CRS) + } + } +} --=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 (#81731): https://edk2.groups.io/g/devel/message/81731 Mute This Topic: https://groups.io/mt/86219916/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 Sat Apr 27 03:40:23 2024 Delivered-To: importer@patchew.org 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+81732+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1633890694049141.54176597501942; Sun, 10 Oct 2021 11:31:34 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id SPlCYY1788612xQg7BFsyXmo; Sun, 10 Oct 2021 11:31:33 -0700 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.71]) by mx.groups.io with SMTP id smtpd.web10.1702.1633890692156599792 for ; Sun, 10 Oct 2021 11:31:33 -0700 X-Received: from AM0PR02CA0208.eurprd02.prod.outlook.com (2603:10a6:20b:28f::15) by AM9PR08MB6836.eurprd08.prod.outlook.com (2603:10a6:20b:302::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Sun, 10 Oct 2021 18:31:27 +0000 X-Received: from VE1EUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:28f:cafe::b0) by AM0PR02CA0208.outlook.office365.com (2603:10a6:20b:28f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.19 via Frontend Transport; Sun, 10 Oct 2021 18:31:26 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81732+1787277+3901457@groups.io; helo=mail02.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT049.mail.protection.outlook.com (10.152.19.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Sun, 10 Oct 2021 18:31:26 +0000 X-Received: ("Tessian outbound f1898412aff1:v103"); Sun, 10 Oct 2021 18:31:26 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: e5a5582fa998000e X-CR-MTA-TID: 64aa7808 X-Received: from 5691fc01cd10.5 by 64aa7808-outbound-1.mta.getcheckrecipient.com id BF7CF2BC-7B82-4240-8765-E463639BB099.1; Sun, 10 Oct 2021 18:31:14 +0000 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5691fc01cd10.5 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sun, 10 Oct 2021 18:31:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YJC5onRlxH9mzulENxAI6M22FyyUGANCVtAbL5HwJnQdNYh0B91JkAi+gLCEgFpV9UwVv5WGgqLAn0FN2YGBBgewo76Ll6t1z4/W7mykyvGAdzCiu6UflfzRM9CBWvq+t0S8Ri30IqIdbRuLdNPuBi1wx5f2M5/wzjrM6VuH8fLXTtAv/OVb2xQwc9dpppBqf/X6KRK+VyWkO1duY7t8RKKHlMYIl9T0w62R5/OF48dUSDZmMoCDmvNPHQ87AqS5Ui2BXtot2R8JR9zExKBOFlZ89Jx2XQHf3oRDJsZ4Rxw0fzry4bC5ZizuWhli/d9P7HP8k/3/OeBhtJdWviox6A== 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=vVOm0UOx5AsYX3WnRGnCpVpkxjB6gIHgYsaV1FHDBuI=; b=mxgQwBQ3vdIkn7H/vX1wBc5VJNzK8RGT3PNTwkix7IRZmpilIEag6kETU0fhuibmKvwIt+Yn5LV5QivpIxp5W5iAFIIFNTRtqrrQVIlBKtcsBr0CeKwUnTiVw/M55UujTthhgsdkK17DenrIphH336Z+klUZm0eqUR0SFSL5ujuQh5Va7TU2+NCpH98U1C5741HmGv9uDZXF0Ouw01UfS7kYNLimILxGnPCmlD0AcLKEAfuzMjqNg1gcamw5zNZwGbkBvHI3OGDAJC4sq7U85BiMprhyzml/nmAZN8UIjs7HDfP9jXVnDPmRwWNBuPoyUQZ/0OgpNt0Y7UckhJu4Pw== 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 Authentication-Results-Original: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; X-Received: from PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) by PA4PR08MB6288.eurprd08.prod.outlook.com (2603:10a6:102:f3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Sun, 10 Oct 2021 18:31:09 +0000 X-Received: from PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::e5a7:9474:4463:d258]) by PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::e5a7:9474:4463:d258%2]) with mapi id 15.20.4587.025; Sun, 10 Oct 2021 18:31:09 +0000 From: "Khasim Mohammed" To: devel@edk2.groups.io Cc: nd@arm.com, Khasim Syed Mohammed , Sami Mujawar , Chandni Cherukuri , Manoj Kumar , Patrik Berglund , anukou01 , Sayanta Pattanayak Subject: [edk2-devel] [PATCH v2 6/7] Platform/ARM/N1Sdp: Configuration Manager for N1Sdp Date: Sun, 10 Oct 2021 23:59:55 +0530 Message-Id: <20211010182956.13526-7-khasim.mohammed@arm.com> In-Reply-To: <20211010182956.13526-1-khasim.mohammed@arm.com> References: <20211010182956.13526-1-khasim.mohammed@arm.com> X-ClientProxiedBy: LO4P123CA0392.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::19) To PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) MIME-Version: 1.0 X-Received: from e116623.arm.com (217.140.99.251) by LO4P123CA0392.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.20 via Frontend Transport; Sun, 10 Oct 2021 18:31:07 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e9b79197-8370-4ee7-b699-08d98c1c2b8c X-MS-TrafficTypeDiagnostic: PA4PR08MB6288:|AM9PR08MB6836: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6430;OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 18QTUoYJ5A8hx710NY/sUPa7WrzY4Gc2EqaChYppHqPQT2q5krY/IHuhWHxXnzNqAsZgLXwUK6pXqZnhfxSmZWc6zCyqxJJmsvdTpMCuc7sLlw+/3ypsjzdYA0FjatJ1xVXEv6meDWt23ga0SRtcz4tlU3Ld7PLWmK5/LbzDw8raAYWmVu1Upw7NbwF44HOu9OwRXN7o3dUxtjL3DPInql/s9uiX0NSyWU6GjUcZ8UmgrIl3LkQSnBGAZvsjn3rR5/jCamuWPk2+we6kyzBOy0IUxBAtaMnR6NyVV5vzxspBl5OssF2LKLP/H1/R5HgtR8uDGIDGwQ4zVEysSony6ywKJebtwZ6o7MSFsNNWaCOTlM0Uiod/NoOIWQWOrNiwaStp3g0VgwTq7Bsg/aUfUju+gzEsF5dfXGf4g+E5xrS+cbCZOB3vZvrlRkTcF/0CYElf+y6tVONy/Q3xCs5QEIsZd6ydSBKsTon46xp7nH20g7UHwSFLW5eDbzGSbQkhPhXRNbIY0Yvx+HiWdSo7Ng/tDuYkuq6q9o+IuMsvRsfeg9EoO0r/TUuZNkbBLn0bGrqkD7LNtbKlvxhe+2ph5vqv6g3UC5eERwrCBerCpPUHL8RyP1EgC9X/CRn46TNo09mrnU6Gx92n/F6fD1ZS5LKY3pxcnZ/dzxeg2Ndz2MWa4jeHMS2q5tNIZ0nCXsX0BtYI/nVtt09VDzxfpsX78rsX/Yszbi6qSuHOBpt7s6M= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA4PR08MB5902.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(6666004)(30864003)(66946007)(508600001)(6916009)(5660300002)(2616005)(956004)(86362001)(83380400001)(66476007)(66556008)(36756003)(6486002)(2906002)(1076003)(19627235002)(52116002)(7696005)(4326008)(26005)(38350700002)(38100700002)(316002)(8676002)(54906003)(186003)(8936002)(32563001)(579004)(559001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6288 Original-Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT049.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 6de685d4-247d-4f26-453a-08d98c1c20de X-Microsoft-Antispam-Message-Info: n+1f5ETiusv5wiwJY/iMoxp14iypskPukzF2Z3uWwQK0hVUmFzsRFMJYSd+vSCCPoI213J/7wOHopgMfpTVGOnBx5dAF18LQ0gmObQRkCzTTyPz7gCEfHVPS+gm1QqjIqqJwJM75kBE9ANuXQJyXZK8WeYju6Yk0F7EQvNKpVHTsfCApyUr+auR3Fe0QuF8vCqxxdl+cQbixse3mHegsbjCQFeZRziZx4lBlgYtkqAOT04zYU3Lth4IPeMr2SJpP4yMuvKIW+Qt/Q03AyJe1F7Y/lxV9FjrOdvYiiUgX0r/pD6kTpk7Gkd7p6suVAAXS7MnvCGEYfy5IiclrIGs9k0Nb9s67QSXxjDk6i9/SfpVPAb3BGNoUtI10R3860Qm+hdUs2bhUhwo2dT2lkbZH0QHD7gW80NaMST/DZuHMMR1ePUwLPljhNHb2u/NVWNvqYPAXPLfD4mma4jsy4UDU+kQX3TCQsgnX3Q9nq5B3QqFeEIpvmmMCUhkFdkl3VsRxBbPOtxKOjnFM5yTtepwilyqu4zoGRFvAWQWTsA6CDK/opUOPeQ5/r/oXGIqjzI87bsigmOhmoN+KBxUaOxqMe/sxh9dyXqsYpGsw9ml2YF3jh7ypSBjmr8d9ZZuRgphvL30CMs+6ILtxRQEwvVZUpxF/wY6i/CCzJ1bw7NC1OLJTima54LfwE35tb4PRKcRqXqvz7ay3mwJI4OtLgRSDqElnWCUsno2P504GvV4olho= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2021 18:31:26.5861 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e9b79197-8370-4ee7-b699-08d98c1c2b8c 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: VE1EUR03FT049.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6836 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,khasim.mohammed@arm.com X-Gm-Message-State: 24oX0MJfctkPbjMxyRrLUPZMx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1633890693; bh=e6EAVTOH1gt6O+jogHgqYlrhV6F+1PvfoaG2vkX1Iks=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=jWVJCKLLE9kci2CraMP0KYJEWcqyIR1GTf/OuxIzb6yMoRGD8O8LSEZS6++U2xdLgy9 GcnMe7ongyILK96ejthY8P6GK05OYJ/i435uY0aNRhuGt0AIs3EjNrOTPMR4tXj21glX1 8mFFtMLhxDyFVbElJniUX8wwN1USiyx7E80= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1633890696100100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The dynamic tables framework utilizes the configuration manager protocol to get the platform specific information required for building the firmware tables. The configuration manager is a platform specific component that collates the platform hardware information and builds an abstract platform configuration repository. The configuration manager also implements the configuration manager protocol which returns the hardware information requested by the table generators. This patch implements the configuration manager for N1SDP platform. It enables support for generating the following ACPI tables: 1. FACP 2. DSDT 3. GTDT 4. APIC 5. SPCR 6. DBG2 7. PPTT 8. IORT 9. MCFG 10. SSDT - PCI 11. SSDT - REMOTE PCI Also added : HMAT table and expose CCIX memory as EFI_MEMORY_SP Signed-off-by: Sami Mujawar Signed-off-by: Khasim Syed Mohammed Signed-off-by: Chandni Cherukuri Signed-off-by: Manoj Kumar Signed-off-by: Patrik Berglund Signed-off-by: anukou01 Signed-off-by: Sayanta Pattanayak --- .../ConfigurationManager.dsc.inc | 16 + .../ConfigurationManager.c | 2199 +++++++++++++++++ .../ConfigurationManager.h | 307 +++ .../ConfigurationManagerDxe.inf | 167 ++ .../ConfigurationManagerDxe/Hmat.c | 103 + .../ConfigurationManagerDxe/Platform.h | 92 + 6 files changed, 2884 insertions(+) create mode 100644 Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationMa= nager.dsc.inc create mode 100644 Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationMa= nagerDxe/ConfigurationManager.c create mode 100644 Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationMa= nagerDxe/ConfigurationManager.h create mode 100644 Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationMa= nagerDxe/ConfigurationManagerDxe.inf create mode 100644 Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationMa= nagerDxe/Hmat.c create mode 100644 Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationMa= nagerDxe/Platform.h diff --git a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManager.d= sc.inc b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManager.dsc.i= nc new file mode 100644 index 0000000000..bcd4bf334d --- /dev/null +++ b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManager.dsc.inc @@ -0,0 +1,16 @@ +## @file +# dsc include file for Configuration Manager +# +# Copyright (c) 2021, ARM Limited. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + +[BuildOptions] + +[Components.common] + # Configuration Manager + Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/Configur= ationManagerDxe.inf diff --git a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDx= e/ConfigurationManager.c b/Platform/ARM/N1Sdp/ConfigurationManager/Configur= ationManagerDxe/ConfigurationManager.c new file mode 100644 index 0000000000..8fc2a89674 --- /dev/null +++ b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/Confi= gurationManager.c @@ -0,0 +1,2199 @@ +/** @file + Configuration Manager Dxe + + Copyright (c) 2021, ARM Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Glossary: + - Cm or CM - Configuration Manager + - Obj or OBJ - Object +**/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ConfigurationManager.h" +#include "N1SdpAcpiHeader.h" +#include "Platform.h" + +extern struct EFI_ACPI_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE Hmat; + +/** The platform configuration repository information. +*/ +STATIC +EDKII_PLATFORM_REPOSITORY_INFO N1sdpRepositoryInfo =3D { + // Configuration Manager information + { CONFIGURATION_MANAGER_REVISION, CFG_MGR_OEM_ID }, + + // ACPI Table List + { + // FADT Table + { + EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE, + EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE_REVISION, + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdFadt), + NULL + }, + // GTDT Table + { + EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE, + EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION, + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdGtdt), + NULL + }, + // MADT Table + { + EFI_ACPI_6_3_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE, + EFI_ACPI_6_3_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION, + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdMadt), + NULL + }, + // SPCR Table + { + EFI_ACPI_6_3_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE, + EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_REVISION, + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdSpcr), + NULL + }, + // DSDT Table + { + EFI_ACPI_6_3_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE, + 0, // Unused + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdDsdt), + (EFI_ACPI_DESCRIPTION_HEADER*)dsdt_aml_code + }, + // DBG2 Table + { + EFI_ACPI_6_3_DEBUG_PORT_2_TABLE_SIGNATURE, + EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT_REVISION, + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdDbg2), + NULL + }, + // PPTT Table + { + EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SIGNATURE, + EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_REVISION, + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdPptt), + NULL + }, + // IORT Table + { + EFI_ACPI_6_3_IO_REMAPPING_TABLE_SIGNATURE, + EFI_ACPI_IO_REMAPPING_TABLE_REVISION, + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdIort), + NULL + }, + // PCI MCFG Table + { + EFI_ACPI_6_3_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDR= ESS_DESCRIPTION_TABLE_SIGNATURE, + EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_SPACE_ACCESS_TABLE_REVISION, + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdMcfg), + NULL, + SIGNATURE_64 ('A','R','M','N','1','S','D','P'), + 0x20181101 + }, + // SSDT table describing the PCI root complex + { + EFI_ACPI_6_3_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE, + 0, // Unused + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdSsdt), + (EFI_ACPI_DESCRIPTION_HEADER*)ssdtpci_aml_code + }, + // SRAT Table + { + EFI_ACPI_6_3_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE, + EFI_ACPI_6_3_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION, + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdSrat), + NULL + }, + // HMAT Table + { + EFI_ACPI_6_3_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE_SIGNATURE, + EFI_ACPI_6_3_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE_REVISION, + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdRaw), + (EFI_ACPI_DESCRIPTION_HEADER*)&Hmat + }, + // SSDT table describing the Remote Chip PCI root complex + { + EFI_ACPI_6_3_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE, + 0, // Unused + CREATE_STD_ACPI_TABLE_GEN_ID (EStdAcpiTableIdSsdt), + (EFI_ACPI_DESCRIPTION_HEADER*)ssdtremotepci_aml_code + }, + }, + + // Boot architecture information + { EFI_ACPI_6_3_ARM_PSCI_COMPLIANT }, // BootArchFlags + + // Fixed feature flag information + { EFI_ACPI_6_3_HEADLESS }, // Fixed feature flags + + // Power management profile information + { EFI_ACPI_6_3_PM_PROFILE_ENTERPRISE_SERVER }, // PowerManagement Pro= file + + /* GIC CPU Interface information + GICC_ENTRY (CPUInterfaceNumber, Mpidr, PmuIrq, VGicIrq, GicRedistBase, + EnergyEfficiency, SpeIrq, ProximityDomain, ClockDomain) + */ + { + GICC_ENTRY (0, GET_MPID3 (0x0, 0x0, 0x0, 0x0), 23, 25, 0, 0, 21, 0, 0), + GICC_ENTRY (1, GET_MPID3 (0x0, 0x0, 0x1, 0x0), 23, 25, 0, 0, 21, 0, 0), + GICC_ENTRY (2, GET_MPID3 (0x0, 0x1, 0x0, 0x0), 23, 25, 0, 0, 21, 0, 0), + GICC_ENTRY (3, GET_MPID3 (0x0, 0x1, 0x1, 0x0), 23, 25, 0, 0, 21, 0, 0), + GICC_ENTRY (4, GET_MPID3 (0x1, 0x0, 0x0, 0x0), 23, 25, 0, 0, 21, 1, 0), + GICC_ENTRY (5, GET_MPID3 (0x1, 0x0, 0x1, 0x0), 23, 25, 0, 0, 21, 1, 0), + GICC_ENTRY (6, GET_MPID3 (0x1, 0x1, 0x0, 0x0), 23, 25, 0, 0, 21, 1, 0), + GICC_ENTRY (7, GET_MPID3 (0x1, 0x1, 0x1, 0x0), 23, 25, 0, 0, 21, 1, 0), + }, + + // GIC Distributor Info + { + FixedPcdGet64 (PcdGicDistributorBase), // UINT64 PhysicalBaseAddress + 0, // UINT32 SystemVectorBase + 3 // UINT8 GicVersion + }, + + // GIC Re-Distributor Info + { + { + // UINT64 DiscoveryRangeBaseAddress + FixedPcdGet64 (PcdGicRedistributorsBase), + // UINT32 DiscoveryRangeLength + SIZE_1MB + }, + { + // UINT64 DiscoveryRangeBaseAddress + FixedPcdGet64 (PcdGicRedistributorsBase) + (1ULL << 42), + // UINT32 DiscoveryRangeLength + SIZE_1MB + }, + }, + + // GIC ITS + { + // GIC ITS - CCIX TCU + { + // The GIC ITS ID. + 0, + // The physical address for the Interrupt Translation Service + 0x30040000, + //Proximity Domain + 0 + }, + // GIC ITS - PCIe TCU + { + // The GIC ITS ID. + 1, + // The physical address for the Interrupt Translation Service + 0x30060000, + //Proximity Domain + 0 + }, + // GIC ITS - CCIX RC + { + // The GIC ITS ID. + 2, + // The physical address for the Interrupt Translation Service + 0x30080000, + //Proximity Domain + 0 + }, + // GIC ITS - PCIe RC + { + // The GIC ITS ID. + 3, + // The physical address for the Interrupt Translation Service + 0x300A0000, + //Proximity Domain + 0 + }, + //Remote chip GIC ITS - PCIe TCU + { + ITS_REMOTE_SMMU_PCIE, + 0x40030060000, + 1 + }, + //Remote chip GIC ITS - PCIe RC + { + ITS_REMOTE_PCIE, + 0x400300a0000, + 1 + }, + }, + + // Generic Timer Info + { + // The physical base address for the counter control frame + N1SDP_SYSTEM_TIMER_BASE_ADDRESS, + // The physical base address for the counter read frame + N1SDP_CNT_READ_BASE_ADDRESS, + // The secure PL1 timer interrupt + FixedPcdGet32 (PcdArmArchTimerSecIntrNum), + // The secure PL1 timer flags + N1SDP_GTDT_GTIMER_FLAGS, + // The non-secure PL1 timer interrupt + FixedPcdGet32 (PcdArmArchTimerIntrNum), + // The non-secure PL1 timer flags + N1SDP_GTDT_GTIMER_FLAGS, + // The virtual timer interrupt + FixedPcdGet32 (PcdArmArchTimerVirtIntrNum), + // The virtual timer flags + N1SDP_GTDT_GTIMER_FLAGS, + // The non-secure PL2 timer interrupt + FixedPcdGet32 (PcdArmArchTimerHypIntrNum), + // The non-secure PL2 timer flags + N1SDP_GTDT_GTIMER_FLAGS + }, + + // Generic Timer Block Information + { + { + // The physical base address for the GT Block Timer structure + N1SDP_GT_BLOCK_CTL_BASE, + // The number of timer frames implemented in the GT Block + N1SDP_TIMER_FRAMES_COUNT, + // Reference token for the GT Block timer frame list + REFERENCE_TOKEN (GTBlock0TimerInfo) + } + }, + + // GT Block Timer Frames + { + // Frame 0 + { + 0, // UINT8 FrameNumber + N1SDP_GT_BLOCK_FRAME0_CTL_BASE, // UINT64 PhysicalAddressCntBase + N1SDP_GT_BLOCK_FRAME0_CTL_EL0_BASE, // UINT64 PhysicalAddressCntEL0= Base + N1SDP_GT_BLOCK_FRAME0_GSIV, // UINT32 PhysicalTimerGSIV + N1SDP_GTX_TIMER_FLAGS, // UINT32 PhysicalTimerFlags + 0, // UINT32 VirtualTimerGSIV + 0, // UINT32 VirtualTimerFlags + N1SDP_GTX_COMMON_FLAGS_NS // UINT32 CommonFlags + }, + // Frame 1 + { + 1, // UINT8 FrameNumber + N1SDP_GT_BLOCK_FRAME1_CTL_BASE, // UINT64 PhysicalAddressCntBase + N1SDP_GT_BLOCK_FRAME1_CTL_EL0_BASE, // UINT64 PhysicalAddressCntEL0= Base + N1SDP_GT_BLOCK_FRAME1_GSIV, // UINT32 PhysicalTimerGSIV + N1SDP_GTX_TIMER_FLAGS, // UINT32 PhysicalTimerFlags + 0, // UINT32 VirtualTimerGSIV + 0, // UINT32 VirtualTimerFlags + N1SDP_GTX_COMMON_FLAGS_S // UINT32 CommonFlags + }, + }, + + // Watchdog Info + { + // The physical base address of the SBSA Watchdog control frame + FixedPcdGet64 (PcdGenericWatchdogControlBase), + // The physical base address of the SBSA Watchdog refresh frame + FixedPcdGet64 (PcdGenericWatchdogRefreshBase), + // The watchdog interrupt + FixedPcdGet32 (PcdGenericWatchdogEl2IntrNum), + // The watchdog flags + N1SDP_SBSA_WATCHDOG_FLAGS + }, + + // SPCR Serial Port + { + FixedPcdGet64 (PcdSerialRegisterBase), // BaseAddress + FixedPcdGet32 (PL011UartInterrupt), // Interrupt + FixedPcdGet64 (PcdUartDefaultBaudRate), // BaudRate + FixedPcdGet32 (PL011UartClkInHz), // Clock + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_PL011_UART // Port subtype + }, + + // Debug Serial Port + { + FixedPcdGet64 (PcdSerialDbgRegisterBase), // BaseAddress + 0, // Interrupt -= unused + FixedPcdGet64 (PcdSerialDbgUartBaudRate), // BaudRate + FixedPcdGet32 (PcdSerialDbgUartClkInHz), // Clock + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_PL011_UART // Port subtype + }, + + // Processor Hierarchy Nodes + { + // Package + { + // CM_OBJECT_TOKEN Token + REFERENCE_TOKEN (ProcHierarchyInfo[0]), + // UINT32 Flags + PROC_NODE_FLAGS ( + EFI_ACPI_6_3_PPTT_PACKAGE_PHYSICAL, + EFI_ACPI_6_3_PPTT_PROCESSOR_ID_INVALID, + EFI_ACPI_6_3_PPTT_PROCESSOR_IS_NOT_THREAD, + EFI_ACPI_6_3_PPTT_NODE_IS_NOT_LEAF, + EFI_ACPI_6_3_PPTT_IMPLEMENTATION_IDENTICAL + ), + // CM_OBJECT_TOKEN ParentToken + CM_NULL_TOKEN, + // CM_OBJECT_TOKEN GicCToken + CM_NULL_TOKEN, + // UINT32 NoOfPrivateResources + SOC_RESOURCE_COUNT, + // CM_OBJECT_TOKEN PrivateResourcesArrayToken + REFERENCE_TOKEN (SocResources) + }, + // Cluster0 + { + // CM_OBJECT_TOKEN Token + REFERENCE_TOKEN (ProcHierarchyInfo[1]), + // UINT32 Flags + PROC_NODE_FLAGS ( + EFI_ACPI_6_3_PPTT_PACKAGE_NOT_PHYSICAL, + EFI_ACPI_6_3_PPTT_PROCESSOR_ID_INVALID, + EFI_ACPI_6_3_PPTT_PROCESSOR_IS_NOT_THREAD, + EFI_ACPI_6_3_PPTT_NODE_IS_NOT_LEAF, + EFI_ACPI_6_3_PPTT_IMPLEMENTATION_IDENTICAL + ), + // CM_OBJECT_TOKEN ParentToken + REFERENCE_TOKEN (ProcHierarchyInfo[0]), // -> Package + // CM_OBJECT_TOKEN GicCToken + CM_NULL_TOKEN, + // UINT32 NoOfPrivateResources + CLUSTER_RESOURCE_COUNT, + // CM_OBJECT_TOKEN PrivateResourcesArrayToken + REFERENCE_TOKEN (ClusterResources) + }, + // Cluster1 + { + // CM_OBJECT_TOKEN Token + REFERENCE_TOKEN (ProcHierarchyInfo[2]), + // UINT32 Flags + PROC_NODE_FLAGS ( + EFI_ACPI_6_3_PPTT_PACKAGE_NOT_PHYSICAL, + EFI_ACPI_6_3_PPTT_PROCESSOR_ID_INVALID, + EFI_ACPI_6_3_PPTT_PROCESSOR_IS_NOT_THREAD, + EFI_ACPI_6_3_PPTT_NODE_IS_NOT_LEAF, + EFI_ACPI_6_3_PPTT_IMPLEMENTATION_IDENTICAL + ), + // CM_OBJECT_TOKEN ParentToken + REFERENCE_TOKEN (ProcHierarchyInfo[0]), // -> Package + // CM_OBJECT_TOKEN GicCToken + CM_NULL_TOKEN, + // UINT32 NoOfPrivateResources + CLUSTER_RESOURCE_COUNT, + // CM_OBJECT_TOKEN PrivateResourcesArrayToken + REFERENCE_TOKEN (ClusterResources) + }, + // Cluster0 - Cpu0 + { + // CM_OBJECT_TOKEN Token + REFERENCE_TOKEN (ProcHierarchyInfo[3]), + // UINT32 Flags + PROC_NODE_FLAGS ( + EFI_ACPI_6_3_PPTT_PACKAGE_NOT_PHYSICAL, + EFI_ACPI_6_3_PPTT_PROCESSOR_ID_VALID, + EFI_ACPI_6_3_PPTT_PROCESSOR_IS_NOT_THREAD, + EFI_ACPI_6_3_PPTT_NODE_IS_LEAF, + EFI_ACPI_6_3_PPTT_IMPLEMENTATION_NOT_IDENTICAL + ), + // CM_OBJECT_TOKEN ParentToken + REFERENCE_TOKEN (ProcHierarchyInfo[1]), // -> 'cluster in Cluster0 + // CM_OBJECT_TOKEN GicCToken + REFERENCE_TOKEN (GicCInfo[0]), + // UINT32 NoOfPrivateResources + CORE_RESOURCE_COUNT, + // CM_OBJECT_TOKEN PrivateResourcesArrayToken + REFERENCE_TOKEN (CoreResources) + }, + // Cluster0 - Cpu1 + { + // CM_OBJECT_TOKEN Token + REFERENCE_TOKEN (ProcHierarchyInfo[4]), + // UINT32 Flags + PROC_NODE_FLAGS ( + EFI_ACPI_6_3_PPTT_PACKAGE_NOT_PHYSICAL, + EFI_ACPI_6_3_PPTT_PROCESSOR_ID_VALID, + EFI_ACPI_6_3_PPTT_PROCESSOR_IS_NOT_THREAD, + EFI_ACPI_6_3_PPTT_NODE_IS_LEAF, + EFI_ACPI_6_3_PPTT_IMPLEMENTATION_NOT_IDENTICAL + ), + // CM_OBJECT_TOKEN ParentToken + REFERENCE_TOKEN (ProcHierarchyInfo[1]), // -> 'cluster in Cluster0 + // CM_OBJECT_TOKEN GicCToken + REFERENCE_TOKEN (GicCInfo[1]), + // UINT32 NoOfPrivateResources + CORE_RESOURCE_COUNT, + // CM_OBJECT_TOKEN PrivateResourcesArrayToken + REFERENCE_TOKEN (CoreResources) + }, + // Cluster1 - Cpu0 + { + // CM_OBJECT_TOKEN Token + REFERENCE_TOKEN (ProcHierarchyInfo[3]), + // UINT32 Flags + PROC_NODE_FLAGS ( + EFI_ACPI_6_3_PPTT_PACKAGE_NOT_PHYSICAL, + EFI_ACPI_6_3_PPTT_PROCESSOR_ID_VALID, + EFI_ACPI_6_3_PPTT_PROCESSOR_IS_NOT_THREAD, + EFI_ACPI_6_3_PPTT_NODE_IS_LEAF, + EFI_ACPI_6_3_PPTT_IMPLEMENTATION_NOT_IDENTICAL + ), + // CM_OBJECT_TOKEN ParentToken + REFERENCE_TOKEN (ProcHierarchyInfo[2]), // -> 'cluster in Cluster1 + // CM_OBJECT_TOKEN GicCToken + REFERENCE_TOKEN (GicCInfo[2]), + // UINT32 NoOfPrivateResources + CORE_RESOURCE_COUNT, + // CM_OBJECT_TOKEN PrivateResourcesArrayToken + REFERENCE_TOKEN (CoreResources) + }, + // Cluster1 - Cpu1 + { + // CM_OBJECT_TOKEN Token + REFERENCE_TOKEN (ProcHierarchyInfo[4]), + // UINT32 Flags + PROC_NODE_FLAGS ( + EFI_ACPI_6_3_PPTT_PACKAGE_NOT_PHYSICAL, + EFI_ACPI_6_3_PPTT_PROCESSOR_ID_VALID, + EFI_ACPI_6_3_PPTT_PROCESSOR_IS_NOT_THREAD, + EFI_ACPI_6_3_PPTT_NODE_IS_LEAF, + EFI_ACPI_6_3_PPTT_IMPLEMENTATION_NOT_IDENTICAL + ), + // CM_OBJECT_TOKEN ParentToken + REFERENCE_TOKEN (ProcHierarchyInfo[2]), // -> 'cluster in Cluster1 + // CM_OBJECT_TOKEN GicCToken + REFERENCE_TOKEN (GicCInfo[3]), + // UINT32 NoOfPrivateResources + CORE_RESOURCE_COUNT, + // CM_OBJECT_TOKEN PrivateResourcesArrayToken + REFERENCE_TOKEN (CoreResources) + }, + // Slave chip hierarchy + // Package + { + // CM_OBJECT_TOKEN Token + REFERENCE_TOKEN (ProcHierarchyInfo[7]), + // UINT32 Flags + PROC_NODE_FLAGS ( + EFI_ACPI_6_3_PPTT_PACKAGE_PHYSICAL, + EFI_ACPI_6_3_PPTT_PROCESSOR_ID_INVALID, + EFI_ACPI_6_3_PPTT_PROCESSOR_IS_NOT_THREAD, + EFI_ACPI_6_3_PPTT_NODE_IS_NOT_LEAF, + EFI_ACPI_6_3_PPTT_IMPLEMENTATION_IDENTICAL + ), + // CM_OBJECT_TOKEN ParentToken + CM_NULL_TOKEN, + // CM_OBJECT_TOKEN GicCToken + CM_NULL_TOKEN, + // UINT32 NoOfPrivateResources + SOC_RESOURCE_COUNT, + // CM_OBJECT_TOKEN PrivateResourcesArrayToken + REFERENCE_TOKEN (SocResources) + }, + // Cluster0 + { + // CM_OBJECT_TOKEN Token + REFERENCE_TOKEN (ProcHierarchyInfo[8]), + // UINT32 Flags + PROC_NODE_FLAGS ( + EFI_ACPI_6_3_PPTT_PACKAGE_NOT_PHYSICAL, + EFI_ACPI_6_3_PPTT_PROCESSOR_ID_INVALID, + EFI_ACPI_6_3_PPTT_PROCESSOR_IS_NOT_THREAD, + EFI_ACPI_6_3_PPTT_NODE_IS_NOT_LEAF, + EFI_ACPI_6_3_PPTT_IMPLEMENTATION_IDENTICAL + ), + // CM_OBJECT_TOKEN ParentToken + REFERENCE_TOKEN (ProcHierarchyInfo[7]), // -> Package + // CM_OBJECT_TOKEN GicCToken + CM_NULL_TOKEN, + // UINT32 NoOfPrivateResources + CLUSTER_RESOURCE_COUNT, + // CM_OBJECT_TOKEN PrivateResourcesArrayToken + REFERENCE_TOKEN (ClusterResources) + }, + // Cluster1 + { + // CM_OBJECT_TOKEN Token + REFERENCE_TOKEN (ProcHierarchyInfo[9]), + // UINT32 Flags + PROC_NODE_FLAGS ( + EFI_ACPI_6_3_PPTT_PACKAGE_NOT_PHYSICAL, + EFI_ACPI_6_3_PPTT_PROCESSOR_ID_INVALID, + EFI_ACPI_6_3_PPTT_PROCESSOR_IS_NOT_THREAD, + EFI_ACPI_6_3_PPTT_NODE_IS_NOT_LEAF, + EFI_ACPI_6_3_PPTT_IMPLEMENTATION_IDENTICAL + ), + // CM_OBJECT_TOKEN ParentToken + REFERENCE_TOKEN (ProcHierarchyInfo[7]), // -> Package + // CM_OBJECT_TOKEN GicCToken + CM_NULL_TOKEN, + // UINT32 NoOfPrivateResources + CLUSTER_RESOURCE_COUNT, + // CM_OBJECT_TOKEN PrivateResourcesArrayToken + REFERENCE_TOKEN (ClusterResources) + }, + // Cluster0 - Cpu0 + { + // CM_OBJECT_TOKEN Token + REFERENCE_TOKEN (ProcHierarchyInfo[10]), + // UINT32 Flags + PROC_NODE_FLAGS ( + EFI_ACPI_6_3_PPTT_PACKAGE_NOT_PHYSICAL, + EFI_ACPI_6_3_PPTT_PROCESSOR_ID_VALID, + EFI_ACPI_6_3_PPTT_PROCESSOR_IS_NOT_THREAD, + EFI_ACPI_6_3_PPTT_NODE_IS_LEAF, + EFI_ACPI_6_3_PPTT_IMPLEMENTATION_NOT_IDENTICAL + ), + // CM_OBJECT_TOKEN ParentToken + REFERENCE_TOKEN (ProcHierarchyInfo[8]), // -> 'cluster in Cluster0 + // CM_OBJECT_TOKEN GicCToken + REFERENCE_TOKEN (GicCInfo[4]), + // UINT32 NoOfPrivateResources + CORE_RESOURCE_COUNT, + // CM_OBJECT_TOKEN PrivateResourcesArrayToken + REFERENCE_TOKEN (CoreResources) + }, + // Cluster0 - Cpu1 + { + // CM_OBJECT_TOKEN Token + REFERENCE_TOKEN (ProcHierarchyInfo[11]), + // UINT32 Flags + PROC_NODE_FLAGS ( + EFI_ACPI_6_3_PPTT_PACKAGE_NOT_PHYSICAL, + EFI_ACPI_6_3_PPTT_PROCESSOR_ID_VALID, + EFI_ACPI_6_3_PPTT_PROCESSOR_IS_NOT_THREAD, + EFI_ACPI_6_3_PPTT_NODE_IS_LEAF, + EFI_ACPI_6_3_PPTT_IMPLEMENTATION_NOT_IDENTICAL + ), + // CM_OBJECT_TOKEN ParentToken + REFERENCE_TOKEN (ProcHierarchyInfo[8]), // -> 'cluster in Cluster0 + // CM_OBJECT_TOKEN GicCToken + REFERENCE_TOKEN (GicCInfo[5]), + // UINT32 NoOfPrivateResources + CORE_RESOURCE_COUNT, + // CM_OBJECT_TOKEN PrivateResourcesArrayToken + REFERENCE_TOKEN (CoreResources) + }, + // Cluster1 - Cpu0 + { + // CM_OBJECT_TOKEN Token + REFERENCE_TOKEN (ProcHierarchyInfo[10]), + // UINT32 Flags + PROC_NODE_FLAGS ( + EFI_ACPI_6_3_PPTT_PACKAGE_NOT_PHYSICAL, + EFI_ACPI_6_3_PPTT_PROCESSOR_ID_VALID, + EFI_ACPI_6_3_PPTT_PROCESSOR_IS_NOT_THREAD, + EFI_ACPI_6_3_PPTT_NODE_IS_LEAF, + EFI_ACPI_6_3_PPTT_IMPLEMENTATION_NOT_IDENTICAL + ), + // CM_OBJECT_TOKEN ParentToken + REFERENCE_TOKEN (ProcHierarchyInfo[9]), // -> 'cluster in Cluster1 + // CM_OBJECT_TOKEN GicCToken + REFERENCE_TOKEN (GicCInfo[6]), + // UINT32 NoOfPrivateResources + CORE_RESOURCE_COUNT, + // CM_OBJECT_TOKEN PrivateResourcesArrayToken + REFERENCE_TOKEN (CoreResources) + }, + // Cluster1 - Cpu1 + { + // CM_OBJECT_TOKEN Token + REFERENCE_TOKEN (ProcHierarchyInfo[11]), + // UINT32 Flags + PROC_NODE_FLAGS ( + EFI_ACPI_6_3_PPTT_PACKAGE_NOT_PHYSICAL, + EFI_ACPI_6_3_PPTT_PROCESSOR_ID_VALID, + EFI_ACPI_6_3_PPTT_PROCESSOR_IS_NOT_THREAD, + EFI_ACPI_6_3_PPTT_NODE_IS_LEAF, + EFI_ACPI_6_3_PPTT_IMPLEMENTATION_NOT_IDENTICAL + ), + // CM_OBJECT_TOKEN ParentToken + REFERENCE_TOKEN (ProcHierarchyInfo[9]), // -> 'cluster in Cluster1 + // CM_OBJECT_TOKEN GicCToken + REFERENCE_TOKEN (GicCInfo[7]), + // UINT32 NoOfPrivateResources + CORE_RESOURCE_COUNT, + // CM_OBJECT_TOKEN PrivateResourcesArrayToken + REFERENCE_TOKEN (CoreResources) + }, + }, + + // Cache information + { + // 'cluster's L3 cache + { + REFERENCE_TOKEN (CacheInfo[0]), // CM_OBJECT_TOKEN Token + CM_NULL_TOKEN, // CM_OBJECT_TOKEN NextLevelOfCach= eToken + SIZE_1MB, // UINT32 Size + 2048, // UINT32 NumberOfSets + 8, // UINT32 Associativity + CACHE_ATTRIBUTES ( // UINT8 Attributes + EFI_ACPI_6_3_CACHE_ATTRIBUTES_ALLOCATION_READ, + EFI_ACPI_6_3_CACHE_ATTRIBUTES_CACHE_TYPE_UNIFIED, + EFI_ACPI_6_3_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_BACK + ), + 64 // UINT16 LineSize + }, + // 'core's L1 instruction cache + { + REFERENCE_TOKEN (CacheInfo[1]), // CM_OBJECT_TOKEN Token + REFERENCE_TOKEN (CacheInfo[3]), // CM_OBJECT_TOKEN NextLevelOfCach= eToken + SIZE_64KB, // UINT32 Size + 256, // UINT32 NumberOfSets + 4, // UINT32 Associativity + CACHE_ATTRIBUTES ( // UINT8 Attributes + EFI_ACPI_6_3_CACHE_ATTRIBUTES_ALLOCATION_READ, + EFI_ACPI_6_3_CACHE_ATTRIBUTES_CACHE_TYPE_INSTRUCTION, + EFI_ACPI_6_3_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_BACK + ), + 64 // UINT16 LineSize + }, + // 'core's L1 data cache + { + REFERENCE_TOKEN (CacheInfo[2]), // CM_OBJECT_TOKEN Token + REFERENCE_TOKEN (CacheInfo[3]), // CM_OBJECT_TOKEN NextLevelOfCach= eToken + SIZE_64KB, // UINT32 Size + 256, // UINT32 NumberOfSets + 4, // UINT32 Associativity + CACHE_ATTRIBUTES ( // UINT8 Attributes + EFI_ACPI_6_3_CACHE_ATTRIBUTES_ALLOCATION_READ_WRITE, + EFI_ACPI_6_3_CACHE_ATTRIBUTES_CACHE_TYPE_DATA, + EFI_ACPI_6_3_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_BACK + ), + 64 // UINT16 LineSize + }, + // cores's L2 cache + { + REFERENCE_TOKEN (CacheInfo[3]), // CM_OBJECT_TOKEN Token + CM_NULL_TOKEN, // CM_OBJECT_TOKEN NextLevelOfCach= eToken + SIZE_1MB, // UINT32 Size + 2048, // UINT32 NumberOfSets + 8, // UINT32 Associativity + CACHE_ATTRIBUTES ( // UINT8 Attributes + EFI_ACPI_6_3_CACHE_ATTRIBUTES_ALLOCATION_READ, + EFI_ACPI_6_3_CACHE_ATTRIBUTES_CACHE_TYPE_UNIFIED, + EFI_ACPI_6_3_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_BACK + ), + 64 // UINT16 LineSize + }, + // slc cache + { + REFERENCE_TOKEN (CacheInfo[4]), // CM_OBJECT_TOKEN Token + CM_NULL_TOKEN, // CM_OBJECT_TOKEN NextLevelOfCach= eToken + SIZE_8MB, // UINT32 Size + 8192, // UINT32 NumberOfSets + 16, // UINT32 Associativity + CACHE_ATTRIBUTES ( // UINT8 Attributes + EFI_ACPI_6_3_CACHE_ATTRIBUTES_ALLOCATION_READ, + EFI_ACPI_6_3_CACHE_ATTRIBUTES_CACHE_TYPE_UNIFIED, + EFI_ACPI_6_3_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_BACK + ), + 64 // UINT16 LineSize + }, + }, + + // Resources private to the 'cluster (shared among cores) in Cluster + { + { REFERENCE_TOKEN (CacheInfo[0]) } // -> 'cluster's L3 cache in Clust= er + }, + + // Resources private to each individual 'core instance in Cluster + { + { REFERENCE_TOKEN (CacheInfo[1]) }, // -> 'core's L1 I-cache in Cluster + { REFERENCE_TOKEN (CacheInfo[2]) } // -> 'core's L1 D-cache in Cluster + }, + + // Resources private to the SoC + { + { REFERENCE_TOKEN (CacheInfo[4]) }, // -> slc for SoC + }, + + // ITS group node + { + { + // Reference token for this Iort node + REFERENCE_TOKEN (ItsGroupInfo[ITS_SMMU_CCIX]), + // The number of ITS identifiers in the ITS node. + 1, + // Reference token for the ITS identifier array + REFERENCE_TOKEN (ItsIdentifierArray[ITS_SMMU_CCIX]) + }, + { + // Reference token for this Iort node + REFERENCE_TOKEN (ItsGroupInfo[ITS_SMMU_PCIE]), + // The number of ITS identifiers in the ITS node. + 1, + // Reference token for the ITS identifier array + REFERENCE_TOKEN (ItsIdentifierArray[ITS_SMMU_PCIE]) + }, + { + // Reference token for this Iort node + REFERENCE_TOKEN (ItsGroupInfo[ITS_CCIX]), + // The number of ITS identifiers in the ITS node. + 1, + // Reference token for the ITS identifier array + REFERENCE_TOKEN (ItsIdentifierArray[ITS_CCIX]) + }, + { + // Reference token for this Iort node + REFERENCE_TOKEN (ItsGroupInfo[ITS_PCIE]), + // The number of ITS identifiers in the ITS node. + 1, + // Reference token for the ITS identifier array + REFERENCE_TOKEN (ItsIdentifierArray[ITS_PCIE]) + }, + //Remote Chip ITS + { + REFERENCE_TOKEN (ItsGroupInfo[ITS_REMOTE_SMMU_PCIE]), + 1, + REFERENCE_TOKEN (ItsIdentifierArray[ITS_REMOTE_SMMU_PCIE]) + }, + { + REFERENCE_TOKEN (ItsGroupInfo[ITS_REMOTE_PCIE]), + 1, + REFERENCE_TOKEN (ItsIdentifierArray[ITS_REMOTE_PCIE]) + }, + }, + + // ITS identifier array + { + { + // The ITS Identifier - 0 + ITS_SMMU_CCIX + }, + { + // The ITS Identifier - 1 + ITS_SMMU_PCIE + }, + { + // The ITS Identifier - 2 + ITS_CCIX + }, + { + // The ITS Identifier - 3 + ITS_PCIE + }, + { + // The ITS Identifier - 4 + ITS_REMOTE_SMMU_PCIE + }, + { + // The ITS Identifier - 5 + ITS_REMOTE_PCIE + } + }, + + { + // SMMUv3 Node + { + // Reference token for this Iort node + REFERENCE_TOKEN (SmmuV3Info[SMMUV3INFO_PCIE]), + // Number of ID mappings + 2, + // Reference token for the ID mapping array + REFERENCE_TOKEN (DeviceIdMapping[DEVICEIDMAPPING_SMMU_PCIE][0]), + // SMMU Base Address + 0x4F400000, + // SMMU flags + EFI_ACPI_IORT_SMMUv3_FLAG_COHAC_OVERRIDE, + // VATOS address + 0, + // Model + EFI_ACPI_IORT_SMMUv3_MODEL_GENERIC, + // GSIV of the Event interrupt if SPI based + 0x10B, + // PRI Interrupt if SPI based + 0, + // GERR interrupt if GSIV based + 0x10D, + // Sync interrupt if GSIV based + 0x10C, + // Proximity domain flag, ignored in this case + 0, + // Index into the array of ID mapping + 1 + }, + // SMMUv3 Node + { + // Reference token for this Iort node + REFERENCE_TOKEN (SmmuV3Info[SMMUV3INFO_CCIX]), + // Number of ID mappings + 2, + // Reference token for the ID mapping array + REFERENCE_TOKEN (DeviceIdMapping[DEVICEIDMAPPING_SMMU_CCIX][0]), + // SMMU Base Address + 0x4F000000, + // SMMU flags + EFI_ACPI_IORT_SMMUv3_FLAG_COHAC_OVERRIDE, + // VATOS address + 0, + // Model + EFI_ACPI_IORT_SMMUv3_MODEL_GENERIC, + // GSIV of the Event interrupt if SPI based + 0x104, + // PRI Interrupt if SPI based + 0, + // GERR interrupt if GSIV based + 0x106, + // Sync interrupt if GSIV based + 0x105, + // Proximity domain flag, ignored in this case + 0, + // Index into the array of ID mapping + 1 + }, + //Remote Chip SMMU V3 setting + { + REFERENCE_TOKEN (SmmuV3Info[SMMUV3INFO_REMOTE_PCIE]), + 2, + REFERENCE_TOKEN (DeviceIdMapping[DEVICEIDMAPPING_REMOTE_SMMU_PCIE][0= ]), + 0x4004f400000, + EFI_ACPI_IORT_SMMUv3_FLAG_COHAC_OVERRIDE, + 0, + EFI_ACPI_IORT_SMMUv3_MODEL_GENERIC, + 747, + 0, + 749, + 748, + 0, + 1 + } + }, + + { + // Root Complex node info + { + // Reference token for this Iort node + REFERENCE_TOKEN (RootComplexInfo[0]), + // Number of ID mappings + 1, + // Reference token for the ID mapping array + REFERENCE_TOKEN (DeviceIdMapping[DEVICEIDMAPPING_PCIE][0]), + // Memory access properties : Cache coherent attributes + EFI_ACPI_IORT_MEM_ACCESS_PROP_CCA, + // Memory access properties : Allocation hints + 0, + // Memory access properties : Memory access flags + 0, + // ATS attributes + EFI_ACPI_IORT_ROOT_COMPLEX_ATS_SUPPORTED, + // PCI segment number + 0, + // Memory address size limit + 42 + }, + // Root Complex node info + { + // Reference token for this Iort node + REFERENCE_TOKEN (RootComplexInfo[1]), + // Number of ID mappings + 1, + // Reference token for the ID mapping array + REFERENCE_TOKEN (DeviceIdMapping[DEVICEIDMAPPING_PCIE][1]), + // Memory access properties : Cache coherent attributes + EFI_ACPI_IORT_MEM_ACCESS_PROP_CCA, + // Memory access properties : Allocation hints + 0, + // Memory access properties : Memory access flags + 0, + // ATS attributes + EFI_ACPI_IORT_ROOT_COMPLEX_ATS_SUPPORTED, + // PCI segment number + 1, + // Memory address size limit + 42 + }, + //Remote Chip Root Complex node Info + { + REFERENCE_TOKEN (RootComplexInfo[ROOT_REMOTE_PCIE]), + 1, + REFERENCE_TOKEN (DeviceIdMapping[DEVICEIDMAPPING_REMOTE_PCIE][0]), + EFI_ACPI_IORT_MEM_ACCESS_PROP_CCA, + 0, + 0, + EFI_ACPI_IORT_ROOT_COMPLEX_ATS_SUPPORTED, + 2, + 42 + } + }, + + // Array of Device ID mappings + { + // DeviceIdMapping[0][0] - [0][1] + { + // Mapping SMMUv3 -> ITS Group + // SMMUv3 device ID mapping + { + // Input base + 0x0, + // Number of input IDs + 0x0000FFFF, + // Output Base + 0x0, + // Output reference + REFERENCE_TOKEN (ItsGroupInfo[ITS_PCIE]), + // Flags + 0 + }, + // SMMUv3 device ID mapping + { + // Input base + 0x0, + // Number of input IDs + 0x00000001, + // Output Base + 0x0, + // Output reference token for the IORT node + REFERENCE_TOKEN (ItsGroupInfo[ITS_SMMU_PCIE]), + // Flags + EFI_ACPI_IORT_ID_MAPPING_FLAGS_SINGLE + } + }, + // DeviceIdMapping[1][0] - [1][1] + { + // Mapping SMMUv3 -> ITS Group + // SMMUv3 device ID mapping + { + // Input base + 0x0, + // Number of input IDs + 0x0000FFFF, + // Output Base + 0x0, + // Output reference + REFERENCE_TOKEN (ItsGroupInfo[ITS_CCIX]), + // Flags + 0 + }, + // SMMUv3 device ID mapping + { + // Input base + 0x0, + // Number of input IDs + 0x00000001, + // Output Base + 0x0, + // Output reference token for the IORT node + REFERENCE_TOKEN (ItsGroupInfo[ITS_SMMU_CCIX]), + // Flags + EFI_ACPI_IORT_ID_MAPPING_FLAGS_SINGLE + } + }, + // DeviceIdMapping[2][0] - [2][1] + { + // Mapping for RootComplex -> SMMUv3 + // Device ID mapping for Root complex node + { + // Input base + 0x0, + // Number of input IDs + 0x0000FFFF, + // Output Base + 0x0, + // Output reference + REFERENCE_TOKEN (SmmuV3Info[SMMUV3INFO_PCIE]), + // Flags + 0 + }, + // Device ID mapping for Root complex node + { + // Input base + 0x0, + // Number of input IDs + 0x0000FFFF, + // Output Base + 0x0, + // Output reference token for the IORT node + REFERENCE_TOKEN (SmmuV3Info[SMMUV3INFO_CCIX]), + // Flags + 0 + } + }, + // Mapping of Remote Chip SMMUv3 -> ITS Group + { + { + 0x0, + 0x0000ffff, + 0x0, + REFERENCE_TOKEN (ItsGroupInfo[ITS_REMOTE_PCIE]), + 0 + }, + { + 0x0, + 0x00000001, + 0x0, + REFERENCE_TOKEN (ItsGroupInfo[ITS_REMOTE_SMMU_PCIE]), + EFI_ACPI_IORT_ID_MAPPING_FLAGS_SINGLE + } + }, + // Mapping for Remote Chip RootComplex -> SMMUv3 + { + { + 0x0, + 0x0000ffff, + 0x0, + REFERENCE_TOKEN (SmmuV3Info[SMMUV3INFO_REMOTE_PCIE]), + 0 + } + }, + }, + + // PCI Configuration Space Info + { + // PCIe ECAM + { + 0x70000000, // Base Address + 0x0, // Segment Group Number + 0x0, // Start Bus Number + 17 // End Bus Number + }, + // CCIX ECAM + { + 0x68000000, // Base Address + 0x1, // Segment Group Number + 0x0, // Start Bus Number + 17 // End Bus Number + }, + //Remote Chip PCIe ECAM + { + 0x40070000000, // Base Address + 0x2, // Segment Group Number + 0x0, // Start Bus Number + 17 // End Bus Number + } + }, + + // Memory Affinity Info + { + { + // Proximity domain to which memory range belongs + 0, + //Base Address + 0x80000000, + //Length + 0x80000000, + //Flags + EFI_ACPI_6_3_MEMORY_ENABLED + }, + { + // Proximity domain to which memory range belongs + 0, + //Base Address + 0x8080000000, + //Length is updated dynamically from SRAM + 0, + //Flags + EFI_ACPI_6_3_MEMORY_ENABLED + } + } + +}; + +/** A helper function for returning the Configuration Manager Objects. + @param [in] CmObjectId The Configuration Manager Object ID. + @param [in] Object Pointer to the Object(s). + @param [in] ObjectSize Total size of the Object(s). + @param [in] ObjectCount Number of Objects. + @param [in, out] CmObjectDesc Pointer to the Configuration Manager Ob= ject + descriptor describing the requested Obj= ect. + @retval EFI_SUCCESS Success. +**/ +STATIC +EFI_STATUS +EFIAPI +HandleCmObject ( + IN CONST CM_OBJECT_ID CmObjectId, + IN VOID * Object, + IN CONST UINTN ObjectSize, + IN CONST UINTN ObjectCount, + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObjectDesc + ) +{ + CmObjectDesc->ObjectId =3D CmObjectId; + CmObjectDesc->Size =3D ObjectSize; + CmObjectDesc->Data =3D (VOID*)Object; + CmObjectDesc->Count =3D ObjectCount; + DEBUG (( + DEBUG_INFO, + "INFO: CmObjectId =3D %x, Ptr =3D 0x%p, Size =3D %d, Count =3D %d\n", + CmObjectId, + CmObjectDesc->Data, + CmObjectDesc->Size, + CmObjectDesc->Count + )); + return EFI_SUCCESS; +} + +/** A helper function for returning the Configuration Manager Objects that + match the token. + @param [in] This Pointer to the Configuration Manager Pro= tocol. + @param [in] CmObjectId The Configuration Manager Object ID. + @param [in] Object Pointer to the Object(s). + @param [in] ObjectSize Total size of the Object(s). + @param [in] ObjectCount Number of Objects. + @param [in] Token A token identifying the object. + @param [in] HandlerProc A handler function to search the object + referenced by the token. + @param [in, out] CmObjectDesc Pointer to the Configuration Manager Obj= ect + descriptor describing the requested Obje= ct. + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not fou= nd. +**/ +STATIC +EFI_STATUS +EFIAPI +HandleCmObjectRefByToken ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN VOID * Object, + IN CONST UINTN ObjectSize, + IN CONST UINTN ObjectCount, + IN CONST CM_OBJECT_TOKEN Token, + IN CONST CM_OBJECT_HANDLER_PROC HandlerProc, + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObjectDesc + ) +{ + EFI_STATUS Status; + CmObjectDesc->ObjectId =3D CmObjectId; + if (Token =3D=3D CM_NULL_TOKEN) { + CmObjectDesc->Size =3D ObjectSize; + CmObjectDesc->Data =3D (VOID*)Object; + CmObjectDesc->Count =3D ObjectCount; + Status =3D EFI_SUCCESS; + } else { + Status =3D HandlerProc (This, CmObjectId, Token, CmObjectDesc); + } + + DEBUG (( + DEBUG_INFO, + "INFO: Token =3D 0x%p, CmObjectId =3D %x, Ptr =3D 0x%p, Size =3D %d, C= ount =3D %d\n", + (VOID*)Token, + CmObjectId, + CmObjectDesc->Data, + CmObjectDesc->Size, + CmObjectDesc->Count + )); + return Status; +} + +/** A helper function for returning Configuration Manager Object(s) refere= nced + by token when the entire platform repository is in scope and the + CM_NULL_TOKEN value is not allowed. + @param [in] This Pointer to the Configuration Manager Pro= tocol. + @param [in] CmObjectId The Configuration Manager Object ID. + @param [in] Token A token identifying the object. + @param [in] HandlerProc A handler function to search the object(= s) + referenced by the token. + @param [in, out] CmObjectDesc Pointer to the Configuration Manager Obj= ect + descriptor describing the requested Obje= ct. + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not fou= nd. +**/ +STATIC +EFI_STATUS +EFIAPI +HandleCmObjectSearchPlatformRepo ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN CONST CM_OBJECT_TOKEN Token, + IN CONST CM_OBJECT_HANDLER_PROC HandlerProc, + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObjectDesc + ) +{ + EFI_STATUS Status; + CmObjectDesc->ObjectId =3D CmObjectId; + if (Token =3D=3D CM_NULL_TOKEN) { + DEBUG (( + DEBUG_ERROR, + "ERROR: CM_NULL_TOKEN value is not allowed when searching" + " the entire platform repository.\n" + )); + return EFI_INVALID_PARAMETER; + } + + Status =3D HandlerProc (This, CmObjectId, Token, CmObjectDesc); + DEBUG (( + DEBUG_INFO, + "INFO: Token =3D 0x%p, CmObjectId =3D %x, Ptr =3D 0x%p, Size =3D %d, C= ount =3D %d\n", + CmObjectId, + (VOID*)Token, + CmObjectDesc->Data, + CmObjectDesc->Size, + CmObjectDesc->Count + )); + return Status; +} + +/** Initialize the Platform Configuration Repository. + @param [in] PlatformRepo Pointer to the Configuration Manager Pr= otocol. + @retval EFI_SUCCESS Success +**/ +STATIC +EFI_STATUS +EFIAPI +InitializePlatformRepository ( + IN EDKII_PLATFORM_REPOSITORY_INFO * CONST PlatRepoInfo + ) +{ + NEOVERSEN1SOC_PLAT_INFO *PlatInfo; + UINT64 Dram2Size; + UINT64 RemoteDdrSize; + + RemoteDdrSize =3D 0; + + PlatInfo =3D (NEOVERSEN1SOC_PLAT_INFO *)NEOVERSEN1SOC_PLAT_INFO_STRUCT_B= ASE; + Dram2Size =3D ((PlatInfo->LocalDdrSize - 2) * SIZE_1GB); + + PlatRepoInfo->MemAffInfo[LOCAL_DDR_REGION2].Length =3D Dram2Size; + + if (PlatInfo->MultichipMode =3D=3D 1) { + RemoteDdrSize =3D ((PlatInfo->RemoteDdrSize - 2) * SIZE_1GB); + + // Update Remote DDR Region1 + PlatRepoInfo->MemAffInfo[REMOTE_DDR_REGION1].ProximityDomain =3D 1; + PlatRepoInfo->MemAffInfo[REMOTE_DDR_REGION1]. \ + BaseAddress =3D FixedPcdGet64 (PcdExtMemorySpace) + + FixedPcdGet64 (PcdSystemMemoryBase); + PlatRepoInfo->MemAffInfo[REMOTE_DDR_REGION1]. \ + Length =3D FixedPcdGet64 (PcdSystemMemorySize); + PlatRepoInfo->MemAffInfo[REMOTE_DDR_REGION1]. \ + Flags =3D EFI_ACPI_6_3_MEMORY_ENABLED; + + // Update Remote DDR Region2 + PlatRepoInfo->MemAffInfo[REMOTE_DDR_REGION2]. \ + ProximityDomain =3D 1; + PlatRepoInfo->MemAffInfo[REMOTE_DDR_REGION2]. \ + BaseAddress =3D FixedPcdGet64 (PcdExtMemorySpace) + + FixedPcdGet64 (PcdDramBlock2Base); + PlatRepoInfo->MemAffInfo[REMOTE_DDR_REGION2]. \ + Length =3D RemoteDdrSize; + PlatRepoInfo->MemAffInfo[REMOTE_DDR_REGION2]. \ + Flags =3D EFI_ACPI_6_3_MEMORY_ENABLED; + } + + return EFI_SUCCESS; +} + +/** Return a GT Block timer frame info list. + + @param [in] This Pointer to the Configuration Manager Prot= ocol. + @param [in] CmObjectId The Configuration Manager Object ID. + @param [in] Token A token for identifying the object + @param [in, out] CmObject Pointer to the Configuration Manager Obje= ct + descriptor describing the requested Objec= t. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not fo= und. +**/ +EFI_STATUS +EFIAPI +GetGTBlockTimerFrameInfo ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN CONST CM_OBJECT_TOKEN Token, + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObject + ) +{ + EDKII_PLATFORM_REPOSITORY_INFO * PlatformRepo; + + if ((This =3D=3D NULL) || (CmObject =3D=3D NULL)) { + ASSERT (This !=3D NULL); + ASSERT (CmObject !=3D NULL); + return EFI_INVALID_PARAMETER; + } + + PlatformRepo =3D This->PlatRepoInfo; + + if (Token !=3D (CM_OBJECT_TOKEN)&PlatformRepo->GTBlock0TimerInfo) { + return EFI_NOT_FOUND; + } + + CmObject->ObjectId =3D CmObjectId; + CmObject->Size =3D sizeof (PlatformRepo->GTBlock0TimerInfo); + CmObject->Data =3D (VOID*)&PlatformRepo->GTBlock0TimerInfo; + CmObject->Count =3D ARRAY_SIZE (PlatformRepo->GTBlock0TimerInfo); + return EFI_SUCCESS; +} + +/** Return an ITS identifier array. + + @param [in] This Pointer to the Configuration Manager Prot= ocol. + @param [in] CmObjectId The Configuration Manager Object ID. + @param [in] Token A token for identifying the object + @param [in, out] CmObject Pointer to the Configuration Manager Obje= ct + descriptor describing the requested Objec= t. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not fo= und. +**/ +EFI_STATUS +EFIAPI +GetItsIdentifierArray ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN CONST CM_OBJECT_TOKEN Token, + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObject + ) +{ + EDKII_PLATFORM_REPOSITORY_INFO * PlatformRepo; + UINTN Count; + UINTN Index; + + if ((This =3D=3D NULL) || (CmObject =3D=3D NULL)) { + ASSERT (This !=3D NULL); + ASSERT (CmObject !=3D NULL); + return EFI_INVALID_PARAMETER; + } + + PlatformRepo =3D This->PlatRepoInfo; + + Count =3D ARRAY_SIZE (PlatformRepo->ItsIdentifierArray); + + for (Index =3D 0; Index < Count; Index++) { + if (Token =3D=3D (CM_OBJECT_TOKEN)&PlatformRepo->ItsIdentifierArray[In= dex]) { + CmObject->ObjectId =3D CmObjectId; + CmObject->Size =3D sizeof (PlatformRepo->ItsIdentifierArray[0]); + CmObject->Data =3D (VOID*)&PlatformRepo->ItsIdentifierArray[Index]; + CmObject->Count =3D 1; + return EFI_SUCCESS; + } + } + + return EFI_NOT_FOUND; +} + +/** Return an ITS group info. + + @param [in] This Pointer to the Configuration Manager Prot= ocol. + @param [in] CmObjectId The Configuration Manager Object ID. + @param [in] Token A token for identifying the object + @param [in, out] CmObject Pointer to the Configuration Manager Obje= ct + descriptor describing the requested Objec= t. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not fo= und. +**/ +EFI_STATUS +EFIAPI +GetItsGroupInfo ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN CONST CM_OBJECT_TOKEN Token, + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObject + ) +{ + EDKII_PLATFORM_REPOSITORY_INFO * PlatformRepo; + UINTN Count; + UINTN Index; + + if ((This =3D=3D NULL) || (CmObject =3D=3D NULL)) { + ASSERT (This !=3D NULL); + ASSERT (CmObject !=3D NULL); + return EFI_INVALID_PARAMETER; + } + + PlatformRepo =3D This->PlatRepoInfo; + + Count =3D ARRAY_SIZE (PlatformRepo->ItsGroupInfo); + + for (Index =3D 0; Index < Count; Index++) { + if (Token =3D=3D (CM_OBJECT_TOKEN)&PlatformRepo->ItsGroupInfo[Index]) { + CmObject->ObjectId =3D CmObjectId; + CmObject->Size =3D sizeof (PlatformRepo->ItsGroupInfo[0]); + CmObject->Data =3D (VOID*)&PlatformRepo->ItsGroupInfo[Index]; + CmObject->Count =3D 1; + return EFI_SUCCESS; + } + } + + return EFI_NOT_FOUND; +} + +/** Return a device Id mapping array. + + @param [in] This Pointer to the Configuration Manager Prot= ocol. + @param [in] CmObjectId The Configuration Manager Object ID. + @param [in] Token A token for identifying the object + @param [in, out] CmObject Pointer to the Configuration Manager Obje= ct + descriptor describing the requested Objec= t. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not fo= und. +**/ +EFI_STATUS +EFIAPI +GetDeviceIdMappingArray ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN CONST CM_OBJECT_TOKEN Token, + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObject + ) +{ + EDKII_PLATFORM_REPOSITORY_INFO * PlatformRepo; + UINTN Count; + + if ((This =3D=3D NULL) || (CmObject =3D=3D NULL)) { + ASSERT (This !=3D NULL); + ASSERT (CmObject !=3D NULL); + return EFI_INVALID_PARAMETER; + } + + PlatformRepo =3D This->PlatRepoInfo; + + DEBUG ((DEBUG_INFO, "DeviceIdMapping - Token =3D %p\n")); + + if (Token =3D=3D (CM_OBJECT_TOKEN)&PlatformRepo->DeviceIdMapping[0][0]) { + Count =3D 2; + DEBUG ((DEBUG_INFO, "DeviceIdMapping - Found DeviceIdMapping[0][0]\n")= ); + } else if (Token =3D=3D + (CM_OBJECT_TOKEN)&PlatformRepo->DeviceIdMapping[1][0]) { + Count =3D 2; + DEBUG ((DEBUG_INFO, "DeviceIdMapping - Found DeviceIdMapping[1][0]\n")= ); + } else if (Token =3D=3D + (CM_OBJECT_TOKEN)&PlatformRepo->DeviceIdMapping[2][0]) { + Count =3D 1; + DEBUG ((DEBUG_INFO, "DeviceIdMapping - Found DeviceIdMapping[2][0]\n")= ); + } else if (Token =3D=3D + (CM_OBJECT_TOKEN)&PlatformRepo->DeviceIdMapping[2][1]) { + Count =3D 1; + DEBUG ((DEBUG_INFO, "DeviceIdMapping - Found DeviceIdMapping[2][1]\n")= ); + } else if (Token =3D=3D + (CM_OBJECT_TOKEN)&PlatformRepo->DeviceIdMapping[DEVICEIDMAPPI= NG_REMOTE_SMMU_PCIE][0]) { + Count =3D 2; + DEBUG ((DEBUG_INFO, "DeviceIdMapping - Found DeviceIdMapping[DEVICEIDM= APPING_REMOTE_SMMU_PCIE][0]\n")); + } else if (Token =3D=3D + (CM_OBJECT_TOKEN)&PlatformRepo->DeviceIdMapping[DEVICEIDMAPPI= NG_REMOTE_PCIE][0]) { + Count =3D 1; + DEBUG ((DEBUG_INFO, "DeviceIdMapping - Found DeviceIdMapping[DEVICEIDM= APPING_REMOTE_PCIE][0]\n")); + } else { + DEBUG ((DEBUG_INFO, "DeviceIdMapping - Not Found\n")); + return EFI_NOT_FOUND; + } + + CmObject->Data =3D (VOID*)Token; + CmObject->ObjectId =3D CmObjectId; + CmObject->Count =3D Count; + CmObject->Size =3D Count * sizeof (CM_ARM_ID_MAPPING); + + return EFI_SUCCESS; +} + +/** Return GIC CPU Interface Info. + + @param [in] This Pointer to the Configuration Manager Prot= ocol. + @param [in] CmObjectId The Object ID of the CM object requested + @param [in] SearchToken A unique token for identifying the reques= ted + CM_ARM_GICC_INFO object. + @param [in, out] CmObject Pointer to the Configuration Manager Obje= ct + descriptor describing the requested Objec= t. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not fo= und. +**/ +EFI_STATUS +EFIAPI +GetGicCInfo ( + 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; + NEOVERSEN1SOC_PLAT_INFO *PlatInfo; + UINT32 TotalObjCount; + UINT32 ObjIndex; + + if ((This =3D=3D NULL) || (CmObject =3D=3D NULL)) { + ASSERT (This !=3D NULL); + ASSERT (CmObject !=3D NULL); + return EFI_INVALID_PARAMETER; + } + + PlatformRepo =3D This->PlatRepoInfo; + PlatInfo =3D (NEOVERSEN1SOC_PLAT_INFO *)NEOVERSEN1SOC_PLAT_INFO_STRUCT_B= ASE; + + if (PlatInfo->MultichipMode =3D=3D 1) { + TotalObjCount =3D PLAT_CPU_COUNT * 2; + } else { + TotalObjCount =3D PLAT_CPU_COUNT; + } + + for (ObjIndex =3D 0; ObjIndex < TotalObjCount; ObjIndex++) { + if (SearchToken =3D=3D (CM_OBJECT_TOKEN)&PlatformRepo->GicCInfo[ObjInd= ex]) { + CmObject->ObjectId =3D CmObjectId; + CmObject->Size =3D sizeof (PlatformRepo->GicCInfo[ObjIndex]); + CmObject->Data =3D (VOID*)&PlatformRepo->GicCInfo[ObjIndex]; + CmObject->Count =3D 1; + return EFI_SUCCESS; + } + } + + return EFI_NOT_FOUND; +} + +/** Return a list of Configuration Manager object references pointed to by= the + given input token. + + @param [in] This Pointer to the Configuration Manager Prot= ocol. + @param [in] CmObjectId The Object ID of the CM object requested + @param [in] SearchToken A unique token for identifying the reques= ted + CM_ARM_OBJ_REF list. + @param [in, out] CmObject Pointer to the Configuration Manager Obje= ct + descriptor describing the requested Objec= t. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not fo= und. +**/ +EFI_STATUS +EFIAPI +GetCmObjRefs ( + 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; + + if ((This =3D=3D NULL) || (CmObject =3D=3D NULL)) { + ASSERT (This !=3D NULL); + ASSERT (CmObject !=3D NULL); + return EFI_INVALID_PARAMETER; + } + + PlatformRepo =3D This->PlatRepoInfo; + + if (SearchToken =3D=3D (CM_OBJECT_TOKEN)&PlatformRepo->ClusterResources)= { + CmObject->Size =3D sizeof (PlatformRepo->ClusterResources); + CmObject->Data =3D (VOID*)&PlatformRepo->ClusterResources; + CmObject->Count =3D ARRAY_SIZE (PlatformRepo->ClusterResources); + return EFI_SUCCESS; + } + if (SearchToken =3D=3D (CM_OBJECT_TOKEN)&PlatformRepo->CoreResources) { + CmObject->Size =3D sizeof (PlatformRepo->CoreResources); + CmObject->Data =3D (VOID*)&PlatformRepo->CoreResources; + CmObject->Count =3D ARRAY_SIZE (PlatformRepo->CoreResources); + return EFI_SUCCESS; + } + if (SearchToken =3D=3D (CM_OBJECT_TOKEN)&PlatformRepo->SocResources) { + CmObject->Size =3D sizeof (PlatformRepo->SocResources); + CmObject->Data =3D (VOID*)&PlatformRepo->SocResources; + CmObject->Count =3D ARRAY_SIZE (PlatformRepo->SocResources); + return EFI_SUCCESS; + } + + return EFI_NOT_FOUND; +} + +/** Return a standard namespace object. + + @param [in] This Pointer to the Configuration Manager Prot= ocol. + @param [in] CmObjectId The Configuration Manager Object ID. + @param [in] Token An optional token identifying the object.= If + unused this must be CM_NULL_TOKEN. + @param [in, out] CmObject Pointer to the Configuration Manager Obje= ct + descriptor describing the requested Objec= t. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not fo= und. +**/ +EFI_STATUS +EFIAPI +GetStandardNameSpaceObject ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN CONST CM_OBJECT_TOKEN Token OPTIONAL, + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObject + ) +{ + EFI_STATUS Status; + EDKII_PLATFORM_REPOSITORY_INFO * PlatformRepo; + NEOVERSEN1SOC_PLAT_INFO *PlatInfo; + UINT32 AcpiTableCount; + + if ((This =3D=3D NULL) || (CmObject =3D=3D NULL)) { + ASSERT (This !=3D NULL); + ASSERT (CmObject !=3D NULL); + return EFI_INVALID_PARAMETER; + } + + Status =3D EFI_NOT_FOUND; + PlatformRepo =3D This->PlatRepoInfo; + PlatInfo =3D (NEOVERSEN1SOC_PLAT_INFO *)NEOVERSEN1SOC_PLAT_INFO_STRUCT_B= ASE; + AcpiTableCount =3D ARRAY_SIZE (PlatformRepo->CmAcpiTableList); + if (PlatInfo->MultichipMode =3D=3D 0) + AcpiTableCount -=3D 1; + + switch (GET_CM_OBJECT_ID (CmObjectId)) { + case EStdObjCfgMgrInfo: + Status =3D HandleCmObject ( + CmObjectId, + &PlatformRepo->CmInfo, + sizeof (PlatformRepo->CmInfo), + 1, + CmObject + ); + break; + case EStdObjAcpiTableList: + Status =3D HandleCmObject ( + CmObjectId, + &PlatformRepo->CmAcpiTableList, + sizeof (PlatformRepo->CmAcpiTableList), + AcpiTableCount, + CmObject + ); + break; + default: { + Status =3D EFI_NOT_FOUND; + DEBUG (( + DEBUG_ERROR, + "ERROR: Object 0x%x. Status =3D %r\n", + CmObjectId, + Status + )); + break; + } + } + + return Status; +} + +/** Return an ARM namespace object. + + @param [in] This Pointer to the Configuration Manager Prot= ocol. + @param [in] CmObjectId The Configuration Manager Object ID. + @param [in] Token An optional token identifying the object.= If + unused this must be CM_NULL_TOKEN. + @param [in, out] CmObject Pointer to the Configuration Manager Obje= ct + descriptor describing the requested Objec= t. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not fo= und. +**/ +EFI_STATUS +EFIAPI +GetArmNameSpaceObject ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN CONST CM_OBJECT_TOKEN Token OPTIONAL, + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObject + ) +{ + EFI_STATUS Status; + EDKII_PLATFORM_REPOSITORY_INFO * PlatformRepo; + NEOVERSEN1SOC_PLAT_INFO *PlatInfo; + UINT32 GicRedistCount; + UINT32 GicCpuCount; + UINT32 ProcHierarchyInfoCount; + UINT32 GicItsInfoCount; + UINT32 ItsGroupInfoCount; + UINT32 ItsIdentifierArrayCount; + UINT32 SmmuV3InfoCount; + UINT32 DeviceIdMappingCount; + UINT32 RootComplexInfoCount; + UINT32 PciConfigInfoCount; + + if ((This =3D=3D NULL) || (CmObject =3D=3D NULL)) { + ASSERT (This !=3D NULL); + ASSERT (CmObject !=3D NULL); + return EFI_INVALID_PARAMETER; + } + + Status =3D EFI_NOT_FOUND; + PlatformRepo =3D This->PlatRepoInfo; + + // Probe for multi chip information + PlatInfo =3D (NEOVERSEN1SOC_PLAT_INFO *)NEOVERSEN1SOC_PLAT_INFO_STRUCT_B= ASE; + if (PlatInfo->MultichipMode =3D=3D 1) { + GicRedistCount =3D 2; + GicCpuCount =3D PLAT_CPU_COUNT * 2; + ProcHierarchyInfoCount =3D PLAT_PROC_HIERARCHY_NODE_COUNT * 2; + GicItsInfoCount =3D ITS_MAX; + ItsGroupInfoCount =3D ITS_MAX; + ItsIdentifierArrayCount =3D ITS_MAX; + SmmuV3InfoCount =3D SMMUV3INFO_MAX; + DeviceIdMappingCount =3D DEVICEIDMAPPING_MAX; + RootComplexInfoCount =3D ROOT_PCIE_MAX; + PciConfigInfoCount =3D ROOT_PCIE_MAX; + } else { + GicRedistCount =3D 1; + GicCpuCount =3D PLAT_CPU_COUNT; + ProcHierarchyInfoCount =3D PLAT_PROC_HIERARCHY_NODE_COUNT; + GicItsInfoCount =3D ITS_MASTER_CHIP_MAX; + ItsGroupInfoCount =3D ITS_MASTER_CHIP_MAX; + ItsIdentifierArrayCount =3D ITS_MASTER_CHIP_MAX; + SmmuV3InfoCount =3D SMMUV3INFO_MASTER_CHIP_MAX; + DeviceIdMappingCount =3D DEVICEIDMAPPING_MASTER_CHIP_MAX; + RootComplexInfoCount =3D ROOT_PCIE_MASTER_CHIP_MAX; + PciConfigInfoCount =3D ROOT_PCIE_MASTER_CHIP_MAX; + } + + switch (GET_CM_OBJECT_ID (CmObjectId)) { + case EArmObjBootArchInfo: + Status =3D HandleCmObject ( + CmObjectId, + &PlatformRepo->BootArchInfo, + sizeof (PlatformRepo->BootArchInfo), + 1, + CmObject + ); + break; + + case EArmObjFixedFeatureFlags: + Status =3D HandleCmObject ( + CmObjectId, + &PlatformRepo->FixedFeatureFlags, + sizeof (PlatformRepo->FixedFeatureFlags), + 1, + CmObject + ); + break; + + case EArmObjPowerManagementProfileInfo: + Status =3D HandleCmObject ( + CmObjectId, + &PlatformRepo->PmProfileInfo, + sizeof (PlatformRepo->PmProfileInfo), + 1, + CmObject + ); + break; + + case EArmObjGenericTimerInfo: + Status =3D HandleCmObject ( + CmObjectId, + &PlatformRepo->GenericTimerInfo, + sizeof (PlatformRepo->GenericTimerInfo), + 1, + CmObject + ); + break; + + case EArmObjPlatformGenericWatchdogInfo: + Status =3D HandleCmObject ( + CmObjectId, + &PlatformRepo->Watchdog, + sizeof (PlatformRepo->Watchdog), + 1, + CmObject + ); + break; + + case EArmObjPlatformGTBlockInfo: + Status =3D HandleCmObject ( + CmObjectId, + PlatformRepo->GTBlockInfo, + sizeof (PlatformRepo->GTBlockInfo), + ARRAY_SIZE (PlatformRepo->GTBlockInfo), + CmObject + ); + break; + + case EArmObjGTBlockTimerFrameInfo: + Status =3D HandleCmObjectRefByToken ( + This, + CmObjectId, + PlatformRepo->GTBlock0TimerInfo, + sizeof (PlatformRepo->GTBlock0TimerInfo), + ARRAY_SIZE (PlatformRepo->GTBlock0TimerInfo), + Token, + GetGTBlockTimerFrameInfo, + CmObject + ); + break; + + case EArmObjGicCInfo: + Status =3D HandleCmObjectRefByToken ( + This, + CmObjectId, + PlatformRepo->GicCInfo, + sizeof (PlatformRepo->GicCInfo), + GicCpuCount, + Token, + GetGicCInfo, + CmObject + ); + break; + + case EArmObjGicDInfo: + Status =3D HandleCmObject ( + CmObjectId, + &PlatformRepo->GicDInfo, + sizeof (PlatformRepo->GicDInfo), + 1, + CmObject + ); + break; + + case EArmObjGicRedistributorInfo: + Status =3D HandleCmObject ( + CmObjectId, + PlatformRepo->GicRedistInfo, + sizeof (PlatformRepo->GicRedistInfo), + GicRedistCount, + CmObject + ); + break; + + case EArmObjSerialConsolePortInfo: + Status =3D HandleCmObject ( + CmObjectId, + &PlatformRepo->SpcrSerialPort, + sizeof (PlatformRepo->SpcrSerialPort), + 1, + CmObject + ); + break; + + case EArmObjSerialDebugPortInfo: + Status =3D HandleCmObject ( + CmObjectId, + &PlatformRepo->DbgSerialPort, + sizeof (PlatformRepo->DbgSerialPort), + 1, + CmObject + ); + break; + + case EArmObjGicItsInfo: + Status =3D HandleCmObject ( + CmObjectId, + PlatformRepo->GicItsInfo, + sizeof (PlatformRepo->GicItsInfo), + GicItsInfoCount, + CmObject + ); + break; + + case EArmObjSmmuV3: + Status =3D HandleCmObject ( + CmObjectId, + PlatformRepo->SmmuV3Info, + sizeof (PlatformRepo->SmmuV3Info), + SmmuV3InfoCount, + CmObject + ); + break; + + case EArmObjItsGroup: + Status =3D HandleCmObjectRefByToken ( + This, + CmObjectId, + PlatformRepo->ItsGroupInfo, + sizeof (PlatformRepo->ItsGroupInfo), + ItsGroupInfoCount, + Token, + GetItsGroupInfo, + CmObject + ); + break; + + case EArmObjGicItsIdentifierArray: + Status =3D HandleCmObjectRefByToken ( + This, + CmObjectId, + PlatformRepo->ItsIdentifierArray, + sizeof (PlatformRepo->ItsIdentifierArray), + ItsIdentifierArrayCount, + Token, + GetItsIdentifierArray, + CmObject + ); + break; + + case EArmObjRootComplex: + Status =3D HandleCmObject ( + CmObjectId, + PlatformRepo->RootComplexInfo, + sizeof (PlatformRepo->RootComplexInfo), + RootComplexInfoCount, + CmObject + ); + break; + + case EArmObjIdMappingArray: + Status =3D HandleCmObjectRefByToken ( + This, + CmObjectId, + PlatformRepo->DeviceIdMapping, + sizeof (PlatformRepo->DeviceIdMapping), + DeviceIdMappingCount, + Token, + GetDeviceIdMappingArray, + CmObject + ); + break; + + case EArmObjProcHierarchyInfo: + Status =3D HandleCmObject ( + CmObjectId, + PlatformRepo->ProcHierarchyInfo, + sizeof (PlatformRepo->ProcHierarchyInfo), + ProcHierarchyInfoCount, + CmObject + ); + break; + + case EArmObjCacheInfo: + Status =3D HandleCmObject ( + CmObjectId, + PlatformRepo->CacheInfo, + sizeof (PlatformRepo->CacheInfo), + ARRAY_SIZE (PlatformRepo->CacheInfo), + CmObject + ); + break; + + case EArmObjCmRef: + Status =3D HandleCmObjectSearchPlatformRepo ( + This, + CmObjectId, + Token, + GetCmObjRefs, + CmObject + ); + break; + + case EArmObjPciConfigSpaceInfo: + Status =3D HandleCmObject ( + CmObjectId, + PlatformRepo->PciConfigInfo, + sizeof (PlatformRepo->PciConfigInfo), + PciConfigInfoCount, + CmObject + ); + break; + + case EArmObjMemoryAffinityInfo: + Status =3D HandleCmObject ( + CmObjectId, + PlatformRepo->MemAffInfo, + sizeof (PlatformRepo->MemAffInfo), + ARRAY_SIZE (PlatformRepo->MemAffInfo), + CmObject + ); + break; + + default: { + Status =3D EFI_NOT_FOUND; + DEBUG (( + DEBUG_INFO, + "INFO: Object 0x%x. Status =3D %r\n", + CmObjectId, + Status + )); + break; + } + }//switch + + return Status; +} + +/** Return an OEM namespace object. + + @param [in] This Pointer to the Configuration Manager Prot= ocol. + @param [in] CmObjectId The Configuration Manager Object ID. + @param [in] Token An optional token identifying the object.= If + unused this must be CM_NULL_TOKEN. + @param [in, out] CmObject Pointer to the Configuration Manager Obje= ct + descriptor describing the requested Objec= t. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not fo= und. +**/ +EFI_STATUS +EFIAPI +GetOemNameSpaceObject ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN CONST CM_OBJECT_TOKEN Token OPTIONAL, + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObject + ) +{ + EFI_STATUS Status; + + Status =3D EFI_SUCCESS; + if ((This =3D=3D NULL) || (CmObject =3D=3D NULL)) { + ASSERT (This !=3D NULL); + ASSERT (CmObject !=3D NULL); + return EFI_INVALID_PARAMETER; + } + + switch (GET_CM_OBJECT_ID (CmObjectId)) { + default: { + Status =3D EFI_NOT_FOUND; + DEBUG (( + DEBUG_ERROR, + "ERROR: Object 0x%x. Status =3D %r\n", + CmObjectId, + Status + )); + break; + } + } + + return Status; +} + +/** The GetObject function defines the interface implemented by the + Configuration Manager Protocol for returning the Configuration + Manager Objects. + + @param [in] This Pointer to the Configuration Manager Prot= ocol. + @param [in] CmObjectId The Configuration Manager Object ID. + @param [in] Token An optional token identifying the object.= If + unused this must be CM_NULL_TOKEN. + @param [in, out] CmObject Pointer to the Configuration Manager Obje= ct + descriptor describing the requested Objec= t. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not fo= und. +**/ +EFI_STATUS +EFIAPI +N1sdpPlatformGetObject ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN CONST CM_OBJECT_TOKEN Token OPTIONAL, + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObject + ) +{ + EFI_STATUS Status; + + if ((This =3D=3D NULL) || (CmObject =3D=3D NULL)) { + ASSERT (This !=3D NULL); + ASSERT (CmObject !=3D NULL); + return EFI_INVALID_PARAMETER; + } + + switch (GET_CM_NAMESPACE_ID (CmObjectId)) { + case EObjNameSpaceStandard: + Status =3D GetStandardNameSpaceObject (This, CmObjectId, Token, CmOb= ject); + break; + case EObjNameSpaceArm: + Status =3D GetArmNameSpaceObject (This, CmObjectId, Token, CmObject); + break; + case EObjNameSpaceOem: + Status =3D GetOemNameSpaceObject (This, CmObjectId, Token, CmObject); + break; + default: { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: Unknown Namespace Object =3D 0x%x. Status =3D %r\n", + CmObjectId, + Status + )); + break; + } + } + + return Status; +} + +/** The SetObject function defines the interface implemented by the + Configuration Manager Protocol for updating the Configuration + Manager Objects. + + @param [in] This Pointer to the Configuration Manager Prot= ocol. + @param [in] CmObjectId The Configuration Manager Object ID. + @param [in] Token An optional token identifying the object.= If + unused this must be CM_NULL_TOKEN. + @param [in] CmObject Pointer to the Configuration Manager Obje= ct + descriptor describing the Object. + + @retval EFI_UNSUPPORTED This operation is not supported. +**/ +EFI_STATUS +EFIAPI +N1sdpPlatformSetObject ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN CONST CM_OBJECT_TOKEN Token OPTIONAL, + IN CM_OBJ_DESCRIPTOR * CONST CmObject + ) +{ + return EFI_UNSUPPORTED; +} + +/** A structure describing the configuration manager protocol interface. +*/ +STATIC +CONST +EDKII_CONFIGURATION_MANAGER_PROTOCOL N1sdpPlatformConfigManagerProtocol = =3D { + CREATE_REVISION(1,0), + N1sdpPlatformGetObject, + N1sdpPlatformSetObject, + &N1sdpRepositoryInfo +}; + +/** + Entrypoint of Configuration Manager Dxe. + + @param ImageHandle + @param SystemTable + + @return EFI_SUCCESS + @return EFI_LOAD_ERROR + @return EFI_OUT_OF_RESOURCES +**/ +EFI_STATUS +EFIAPI +ConfigurationManagerDxeInitialize ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE * SystemTable + ) +{ + EFI_STATUS Status; + + // Initialize the Platform Configuration Repository before installing the + // Configuration Manager Protocol + Status =3D InitializePlatformRepository ( + N1sdpPlatformConfigManagerProtocol.PlatRepoInfo + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: Failed to initialize the Platform Configuration Repository."= \ + " Status =3D %r\n", + Status + )); + } + + Status =3D gBS->InstallProtocolInterface ( + &ImageHandle, + &gEdkiiConfigurationManagerProtocolGuid, + EFI_NATIVE_INTERFACE, + (VOID*)&N1sdpPlatformConfigManagerProtocol + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: Failed to get Install Configuration Manager Protocol." \ + " Status =3D %r\n", + Status + )); + goto error_handler; + } + +error_handler: + return Status; +} diff --git a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDx= e/ConfigurationManager.h b/Platform/ARM/N1Sdp/ConfigurationManager/Configur= ationManagerDxe/ConfigurationManager.h new file mode 100644 index 0000000000..e2edbf6ee5 --- /dev/null +++ b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/Confi= gurationManager.h @@ -0,0 +1,307 @@ +/** @file + + Copyright (c) 2021, ARM Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Glossary: + - Cm or CM - Configuration Manager + - Obj or OBJ - Object +**/ + +#ifndef CONFIGURATION_MANAGER_H_ +#define CONFIGURATION_MANAGER_H_ + +/** C array containing the compiled AML template. + This symbol is defined in the auto generated C file + containing the AML bytecode array. +*/ +extern CHAR8 dsdt_aml_code[]; +extern CHAR8 ssdtpci_aml_code[]; +extern CHAR8 ssdtremotepci_aml_code[]; + +/** The configuration manager version. +*/ +#define CONFIGURATION_MANAGER_REVISION CREATE_REVISION (1, 0) + +/** The OEM ID +*/ +#define CFG_MGR_OEM_ID { 'A', 'R', 'M', 'L', 'T', 'D' } + +/** A helper macro for mapping a reference token +*/ +#define REFERENCE_TOKEN(Field) \ + (CM_OBJECT_TOKEN)((UINT8*)&N1sdpRepositoryInfo + \ + OFFSET_OF (EDKII_PLATFORM_REPOSITORY_INFO, Field)) + +/** A helper macro that constructs the MPID based on the + Aff0, Aff1, Aff2, Aff3 values +*/ +#define GET_MPID3(Aff3, Aff2, Aff1, Aff0) \ + (((Aff3##ULL) << 32) | ((Aff2) << 16) | ((Aff1) << 8) | (Aff0)) + +/** A helper macro for populating the GIC CPU information +*/ +#define GICC_ENTRY( \ + CPUInterfaceNumber, \ + Mpidr, \ + PmuIrq, \ + VGicIrq, \ + GicRedistBase, \ + EnergyEfficiency, \ + SpeIrq, \ + ProximityDomain, \ + ClockDomain \ + ) { \ + CPUInterfaceNumber, /* UINT32 CPUInterfaceNumber */ \ + CPUInterfaceNumber, /* UINT32 AcpiProcessorUid */ \ + EFI_ACPI_6_2_GIC_ENABLED, /* UINT32 Flags */ \ + 0, /* UINT32 ParkingProtocolVersion */ \ + PmuIrq, /* UINT32 PerformanceInterruptGsiv */ \ + 0, /* UINT64 ParkedAddress */ \ + FixedPcdGet64 ( \ + PcdGicInterruptInterfaceBase \ + ), /* UINT64 PhysicalBaseAddress */ \ + 0, /* UINT64 GICV */ \ + 0, /* UINT64 GICH */ \ + VGicIrq, /* UINT32 VGICMaintenanceInterrupt */ \ + GicRedistBase, /* UINT64 GICRBaseAddress */ \ + Mpidr, /* UINT64 MPIDR */ \ + EnergyEfficiency, /* UINT8 ProcessorPowerEfficiencyClass*/ \ + SpeIrq, /* UINT16 SpeOverflowInterrupt */ \ + ProximityDomain, /* UINT32 ProximityDomain */ \ + ClockDomain, /* UINT32 ClockDomain */ \ + EFI_ACPI_6_3_GICC_ENABLED,/* UINT32 Flags */ \ + } + +/** A helper macro for populating the Processor Hierarchy Node flags +*/ +#define PROC_NODE_FLAGS( \ + PhysicalPackage, \ + AcpiProcessorIdValid, \ + ProcessorIsThread, \ + NodeIsLeaf, \ + IdenticalImplementation \ + ) \ + ( \ + PhysicalPackage | \ + (AcpiProcessorIdValid << 1) | \ + (ProcessorIsThread << 2) | \ + (NodeIsLeaf << 3) | \ + (IdenticalImplementation << 4) \ + ) + +/** A helper macro for populating the Cache Type Structure's attributes +*/ +#define CACHE_ATTRIBUTES( \ + AllocationType, \ + CacheType, \ + WritePolicy \ + ) \ + ( \ + AllocationType | \ + (CacheType << 2) | \ + (WritePolicy << 4) \ + ) + +/** A function that prepares Configuration Manager Objects for returning. + @param [in] This Pointer to the Configuration Manager Protocol. + @param [in] CmObjectId The Configuration Manager Object ID. + @param [in] Token A token for identifying the object. + @param [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 fou= nd. +**/ +typedef EFI_STATUS (*CM_OBJECT_HANDLER_PROC) ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN CONST CM_OBJECT_TOKEN Token, + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObject + ); + +/** The number of CPUs +*/ +#define PLAT_CPU_COUNT 4 + +/** The number of ACPI tables to install +*/ +#define PLAT_ACPI_TABLE_COUNT 13 + +/** The number of platform generic timer blocks +*/ +#define PLAT_GTBLOCK_COUNT 1 + +/** The number of timer frames per generic timer block +*/ +#define PLAT_GTFRAME_COUNT 2 + +/** The number of Processor Hierarchy Nodes + - one package node + - two cluster nodes + - two cores in cluster 0 + - two cores in cluster 1 +*/ +#define PLAT_PROC_HIERARCHY_NODE_COUNT 7 + +/** The number of unique cache structures: + - cluster L3 unified cache + - core L1 instruction cache + - core L1 data cache + - core L2 cache + - slc unified cache +*/ +#define PLAT_CACHE_COUNT 5 + +/** The number of resources private to the cluster + - L3 cache +*/ +#define CLUSTER_RESOURCE_COUNT 1 + +/** The number of resources private to 'core instance + - L1 data cache + - L1 instruction cache +*/ +#define CORE_RESOURCE_COUNT 2 + +/** The number of resources private to SoC + - slc cache +*/ +#define SOC_RESOURCE_COUNT 1 + +/** Number of memory affinity entries +*/ +#define LOCAL_DDR_REGION1 0 +#define LOCAL_DDR_REGION2 1 +#define REMOTE_DDR_REGION1 2 +#define REMOTE_DDR_REGION2 3 +#define DDR_REGION_COUNT 4 + +typedef enum { + ITS_SMMU_CCIX =3D 0, + ITS_SMMU_PCIE, + ITS_CCIX, + ITS_PCIE, + ITS_MASTER_CHIP_MAX, + ITS_REMOTE_SMMU_PCIE =3D ITS_MASTER_CHIP_MAX, + ITS_REMOTE_PCIE, + ITS_MAX +} ITS_ID; + +typedef enum { + SMMUV3INFO_PCIE =3D 0, + SMMUV3INFO_CCIX, + SMMUV3INFO_MASTER_CHIP_MAX, + SMMUV3INFO_REMOTE_PCIE =3D SMMUV3INFO_MASTER_CHIP_MAX, + SMMUV3INFO_MAX +} SMMU_INFO_V3; + +typedef enum { + ROOT_PCIE =3D 0, + ROOT_PCIE_CCIX, + ROOT_PCIE_MASTER_CHIP_MAX, + ROOT_REMOTE_PCIE =3D ROOT_PCIE_MASTER_CHIP_MAX, + ROOT_PCIE_MAX +} N1SDP_ROOT_PORT; + +typedef enum { + DEVICEIDMAPPING_SMMU_PCIE =3D 0, + DEVICEIDMAPPING_SMMU_CCIX, + DEVICEIDMAPPING_PCIE, + DEVICEIDMAPPING_MASTER_CHIP_MAX, + DEVICEIDMAPPING_REMOTE_SMMU_PCIE =3D DEVICEIDMAPPING_MASTER_CHIP_MAX, + DEVICEIDMAPPING_REMOTE_PCIE, + DEVICEIDMAPPING_MAX, +} N1SDP_DEVID; + +/** A structure describing the platform configuration + manager repository information +*/ +typedef struct PlatformRepositoryInfo { + /// Configuration Manager Information + CM_STD_OBJ_CONFIGURATION_MANAGER_INFO CmInfo; + + /// List of ACPI tables + CM_STD_OBJ_ACPI_TABLE_INFO CmAcpiTableList[PLAT_ACPI_TABLE_CO= UNT]; + + /// Boot architecture information + CM_ARM_BOOT_ARCH_INFO BootArchInfo; + + /// Fixed feature flag information + CM_ARM_FIXED_FEATURE_FLAGS FixedFeatureFlags; + + /// Power management profile information + CM_ARM_POWER_MANAGEMENT_PROFILE_INFO PmProfileInfo; + + /// GIC CPU interface information + CM_ARM_GICC_INFO GicCInfo[PLAT_CPU_COUNT * 2]; + + /// GIC distributor information + CM_ARM_GICD_INFO GicDInfo; + + /// GIC Redistributor information + CM_ARM_GIC_REDIST_INFO GicRedistInfo[2]; + + /// GIC ITS information + CM_ARM_GIC_ITS_INFO GicItsInfo[ITS_MAX]; + + /// Generic timer information + CM_ARM_GENERIC_TIMER_INFO GenericTimerInfo; + + /// Generic timer block information + CM_ARM_GTBLOCK_INFO GTBlockInfo[PLAT_GTBLOCK_COUNT]; + + /// Generic timer frame information + CM_ARM_GTBLOCK_TIMER_FRAME_INFO GTBlock0TimerInfo[PLAT_GTFRAME_COU= NT]; + + /// Watchdog information + CM_ARM_GENERIC_WATCHDOG_INFO Watchdog; + + /** Serial port information for the + serial port console redirection port + */ + CM_ARM_SERIAL_PORT_INFO SpcrSerialPort; + + /// Serial port information for the DBG2 UART port + CM_ARM_SERIAL_PORT_INFO DbgSerialPort; + + // Processor topology information + CM_ARM_PROC_HIERARCHY_INFO ProcHierarchyInfo[PLAT_PROC_HIERAR= CHY_NODE_COUNT * 2]; + + // Cache information + CM_ARM_CACHE_INFO CacheInfo[PLAT_CACHE_COUNT]; + + // Cluster private resources + CM_ARM_OBJ_REF ClusterResources[CLUSTER_RESOURCE_= COUNT]; + + // Core private resources + CM_ARM_OBJ_REF CoreResources[CORE_RESOURCE_COUNT]; + + // SoC Resources + CM_ARM_OBJ_REF SocResources[SOC_RESOURCE_COUNT]; + + /// ITS Group node + CM_ARM_ITS_GROUP_NODE ItsGroupInfo[ITS_MAX]; + + /// ITS Identifier array + CM_ARM_ITS_IDENTIFIER ItsIdentifierArray[ITS_MAX]; + + /// SMMUv3 node + CM_ARM_SMMUV3_NODE SmmuV3Info[SMMUV3INFO_MAX]; + + /// PCI Root complex node + CM_ARM_ROOT_COMPLEX_NODE RootComplexInfo[ROOT_PCIE_MAX]; + + /// Array of DeviceID mapping + CM_ARM_ID_MAPPING DeviceIdMapping[DEVICEIDMAPPING_MA= X][2]; + + /// PCI configuration space information + CM_ARM_PCI_CONFIG_SPACE_INFO PciConfigInfo[ROOT_PCIE_MAX]; + + /// Memory Affinity Info + CM_ARM_MEMORY_AFFINITY_INFO MemAffInfo[DDR_REGION_COUNT]; + +} EDKII_PLATFORM_REPOSITORY_INFO; + +#endif // CONFIGURATION_MANAGER_H_ diff --git a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDx= e/ConfigurationManagerDxe.inf b/Platform/ARM/N1Sdp/ConfigurationManager/Con= figurationManagerDxe/ConfigurationManagerDxe.inf new file mode 100644 index 0000000000..52207e7f7d --- /dev/null +++ b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/Confi= gurationManagerDxe.inf @@ -0,0 +1,167 @@ +## @file +# Configuration Manager Dxe +# +# Copyright (c) 2021, ARM Limited. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001B + BASE_NAME =3D ConfigurationManagerDxe + FILE_GUID =3D 6f9c3b47-6f7d-44b6-87e5-4b7f44a60147 + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + ENTRY_POINT =3D ConfigurationManagerDxeInitialize + +# +# The following information is for reference only and not required by the = build tools. +# +# VALID_ARCHITECTURES =3D ARM AARCH64 +# + +[Sources] + AslTables/Dsdt.asl + AslTables/SsdtPci.asl + AslTables/SsdtRemotePci.asl + ConfigurationManager.c + ConfigurationManager.h + Hmat.c + Platform.h + +[Packages] + ArmPkg/ArmPkg.dec + ArmPlatformPkg/ArmPlatformPkg.dec + DynamicTablesPkg/DynamicTablesPkg.dec + EmbeddedPkg/EmbeddedPkg.dec + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + Platform/ARM/N1Sdp/N1SdpPlatform.dec + Platform/ARM/VExpressPkg/ArmVExpressPkg.dec + Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec + +[LibraryClasses] + ArmPlatformLib + PrintLib + UefiBootServicesTableLib + UefiDriverEntryPoint + UefiRuntimeServicesTableLib + +[Protocols] + gEdkiiConfigurationManagerProtocolGuid + +[FixedPcd] + # PL011 Serial Debug UART + gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase + gArmPlatformTokenSpaceGuid.PcdSerialDbgUartBaudRate + gArmPlatformTokenSpaceGuid.PcdSerialDbgUartClkInHz + + gArmPlatformTokenSpaceGuid.PL011UartClkInHz + gArmPlatformTokenSpaceGuid.PL011UartInterrupt + + gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum + gArmTokenSpaceGuid.PcdArmArchTimerIntrNum + gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum + gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum + + # SBSA Generic Watchdog + gArmTokenSpaceGuid.PcdGenericWatchdogControlBase + gArmTokenSpaceGuid.PcdGenericWatchdogEl2IntrNum + gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase + + gArmTokenSpaceGuid.PcdGicDistributorBase + gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase + gArmTokenSpaceGuid.PcdGicRedistributorsBase + + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate + + gArmN1SdpTokenSpaceGuid.PcdPcieExpressBaseAddress + + gArmNeoverseN1SocTokenSpaceGuid.PcdExtMemorySpace + gArmNeoverseN1SocTokenSpaceGuid.PcdDramBlock2Base + + gArmPlatformTokenSpaceGuid.PcdCoreCount + gArmPlatformTokenSpaceGuid.PcdClusterCount + + gArmTokenSpaceGuid.PcdSystemMemoryBase + gArmTokenSpaceGuid.PcdSystemMemorySize + + #PCIe + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieBusCount + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieBusMax + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieBusMin + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieIoBase + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieIoMaxBase + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieIoSize + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieIoTranslation + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio32Base + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio32MaxBase + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio32Size + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio32Translation + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio64Base + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio64MaxBase + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio64Size + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio64Translation + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieRootPortConfigBaseAddress + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieRootPortConfigBaseSize + + # CCIX + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixBusCount + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixBusMax + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixBusMin + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixExpressBaseAddress + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixIoBase + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixIoMaxBase + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixIoSize + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixIoTranslation + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio32Base + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio32MaxBase + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio32Size + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio32Translation + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio64Base + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio64MaxBase + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio64Size + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio64Translation + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixRootPortConfigBaseAddress + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixRootPortConfigBaseSize + + # Coresight + gArmN1SdpTokenSpaceGuid.PcdCsComponentSize + gArmN1SdpTokenSpaceGuid.PcdCsEtf0Base + gArmN1SdpTokenSpaceGuid.PcdCsEtf0MaxBase + gArmN1SdpTokenSpaceGuid.PcdCsEtf1Base + gArmN1SdpTokenSpaceGuid.PcdCsEtf1MaxBase + gArmN1SdpTokenSpaceGuid.PcdCsEtf2Base + gArmN1SdpTokenSpaceGuid.PcdCsEtf2MaxBase + gArmN1SdpTokenSpaceGuid.PcdCsEtm0Base + gArmN1SdpTokenSpaceGuid.PcdCsEtm0MaxBase + gArmN1SdpTokenSpaceGuid.PcdCsEtm1Base + gArmN1SdpTokenSpaceGuid.PcdCsEtm1MaxBase + gArmN1SdpTokenSpaceGuid.PcdCsEtm2Base + gArmN1SdpTokenSpaceGuid.PcdCsEtm2MaxBase + gArmN1SdpTokenSpaceGuid.PcdCsEtm3Base + gArmN1SdpTokenSpaceGuid.PcdCsEtm3MaxBase + gArmN1SdpTokenSpaceGuid.PcdCsEtrBase + gArmN1SdpTokenSpaceGuid.PcdCsEtrMaxBase + gArmN1SdpTokenSpaceGuid.PcdCsFunnel0Base + gArmN1SdpTokenSpaceGuid.PcdCsFunnel0MaxBase + gArmN1SdpTokenSpaceGuid.PcdCsFunnel1Base + gArmN1SdpTokenSpaceGuid.PcdCsFunnel1MaxBase + gArmN1SdpTokenSpaceGuid.PcdCsReplicatorBase + gArmN1SdpTokenSpaceGuid.PcdCsReplicatorMaxBase + gArmN1SdpTokenSpaceGuid.PcdCsStmBase + gArmN1SdpTokenSpaceGuid.PcdCsStmMaxBase + gArmN1SdpTokenSpaceGuid.PcdCsStmStimulusBase + gArmN1SdpTokenSpaceGuid.PcdCsStmStimulusSize + gArmN1SdpTokenSpaceGuid.PcdCsTpiuBase + gArmN1SdpTokenSpaceGuid.PcdCsTpiuMaxBase + + # Remote PCIe + gArmN1SdpTokenSpaceGuid.PcdRemotePcieIoTranslation + gArmN1SdpTokenSpaceGuid.PcdRemotePcieMmio32Translation + gArmN1SdpTokenSpaceGuid.PcdRemotePcieMmio64Translation + +[Depex] + TRUE diff --git a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDx= e/Hmat.c b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/= Hmat.c new file mode 100644 index 0000000000..52fc3108a2 --- /dev/null +++ b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/Hmat.c @@ -0,0 +1,103 @@ +/** @file + Heterogeneous Memory Attribute Table (HMAT) + + Copyright (c) 2021, ARM Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include +#include +#include +#include "N1SdpAcpiHeader.h" + +// +// Heterogeneous Memory Attribute Table +// +#pragma pack (1) + +typedef struct { + EFI_ACPI_6_3_HMAT_STRUCTURE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO L= atencyStruct; + UINT32 InitiatorProximityDomainList[1]; + UINT32 TargetProximityDomainList[2]; + UINT16 LatencyEntry[1][2]; +} EFI_ACPI_6_3_HMAT_SYSTEM_LOCALITY_LATENCY_STRUCTURE; + +typedef struct { + EFI_ACPI_6_3_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE_HEADER Header; + EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES Memory[2]; + EFI_ACPI_6_3_HMAT_SYSTEM_LOCALITY_LATENCY_STRUCTURE LatencyIn= fo; +} EFI_ACPI_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE; + +#pragma pack () + +EFI_ACPI_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE Hmat =3D { + // Header + { + ARM_ACPI_HEADER ( + EFI_ACPI_6_3_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE_SIGNATURE, + EFI_ACPI_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE, + EFI_ACPI_6_3_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE_REVISION + ), + {0x00, 0x00, 0x00, 0x00}, + }, + + // Memory Attribute Structure + { + { + EFI_ACPI_6_3_HMAT_TYPE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES, // Type + {0x00, 0x00}, // Reserved + 40, // Length + {.InitiatorProximityDomainValid =3D 1}, // Flags + {0x00, 0x00}, // Reserved1 + 0, // InitiatorProximityDomain + 0, // MemoryProximityDomain + { 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + }, // Reserved2 + }, + { + EFI_ACPI_6_3_HMAT_TYPE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES, // Type + {0x00, 0x00}, // Reserved + 40, // Length + {.InitiatorProximityDomainValid =3D 1}, // Flags + {0x00, 0x00}, // Reserved1 + 0, // InitiatorProximityDomain + 1, // MemoryProximityDomain + { 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + }, // Reserved2 + }, + }, + + // System Locality Latency Structure (LatencyInfo) + { + // LatencyStruct + { + EFI_ACPI_6_3_HMAT_TYPE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO, /= / Type + {0x00, 0x00}, // Reserved + sizeof (EFI_ACPI_6_3_HMAT_SYSTEM_LOCALITY_LATENCY_STRUCTURE), // Len= gth + {.MemoryHierarchy =3D 0}, // Flags + 0, // DataType - Access latency + {0x00, 0x00}, // Reserved1 + 1, // NumberOfInitiatorProximityDomains + 2, // NumberOfTargetProximityDomains + {0x00, 0x00, 0x00, 0x00}, // Reserved2 + 1000, // EntryBaseUnit - 1000ps =3D 1ns + }, + // InitiatorProximityDomainList + { 0 }, + // TargetProximityDomainList + { 0, 1 }, + // LatencyEntry + { + {119, 200}, + }, + }, +}; diff --git a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDx= e/Platform.h b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManager= Dxe/Platform.h new file mode 100644 index 0000000000..d220b09446 --- /dev/null +++ b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/Platf= orm.h @@ -0,0 +1,92 @@ +/** @file + + Copyright (c) 2021, ARM Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef PLATFORM_H_ +#define PLATFORM_H_ + +#define ENABLE_MEM_MAPPED_TIMER + +#ifdef ENABLE_MEM_MAPPED_TIMER +// REFCLK CNTControl +#define N1SDP_SYSTEM_TIMER_BASE_ADDRESS 0x2A430000 +// REFCLK CNTRead +#define N1SDP_CNT_READ_BASE_ADDRESS 0x2A800000 +#else +#define N1SDP_SYSTEM_TIMER_BASE_ADDRESS 0xFFFFFFFFFFFFFFFF +#define N1SDP_CNT_READ_BASE_ADDRESS 0xFFFFFFFFFFFFFFFF +#endif + +// GT Block Timer +// AP_REFCLK CNTCTL +#define N1SDP_GT_BLOCK_CTL_BASE 0x2A810000 +#define N1SDP_TIMER_FRAMES_COUNT 2 + +// GT Block Timer Frames +// AP_REFCLK_S CNTBase0 +#define N1SDP_GT_BLOCK_FRAME0_CTL_BASE 0x2A830000 +#define N1SDP_GT_BLOCK_FRAME0_CTL_EL0_BASE 0xFFFFFFFFFFFFFFFF +#define N1SDP_GT_BLOCK_FRAME0_GSIV 92 + +// AP_REFCLK_NS CNTBase1 +#define N1SDP_GT_BLOCK_FRAME1_CTL_BASE 0x2A820000 +#define N1SDP_GT_BLOCK_FRAME1_CTL_EL0_BASE 0xFFFFFFFFFFFFFFFF +#define N1SDP_GT_BLOCK_FRAME1_GSIV 91 + +#define GTDT_TIMER_EDGE_TRIGGERED \ + EFI_ACPI_6_3_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE +#define GTDT_TIMER_LEVEL_TRIGGERED 0 +#define GTDT_TIMER_ACTIVE_LOW \ + EFI_ACPI_6_3_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY +#define GTDT_TIMER_ACTIVE_HIGH 0 +#define GTDT_TIMER_SAVE_CONTEXT \ + EFI_ACPI_6_3_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY +#define GTDT_TIMER_LOSE_CONTEXT 0 + +#define N1SDP_GTDT_GTIMER_FLAGS (GTDT_TIMER_LOSE_CONTEXT | \ + GTDT_TIMER_ACTIVE_LOW | \ + GTDT_TIMER_LEVEL_TRIGGERED) + +// GT Block Timer Flags +#define GTX_TIMER_EDGE_TRIGGERED \ + EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE +#define GTX_TIMER_LEVEL_TRIGGERED 0 +#define GTX_TIMER_ACTIVE_LOW \ + EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY +#define GTX_TIMER_ACTIVE_HIGH 0 + +#define N1SDP_GTX_TIMER_FLAGS (GTX_TIMER_ACTIVE_HIGH | \ + GTX_TIMER_LEVEL_TRIGGERED) + +#define GTX_TIMER_SECURE \ + EFI_ACPI_6_3_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER +#define GTX_TIMER_NON_SECURE 0 +#define GTX_TIMER_SAVE_CONTEXT \ + EFI_ACPI_6_3_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY +#define GTX_TIMER_LOSE_CONTEXT 0 + +#define N1SDP_GTX_COMMON_FLAGS_S (GTX_TIMER_SAVE_CONTEXT | \ + GTX_TIMER_SECURE) +#define N1SDP_GTX_COMMON_FLAGS_NS (GTX_TIMER_SAVE_CONTEXT | \ + GTX_TIMER_NON_SECURE) + +// Watchdog +#define SBSA_WATCHDOG_EDGE_TRIGGERED \ + EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE +#define SBSA_WATCHDOG_LEVEL_TRIGGERED 0 +#define SBSA_WATCHDOG_ACTIVE_LOW \ + EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POL= ARITY +#define SBSA_WATCHDOG_ACTIVE_HIGH 0 +#define SBSA_WATCHDOG_SECURE \ + EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER +#define SBSA_WATCHDOG_NON_SECURE 0 + +#define N1SDP_SBSA_WATCHDOG_FLAGS (SBSA_WATCHDOG_NON_SECURE |= \ + SBSA_WATCHDOG_ACTIVE_HIGH |= \ + SBSA_WATCHDOG_LEVEL_TRIGGERED) + +#endif // PLATFORM_H_ --=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 (#81732): https://edk2.groups.io/g/devel/message/81732 Mute This Topic: https://groups.io/mt/86219918/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 Sat Apr 27 03:40:23 2024 Delivered-To: importer@patchew.org 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+81730+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1633890689933263.7534577359718; Sun, 10 Oct 2021 11:31:29 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 526dYY1788612xicfMHbqyJT; Sun, 10 Oct 2021 11:31:29 -0700 X-Received: from EUR03-DB5-obe.outbound.protection.outlook.com (EUR03-DB5-obe.outbound.protection.outlook.com [40.107.4.53]) by mx.groups.io with SMTP id smtpd.web12.1637.1633890688502744414 for ; Sun, 10 Oct 2021 11:31:29 -0700 X-Received: from DB6PR0402CA0024.eurprd04.prod.outlook.com (2603:10a6:4:91::34) by AM6PR08MB4006.eurprd08.prod.outlook.com (2603:10a6:20b:a9::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Sun, 10 Oct 2021 18:31:25 +0000 X-Received: from DB5EUR03FT018.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:91:cafe::ce) by DB6PR0402CA0024.outlook.office365.com (2603:10a6:4:91::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Sun, 10 Oct 2021 18:31:25 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81730+1787277+3901457@groups.io; helo=mail02.groups.io; 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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT018.mail.protection.outlook.com (10.152.20.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Sun, 10 Oct 2021 18:31:25 +0000 X-Received: ("Tessian outbound f1898412aff1:v103"); Sun, 10 Oct 2021 18:31:25 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: da4149ea1fa1c796 X-CR-MTA-TID: 64aa7808 X-Received: from 5691fc01cd10.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 32ED9370-5635-41C3-B578-018CE7FADA9C.1; Sun, 10 Oct 2021 18:31:14 +0000 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5691fc01cd10.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sun, 10 Oct 2021 18:31:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hWYog/Kohupw9yOn8oNX97ZpA9M96PAjjp8uTLGevs28Whs/NINEkpvfTayxU3qdvsRmnp/7ilgJAb2B9++is1gAXTOMnMhYaAxBy0nBUIxAAQozn/3Sfn65b0UtfTUV3F0r2M5+p/Ki38RojcipC55C+xeO59z6+UpMJ3yntE7S375xLXjfGvNAI7rDJt+IkFOzxE71ZD1Q2JyFBD1kR8JAgY5qJl3KgUZDV2Zu1EX5kWZWpHvKFEdc8YUzy4aJ0PPjwG27cS3iMh60FI5NEfiSyhSLMqVgF8fAOqhj1rqUXRpZpYg0lblNbtAUK6k5mOavNJddFmlJOEfJhqyCyA== 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=jQrZhKaCdTlSLpXyhdk8CfHaFCVMY2Jqnb944YrEDTE=; b=icLLQr/rvnR9yQ8Y2len+SmLBSXCe+srdMPCgQdKguvINgIEyN+R/u5C8uZpTLKx4fZuRVyomBfy8pM5kdyZfqhv5WZXXK/2OgL/oPZim4MaThno4JPyPjEww4BylBvVF7BJUJIfWZD+/X8AOropPATomx42WJ5k6UMQeBwHiQ1T3BYPTT4U4/9Q4GMfsiKnrpYi28Y3gghukS2EBIVZ+wkfpv4/lUpQECpryCASkvHatW32qqONad+mxklVTqp055UsGomMRR/lKYaIkeLsugq5nQmWUFVZhhCGe91p7Lb0WPhw49Q9muKttLF7GqKei1jnMWItiMdDmeNupz/afQ== 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 Authentication-Results-Original: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; X-Received: from PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) by PA4PR08MB6288.eurprd08.prod.outlook.com (2603:10a6:102:f3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Sun, 10 Oct 2021 18:31:11 +0000 X-Received: from PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::e5a7:9474:4463:d258]) by PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::e5a7:9474:4463:d258%2]) with mapi id 15.20.4587.025; Sun, 10 Oct 2021 18:31:11 +0000 From: "Khasim Mohammed" To: devel@edk2.groups.io Cc: nd@arm.com, Khasim Syed Mohammed , Sami Mujawar Subject: [edk2-devel] [PATCH v2 7/7] Platform/ARM/N1Sdp: Enable ACPI tables and configuration manager Date: Sun, 10 Oct 2021 23:59:56 +0530 Message-Id: <20211010182956.13526-8-khasim.mohammed@arm.com> In-Reply-To: <20211010182956.13526-1-khasim.mohammed@arm.com> References: <20211010182956.13526-1-khasim.mohammed@arm.com> X-ClientProxiedBy: LO4P123CA0392.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::19) To PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) MIME-Version: 1.0 X-Received: from e116623.arm.com (217.140.99.251) by LO4P123CA0392.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.20 via Frontend Transport; Sun, 10 Oct 2021 18:31:10 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c1f045c3-91bc-4679-2a94-08d98c1c2acc X-MS-TrafficTypeDiagnostic: PA4PR08MB6288:|AM6PR08MB4006: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:5236;OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: Pbc6XaAseDBhB82Dw1Rf8r1PAnUFXeHOwPXZ1Gg0rvGXcbe4h/dn2RVKZfzI1RLYThe4dDODlb+g1aol4TN/Gi5dZUoQB6Sq1SmlDEyS58ssytMd+EF5G1HumMeQ8IxcBVfNon+olPCoVKg6s0iU0DaYfVdebZJepdQymhGziMzmX7aI1cnNnGD1eKNY+ZzXIzbd/NQp6C+h/s4CZXQRPI7fKLKJRZ9EMVV+fhtZ5rF2Np0jbRR97LMd88cJmnVcGkeoWgWbGwEy0Gm/kCJUXWIhsDgfYj9HaZldM9YHmopG14AHYwW19qAEtxU+cYFMwpBg3rjaof57aC7CRnFCHJgMSFDdmcWy82hfBH+Yfp7gabR+PvIHdfodYguMMfE8I/6vf3B7Of2h4t39g6IavymAxtWDYbrqFWfTsoCBJHG3DO/RqjjxPZ4er57X0nMfLzpUnluq0wzoIH+vr3b/M84/o/0wmt4O0KTRuTcLHt+dCb9qxvX++dYlj4CkgvZre4C3afXgo8tcZRgalel8fB5NvkqIyfB8CJmXz8u5k0LTEyjWII4PjtwfGWU+nfzzCZdnsO5kgpkuC+ucH3b7BkAVVkCFSDrxyNeONucFfOIEQjWZU1qEY8a/iuyDuqkcF7QiNPv6SAg7CoEnv9rtB4/S/2lqD858jDCC3lVO85UtV7kArfh5fqrGtEgiUYxwFL9Gc1IHTwb4OzNzDFSMbw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA4PR08MB5902.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(6666004)(66946007)(508600001)(6916009)(5660300002)(2616005)(956004)(86362001)(83380400001)(66476007)(66556008)(36756003)(6486002)(2906002)(1076003)(19627235002)(52116002)(7696005)(4326008)(26005)(38350700002)(38100700002)(316002)(8676002)(54906003)(186003)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6288 Original-Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 5ce2cd9f-8e1b-4e1e-9bd8-08d98c1c2229 X-Microsoft-Antispam-Message-Info: U5tDCakZHq1cyCVyoEJGeeZmmVee5X/OYtC//m88/OYTE4hZ7SvezDdr0ggzqdfIXNe16XLMt7jUfCt053+jk8rg5WeRRUz4ZEt2AvBXk5iXpiSw5YnqGmmFvLJ6kiTD0Gs1ebfnDJXZeCTP3QKXV/gNdsa5he32zSbvM1vE/rg007ou2/wvac+jtVpxin1Pr2qhdao53ggr2YZFJrTAvEqdU1lSCdQcJUO5o2/rjf1QsxngC+VzBhikMRA5djlPG7NCAFx3ow/q1/61+ymNU5YzPFdozZRU7R4nuetPhTo+L/Yb+BlY9eeQ5hkQAyd23TXx+3n7p1BwNfGcMw0EGqW1HnwpTUj8o370JQDWXYPMnIEOILLp48SYVoSbT6PDq+sq+/qIuI8W0ru2bSE//r0esizeuDzcyZV+x4KR9pB2VYLU3XULWxWNWtcdDC1bomJhZ7thvFPcIQW8LfJ7hrfiYByN5+DSrpxFlUgaaZLN8Vhwf4FcSSoLpCS/fOehMFfHcBIacAsgGtD54wf5/Ei6a+WCUWoBbNHy+PwD3CWADDiw+/zQ8aPm248edmKFDFaVcEpTX9BvNQRuT1TaKLJdg5e3mrM9WcWuF9dNqRUzoDsicjoTu+MoBkcfum+FpsHqBdakzTNk7+F6e2ZCR11ZjkXeSMy1EFKFWGmaEuUgusWKLXQRN5gTttK/e+iRTxBP4TOycuC+5jny30tpsg== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2021 18:31:25.4562 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c1f045c3-91bc-4679-2a94-08d98c1c2acc 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: DB5EUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4006 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,khasim.mohammed@arm.com X-Gm-Message-State: EFeA1YaLoUlomk5brswyeRIGx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1633890689; bh=yp7ddJSFL3IUwMy0McrfVWRwde8v+YLAx3Cu0n1JpcQ=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=n3+qttzRqUwyJGxYJjqNKZtk/fux5HmhLaQ3oLkoa0zQPSXtJBzIcpFd2RUPuIJUmoc LjjCYiZa5jMj9FuSPtnCtIcq/Zt8r1Nyi5ZSVm/p4mx+5ir1t0e3kNOatLTdVAelLt0/M UQS4XZeXNX0F965zvbtSQ+tyMnu4nwVp/Iw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1633890691913100006 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This patch enables ACPI tables and configuration manager for N1SDP Signed-off-by: Sami Mujawar Signed-off-by: Khasim Syed Mohammed --- Platform/ARM/N1Sdp/Include/N1SdpAcpiHeader.h | 35 ++++++++++++++++++++ Platform/ARM/N1Sdp/N1SdpPlatform.dec | 1 + Platform/ARM/N1Sdp/N1SdpPlatform.dsc | 10 ++++++ Platform/ARM/N1Sdp/N1SdpPlatform.fdf | 9 +++++ 4 files changed, 55 insertions(+) create mode 100644 Platform/ARM/N1Sdp/Include/N1SdpAcpiHeader.h diff --git a/Platform/ARM/N1Sdp/Include/N1SdpAcpiHeader.h b/Platform/ARM/N1= Sdp/Include/N1SdpAcpiHeader.h new file mode 100644 index 0000000000..d81bdb3576 --- /dev/null +++ b/Platform/ARM/N1Sdp/Include/N1SdpAcpiHeader.h @@ -0,0 +1,35 @@ +/** @file + + Copyright (c) 2021, ARM Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef N1SDP_ACPI_HEADER_ +#define N1SDP_ACPI_HEADER_ + +// +// ACPI table information used to initialize tables. +// +#define EFI_ACPI_ARM_OEM_ID 'A','R','M','L','T','D' // OEMID 6= bytes long +#define EFI_ACPI_ARM_OEM_TABLE_ID SIGNATURE_64('A','R','M','N','1','S'= ,'D','P') // OEM table id 8 bytes long +#define EFI_ACPI_ARM_OEM_REVISION 0x20181101 +#define EFI_ACPI_ARM_CREATOR_ID SIGNATURE_32('A','R','M',' ') +#define EFI_ACPI_ARM_CREATOR_REVISION 0x00000099 + +// A macro to initialise the common header part of EFI ACPI tables as defi= ned by +// EFI_ACPI_DESCRIPTION_HEADER structure. +#define ARM_ACPI_HEADER(Signature, Type, Revision) { \ + Signature, /* UINT32 Signature */ \ + sizeof (Type), /* UINT32 Length */ \ + Revision, /* UINT8 Revision */ \ + 0, /* UINT8 Checksum */ \ + { EFI_ACPI_ARM_OEM_ID }, /* UINT8 OemId[6] */ \ + EFI_ACPI_ARM_OEM_TABLE_ID, /* UINT64 OemTableId */ \ + EFI_ACPI_ARM_OEM_REVISION, /* UINT32 OemRevision */ \ + EFI_ACPI_ARM_CREATOR_ID, /* UINT32 CreatorId */ \ + EFI_ACPI_ARM_CREATOR_REVISION /* UINT32 CreatorRevision */ \ + } + +#endif /* N1SDP_ACPI_HEADER_ */ diff --git a/Platform/ARM/N1Sdp/N1SdpPlatform.dec b/Platform/ARM/N1Sdp/N1Sd= pPlatform.dec index d56891b985..36123ddac0 100644 --- a/Platform/ARM/N1Sdp/N1SdpPlatform.dec +++ b/Platform/ARM/N1Sdp/N1SdpPlatform.dec @@ -22,6 +22,7 @@ # ##########################################################################= ###### [Includes.common] + Include # Root include for the pakage =20 [LibraryClasses] ArmPlatformLib|Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib= .inf diff --git a/Platform/ARM/N1Sdp/N1SdpPlatform.dsc b/Platform/ARM/N1Sdp/N1Sd= pPlatform.dsc index d5ada590e1..aba843bc29 100644 --- a/Platform/ARM/N1Sdp/N1SdpPlatform.dsc +++ b/Platform/ARM/N1Sdp/N1SdpPlatform.dsc @@ -27,6 +27,9 @@ !include Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc !include MdePkg/MdeLibs.dsc.inc =20 +!include DynamicTablesPkg/DynamicTables.dsc.inc +!include Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManager.dsc.= inc + [LibraryClasses.common] ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf @@ -156,6 +159,9 @@ gArmPlatformTokenSpaceGuid.PcdCoreCount|2 gArmPlatformTokenSpaceGuid.PcdClusterCount|2 =20 + # ACPI Table Version + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20 + # Runtime Variable storage gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE @@ -215,6 +221,10 @@ BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf } =20 + # ACPI Support + MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf + MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf + # Platform driver Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.inf =20 diff --git a/Platform/ARM/N1Sdp/N1SdpPlatform.fdf b/Platform/ARM/N1Sdp/N1Sd= pPlatform.fdf index 6b097438ad..6ede2b7fc8 100644 --- a/Platform/ARM/N1Sdp/N1SdpPlatform.fdf +++ b/Platform/ARM/N1Sdp/N1SdpPlatform.fdf @@ -94,6 +94,15 @@ READ_LOCK_STATUS =3D TRUE INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf =20 + # ACPI Support + INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf + + # Configuration Manager + INF Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/Conf= igurationManagerDxe.inf + + # Dynamic Table fdf + !include DynamicTablesPkg/DynamicTables.fdf.inc + # Human Interface Support INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf =20 --=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 (#81730): https://edk2.groups.io/g/devel/message/81730 Mute This Topic: https://groups.io/mt/86219915/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-