From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR03-AM5-obe.outbound.protection.outlook.com (EUR03-AM5-obe.outbound.protection.outlook.com [40.107.3.58]) by mx.groups.io with SMTP id smtpd.web11.9515.1642865222630598610 for ; Sat, 22 Jan 2022 07:27:03 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=36p07W6r; spf=pass (domain: arm.com, ip: 40.107.3.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=mQhZ3blcbtmTlBKWSoEmYnR/vtTf+E9AArvDuv/9Wd0=; b=36p07W6r4HIkQZWn1JM0eg/birm5VPg3Y18qVHTv2q40pZeHXELijsWwj3HjD01XCTyH23fNsuJaTomkIE+zbctnx8eENpvVF5Hxuzvkk/lulDs0P2h5kg2OrxfQriah5ZN9W7AN2MgDN0GIlZ/SeiGik/teW3jfmfelb6fmICM= Received: from DB6PR1001CA0038.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:55::24) by DBBPR08MB6281.eurprd08.prod.outlook.com (2603:10a6:10:1f6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.11; Sat, 22 Jan 2022 15:26:52 +0000 Received: from DB5EUR03FT013.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:55:cafe::3) by DB6PR1001CA0038.outlook.office365.com (2603:10a6:4:55::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.8 via Frontend Transport; Sat, 22 Jan 2022 15:26:52 +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 DB5EUR03FT013.mail.protection.outlook.com (10.152.20.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.7 via Frontend Transport; Sat, 22 Jan 2022 15:26:52 +0000 Received: ("Tessian outbound 63bb5eb69ee8:v113"); Sat, 22 Jan 2022 15:26:52 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0e273c9aed07eb23 X-CR-MTA-TID: 64aa7808 Received: from d5b10cd6e615.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D06EEC33-6965-486C-9FB8-4569C70097D8.1; Sat, 22 Jan 2022 15:26:41 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d5b10cd6e615.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sat, 22 Jan 2022 15:26:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HUylOZnqvuSidGShXErkJlaktJOaKzqMBhGjmtwV837bu62peGLX60NfYsoxC7oc7DQkmMMxep8tC5Zx0G3JzGBm1W2eKeQs3TCPCIIGqKx5gAw3/C7O5NCK40FVKaF/Ub5rtpkTcFxNSuGMOc8CpAWa70njuZACJowdzVCyGX3fzAFuR5BbWzVg9W08gGGpxf3OOcaylfCKSA1exI5Tet9IqGF8yxQBIpofQEd2hTOF9dx/Y6TStIqFO9/PsBayGj0m1wKBVDfg3AFBY/d84r5pGmITEU7B5p2ymfqI5ufCOqivRjVmkBAC5a6+jdVZfBynQY7mSEhsUdAdMfODmg== 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=mQhZ3blcbtmTlBKWSoEmYnR/vtTf+E9AArvDuv/9Wd0=; b=dVW7iWWdQz44Djg58gWuXdxnLAlVypgCMHW9nlpSS1UzaJSDyIacpf7lRDPIGhYrfU1uwy4+pc1qgrKbDljCx/uw6wS47jkD2ACPS1JYqrr0Bwx4jsukY7unUdt6Imu9MJGV9DECrNCzc8hsHtaWdNuCAycaWmaTXPttmOHizSGT9QK3ab52D0ezd56jxG14U56/wDXfnVB/688lsu5abYXesa53Ak1vZTC72AItO33Cu+Tk9MOchTDZCOF0TkK7ns2UU6hqEf7nKtlpo0mJJ6YB4SUe0nSh0zDG6EdrNSPhuAXHpfjocVwYz6v9xhLnHsKxHe4LujPRcYMEm45aOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=mQhZ3blcbtmTlBKWSoEmYnR/vtTf+E9AArvDuv/9Wd0=; b=36p07W6r4HIkQZWn1JM0eg/birm5VPg3Y18qVHTv2q40pZeHXELijsWwj3HjD01XCTyH23fNsuJaTomkIE+zbctnx8eENpvVF5Hxuzvkk/lulDs0P2h5kg2OrxfQriah5ZN9W7AN2MgDN0GIlZ/SeiGik/teW3jfmfelb6fmICM= 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 AM0PR08MB4579.eurprd08.prod.outlook.com (2603:10a6:208:108::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.12; Sat, 22 Jan 2022 15:26:34 +0000 Received: from PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::edb5:a2ea:773e:cb8]) by PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::edb5:a2ea:773e:cb8%7]) with mapi id 15.20.4909.014; Sat, 22 Jan 2022 15:26:34 +0000 From: "Khasim Mohammed" To: devel@edk2.groups.io Cc: nd@arm.com, sami.mujawar@arm.com, pierre.gondois@arm.com, Khasim Syed Mohammed Subject: [PATCH v6 0/4] Enable CCIX port as PCIe root host on N1SDP Date: Sat, 22 Jan 2022 20:56:11 +0530 Message-Id: <20220122152615.17366-1-khasim.mohammed@arm.com> X-Mailer: git-send-email 2.17.1 X-ClientProxiedBy: PN0PR01CA0017.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:4f::22) To PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 31dcb531-ed74-475c-4e8b-08d9ddbb9da3 X-MS-TrafficTypeDiagnostic: AM0PR08MB4579:EE_|DB5EUR03FT013:EE_|DBBPR08MB6281:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8273;OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 8XTW6TXEIYRkwYCtO7Mto8QYsuqXa56+ZHTzLNX6g9ZDRPUxvWM2uf9gmxOsRjNn6mUr3VUzxmv2mDEPjaNguH81hfwA3A9w8kSNpN7yDdlRtbjplNPpN0Xr+B/vfoBUCnic8YcjJK3fNuhi7tkzYbODFbSaTI+SYOfR+Tf93vibhjwTfBCI1u+Szo9trH46ojmcJGxM8MyyNLaEO3sUa6st9BV9jFnjm3GGHkvipSBq4UCoFeaHthzMe4IxBSx6tz5HVpzn05E532zKlWaWARdRT0OPt35Y2+XMThGyaWpf1Xmjg9KzkKy4jgNmH/uF9tNw+kDNr0IVk9KDRxvNNlY+j9zCXI8GbvvgVkurfo/Pj3rMHNCmLxUlaHfVxzL6gxfddQGvpkpRqYvdiSMcqnqS3jqIRfeHouNn93DHqJw4CvL0Qo7seyzWR+S+63Yuda6/BsdzV2/E/mpVh6pBbLkKmfsXZGcovpKZ71v54Dh42QrUwgQ1qHhUmEemMbKWdfGIXUuGyFRBYbAqcwvIEgdDugdDIyF/7azzlkY7Xli1LZ71YfvBj+p7Ll4DKyCGB1g+0PYvSm2E04BCrf3Wn3S4SsFpGf7UqcBn5HUXegDoDlxtq9cSHMBESibqlG3bIgU8zufGoVZ7jHtzowI96tmOTXBqKl/fzUe8sY63tGWcl0t3gwiM2wB5R81AjcO1LDhIYd2wZbpEh7fu4tI0Zkpu/1f3tmw+cVWR2FLddzqBM0pFSBvWXLyT/LZgfI/Ys1kZwcSLqpgECq6uQP7+W11ZFxJ1w2oG/LTxC/De5zi6jSh9s2rZObr6nWd1xG89 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)(6506007)(186003)(36756003)(83380400001)(6666004)(8676002)(4326008)(5660300002)(6486002)(6916009)(316002)(6512007)(26005)(19627235002)(508600001)(52116002)(2906002)(8936002)(66476007)(38350700002)(38100700002)(66556008)(966005)(1076003)(2616005)(66946007)(86362001)(32563001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4579 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: DB5EUR03FT013.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: d3d854de-2feb-4f7b-b19d-08d9ddbb91bc X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QO1uROczLqeUk1FMxbDCh6WJyZgAUIjXtTqT5GfRVxd/NIgbEh+nMzC/WlTv/hW71imqG4qPOy5QFTJHdT0aVxkQyim6YhVXT1WLDFqwezyaXlS26JxNOl2jj7IH1gUAy2pKxB2omYaL5BpTOo0iJ5SMrvuwx4KP4rbP45F+3+XIkMKN6ocAFEi3Nad3ubjE0OVnNN6D+wicQkDgeShwzHPxaXkO1abetG5ENKsrRXpEIaCHqG43WyLG5AMExuECFOs0RkWze5Hjmm5V3FV1hK5drkhtXpsJyxV8+NJ5jFk7iJjTV1ABcyvGE20mwu+27LW3KxqZ/7i46dTCX5cqKjTdGi6GPrb28kQHOasOMGGWWAvq03IUhlfXikUn049whlMKL0JZToz1aIXqTNg3h8S5XslsdjKAS5taUWMC2q2qaYBeYBAdhG8+ZveSh5amUL/Q5+9mNB8nUrIQ2ng1kUphimv0KxaTnkE/S+VXgHf5pGRhAu0DhVxk7Bw5fYFB12GKz5jpZcjUT7OLgd/mdkCGYHyB1z6/8TY9rqS3ik2Lcp0LUhp5o7LAjpyUo1cKaYf/yz11ZyVrCnTPwIab1QLp8YjwEsdD6WV67hJFIXt1SpGhjpFBGIIaJdT04sI81+diW0hSSmCkWINFOPRYOYDHN3s6IkLaY4HqIOtjs1ymCdGTJmZ/X6T8ziDXROfsu8WnDsvsn2K+IwV3G67Ghv5kvnPNA5Gbgz6nsvaQYIiWnTl994UYiqpreeZonHxSxxDXJs1WH3sK2u0VaBj5pzghQqzfYdPm2xoX0/hl3zzSA06CtJKS8TXcwP/EEIbR8rkj2rjqr5FLOj90pXDL2kKPhmDLpFgIGR65RYHvBi1xZcDoaIoXa7ykHVa1flJt 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)(40470700004)(46966006)(40460700003)(8936002)(8676002)(47076005)(508600001)(2906002)(82310400004)(6916009)(966005)(6666004)(4326008)(6486002)(26005)(186003)(19627235002)(336012)(6512007)(6506007)(70586007)(81166007)(1076003)(83380400001)(36756003)(86362001)(2616005)(36860700001)(356005)(5660300002)(70206006)(316002)(32563001);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2022 15:26:52.2984 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 31dcb531-ed74-475c-4e8b-08d9ddbb9da3 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: DB5EUR03FT013.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB6281 Content-Type: text/plain The patch series removes PciExpressLib and enables CCIX port as PCIe root on N1SDP. V6: - Sort PCDs in alphabetical order - Replace ASSERT calls with a if condition to capture the failure 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 | 1622 +++++++++++++++++ .../Library/PciSegmentLib/PciSegmentLib.inf | 38 + .../Library/PlatformLib/PlatformLib.inf | 1 + .../Library/PlatformLib/PlatformLibMem.c | 4 +- Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec | 64 +- 15 files changed, 1808 insertions(+), 1715 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