From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.58]) by mx.groups.io with SMTP id smtpd.web09.13982.1640135740816489314 for ; Tue, 21 Dec 2021 17:15:41 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=CPsV/hIF; spf=pass (domain: arm.com, ip: 40.107.7.58, mailfrom: khasim.mohammed@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n9ak/6FxM/9buJWRsCoOkjuRMoEkTHdPNeDemo7V8vU=; b=CPsV/hIFCOCJMEw9T+XihsLW/5sG/yiCZpV8jUUHDsyItllCCBhqoRvivVCHQZqRv7Lxcj01e1qGu6MMVTtWf6indx1L8C3OFg9/3xzP6q6M2P3Ao8WUAuQVoVyKz+1J+pf3Mcj74xHMZFNhzAi86rlDzIKIn3fqGLgmEVnhEes= Received: from DU2PR04CA0346.eurprd04.prod.outlook.com (2603:10a6:10:2b4::33) by AM9PR08MB6180.eurprd08.prod.outlook.com (2603:10a6:20b:2d4::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.18; Wed, 22 Dec 2021 01:15:17 +0000 Received: from DB5EUR03FT008.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:2b4:cafe::b9) by DU2PR04CA0346.outlook.office365.com (2603:10a6:10:2b4::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.14 via Frontend Transport; Wed, 22 Dec 2021 01:15:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT008.mail.protection.outlook.com (10.152.20.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.14 via Frontend Transport; Wed, 22 Dec 2021 01:15:17 +0000 Received: ("Tessian outbound dbb52aec1fa6:v110"); Wed, 22 Dec 2021 01:15:17 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: cda3460e19cf38d3 X-CR-MTA-TID: 64aa7808 Received: from a3ac1ee2dcf1.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 394CA3B6-A5BA-4491-A6D4-AA7E5D904429.1; Wed, 22 Dec 2021 01:15:11 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a3ac1ee2dcf1.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 22 Dec 2021 01:15:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yia4QysHReYynh2cdnpGUDF5V9EPVql6iT9Vaf0gFihEBMRheufkjW/vn5JKXqs7U0EIpcPOvFc0KdWnPszUaLoFGjVBjnwRV5vAVo4sQsc78D+bpVOWH5lZZ+E2IoBzyGWVLv6RJNROKg765dZ8erqit8g+mBH0Xd1eKdfp8nZF3lS5GMiY6pCE9Af6L0HUzwZA/NQfXWSCdF/+Ca0j6OFmn0r5WJ0gCu3kLdkQd5URBYOEqAERb+0lD/GpCYskSconVKcgS378thSTboWvNoJsoc7gxWDvrIGoejAx1vqOqjLz7vcGimkkn5L+ma4UuJgW+phvZVfQu2X4MxuB7w== 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=n9ak/6FxM/9buJWRsCoOkjuRMoEkTHdPNeDemo7V8vU=; b=meRNaKuWBrnVvt7rySOarTSYa8IcK/m+vVIBggC8bS2xgjABSAtQbsETTQD+djZBbxNOHEf/DldYtlXjfpWu9H2Zwynbg72idPVYD+xMPUhuS1dI2rngSoZyDlICCoJGnAqNtNpNOhyh95B6YpP6f1/lPyOQDXpEdxONj6Nl5+uvaU8SA8gQqmxJUysU0Pn1k54buidTenSc0vwVpckvEh50vmbwISvCf4L3UnF66FOBjgMWvloJbyQm14xylN61mUrhwvaZxyIcKFJ4Qc+9RER514T+8jyiBw9B+zGj5yup9NHpGjpCa3elkNdP48tJsncaeuPIIQyxcpfLWKzR9Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n9ak/6FxM/9buJWRsCoOkjuRMoEkTHdPNeDemo7V8vU=; b=CPsV/hIFCOCJMEw9T+XihsLW/5sG/yiCZpV8jUUHDsyItllCCBhqoRvivVCHQZqRv7Lxcj01e1qGu6MMVTtWf6indx1L8C3OFg9/3xzP6q6M2P3Ao8WUAuQVoVyKz+1J+pf3Mcj74xHMZFNhzAi86rlDzIKIn3fqGLgmEVnhEes= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) by PAXPR08MB7017.eurprd08.prod.outlook.com (2603:10a6:102:1df::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.19; Wed, 22 Dec 2021 01:15:09 +0000 Received: from PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::64a1:69a1:148d:9fa]) by PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::64a1:69a1:148d:9fa%9]) with mapi id 15.20.4823.018; Wed, 22 Dec 2021 01:15:09 +0000 From: "Khasim Mohammed" To: devel@edk2.groups.io Cc: nd@arm.com, Khasim Syed Mohammed Subject: [PATCH v5 0/4] Enable CCIX port as PCIe root host on N1SDP Date: Wed, 22 Dec 2021 06:44:36 +0530 Message-Id: <20211222011440.3687-1-khasim.mohammed@arm.com> X-Mailer: git-send-email 2.17.1 X-ClientProxiedBy: PN0PR01CA0046.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:49::14) To PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 359cb803-d0e2-459b-ce3a-08d9c4e88428 X-MS-TrafficTypeDiagnostic: PAXPR08MB7017:EE_|DB5EUR03FT008:EE_|AM9PR08MB6180:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:7691;OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: mRphLuTwIJO+kBcun53wjHH8PKwcwwUG6jKrTBA7TDzmqPDFmJwno/1QsxIhoBD+MfzJCsNSvA89qWoS0ozS3zwg+pjC+dBKrC65NQOmMrypABWyllzdDcZybMpuOkH2wgkiDIG/xwKQDc0UKlVwdCMzDUm2Qmbjc7t+40qz2sDdC/ksn3dV0wL85/sLtoesbENPsmXQdoOC0lOawgHS/r1v30e1541TmyenxaGdBa5AdJOZQm3yC10/deCjOL5frv8DxgeCAuYCEX2Fcj78fMJiReFU7QVu4kkgjyvqbRipvQkSkt3rodD/d3IWzpYrHZxZSqx1nuMJVTUihZuDisl0Oh4MkZmN2IK1cVIF/h1FaHmTBclMqO0sq1YAnVNZmHhrOKCnPLsR4NAKwWu+YYvUBr7qU/nDjLlTsSBZ8+/jiXc7XD8CptORaMB1rBHNp2nUvx54K9xDYzhccIJE69nHSxmMaMa4axVxDRDoeaJkG57pU92Afopj/j6Z6Aj2+FwT6lnwD4BUNlmjxBWgJUrAneD/j935wp1n3/VPrnzZeXuBv8MUwzwslE5/zRRvrJ2hgx5oYvcFFQq7RoAwWyP3VvbJn7mHl86w2NtyhT0NUoO4EhjHwo5qE3wXfmqZPEIqbHVRaEgDNMtVafEytFkvBcDb6aZIwP4SphCyj2ffPVUsFcv79TVtxRc3xmYnT+21KEv2iSaWDO8sc+ylvsRrvGHvKpn54dNw6W+hs7rg+BDsT5AWC5Us+UXGIX1BCILzLrF7pm2WwXVg5X44wohiwomGx7ApkPf773rCEvMM9or/iKNf5W2u5KBur2t+ 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)(186003)(2616005)(26005)(508600001)(36756003)(316002)(8936002)(86362001)(4326008)(66476007)(66556008)(38350700002)(38100700002)(66946007)(6486002)(19627235002)(6666004)(2906002)(966005)(6512007)(1076003)(6506007)(6916009)(8676002)(5660300002)(52116002)(83380400001)(32563001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB7017 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Return-Path: Khasim.Mohammed@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT008.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: cd122456-82be-48c2-c266-08d9c4e87ea5 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o1DGuadxib4TnrzvIIEh8ZRjKO1rl7F4ZrqCOYGn6lV15lrekEN6m4hBaG7dRnzeWdRKX7EnRVsdCmYTXpjWJ9odxtaxCF2I1PX3JlxPoPU+XEUT5aZZgZKWU2hYU3HVss+GZvucArmecUwsd8OyAdtWps+36QAA9A9Gyx4Bm8PZTZCZgjAftuLntzhHXrbRbKH4fNABDKvoMzyM37tCa2mGSog9gW8cKgbsg2y7jnIbqVAOjugPbfiY2hnARQp2m3TuKnr9rJrTccMYmrrzrEyQGi5HDm9kHYCtgZWZ7CEIuxwdsja8fk9vnYaLps8GrPPEa/V+NZMdBTAkU/O+ut0kVGrPsG6QmvehI502gHydJOqFM2l7Z2b519/n7L7CKm9YN84ExB8xLhhJElEiI2lKgA2oQUnN1luCLFKUT8+LDP8v/mLln9nKCeJsbnDKq4bkMmOjZGSNroVUiN6uFMYByxPlZeztjrjIo64UC3ThYaMK8yTvB8qnoHUbekPJVCveLvvthOgnwi7bSd+r4ST+JREFhmG4EUkGqhV8Qwwuax1nAX4j1TaWoI5KPDknGpVbZYUMLLCk5jSs6yHy5vwK80KQOLvmp7qo2gKfVJ8qy49D1/YuhTLoei+wBTAG0n2tbMuBgsw0+dxsXQnmYBFda1Lv4J+Mgi3zFAoy0E297VXycjbJRKKpAC+TQzJqcy2tPNsUlQdABop1vyJSSXJ2TK8NxWrR6+AYfvpyVNYSltMx56yGznOhnc9WKXtSVB3yUDAMbcHaxhGtnS8rViu6QrbXGBNrVzsOKdYYdv2ifs7Fn7avoN00UvEwpl/6 X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(36840700001)(46966006)(82310400004)(86362001)(2616005)(5660300002)(1076003)(81166007)(83380400001)(70586007)(36860700001)(36756003)(70206006)(6666004)(47076005)(356005)(336012)(6512007)(186003)(6486002)(26005)(19627235002)(4326008)(6506007)(2906002)(508600001)(8676002)(8936002)(6916009)(316002)(966005)(32563001);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2021 01:15:17.8203 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 359cb803-d0e2-459b-ce3a-08d9c4e88428 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: DB5EUR03FT008.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6180 Content-Type: text/plain The patch series removes PciExpressLib and enables CCIX port as PCIe root on N1SDP. V5: - Split the CCIX patch, separate PCD updates and CCIX root port enablement. - Use GET_SEG_ macro for segment detection and update logic accordingly. V4: - Remove PciExpressLib and use PciSegmentLib instead. More detailed explanation is included in the patch. V3: - The conditional logic in GetPciExpressAddress is made simple. - Removed few more PCD entries that were unused. - Removed hardcoded entries. V2: - Removed few PCDs entries that were not used. - Migrated to latest version edk2-platform and validated the patches. V1: - The PciExpressLib is updated to validate the PCIe addresses and introducing corresponding PCD entries. - A custom PCI Segment library is adapted from SynQuacerPciSegmentLib and ported for N1Sdp. - The root complex node info in PciHostBridge library is updated to include the CCIX port information. The changes can be seen at: https://github.com/khasim/edk2-platforms-n1sdp/tree/n1sdp-ccix-root Khasim Syed Mohammed (4): Silicon/ARM/NeoverseN1Soc: Port PCI Segment Library Silicon/ARM/NeoverseN1Soc: Update PCDs to support multiple PCI root ports Silicon/ARM/NeoverseN1Soc: Add CCIX root complex support Silicon/ARM/NeoverseN1Soc: Remove PciExpressLib use PciSegmentLib instead .../AslTables/SsdtPci.asl | 8 +- .../AslTables/SsdtRemotePci.asl | 4 +- .../ConfigurationManager.c | 24 +- .../ConfigurationManagerDxe.inf | 18 +- Platform/ARM/N1Sdp/N1SdpPlatform.dec | 8 - Platform/ARM/N1Sdp/N1SdpPlatform.dsc | 5 +- .../PciExpressLib.c | 1589 ---------------- .../PciExpressLib.inf | 56 - .../PciHostBridgeLib/PciHostBridgeLib.c | 71 +- .../PciHostBridgeLib/PciHostBridgeLib.inf | 11 +- .../Library/PciSegmentLib/PciSegmentLib.c | 1602 +++++++++++++++++ .../Library/PciSegmentLib/PciSegmentLib.inf | 38 + .../Library/PlatformLib/PlatformLib.inf | 1 + .../Library/PlatformLib/PlatformLibMem.c | 4 +- Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec | 58 +- 15 files changed, 1785 insertions(+), 1712 deletions(-) delete mode 100644 Silicon/ARM/NeoverseN1Soc/Library/NeoverseN1SocPciExpressLib/PciExpressLib.c delete mode 100644 Silicon/ARM/NeoverseN1Soc/Library/NeoverseN1SocPciExpressLib/PciExpressLib.inf create mode 100644 Silicon/ARM/NeoverseN1Soc/Library/PciSegmentLib/PciSegmentLib.c create mode 100644 Silicon/ARM/NeoverseN1Soc/Library/PciSegmentLib/PciSegmentLib.inf -- 2.17.1