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.84]) by mx.groups.io with SMTP id smtpd.web09.30705.1639511088702485045 for ; Tue, 14 Dec 2021 11:44:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=b7VQ4Vh6; spf=pass (domain: arm.com, ip: 40.107.3.84, 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=p40M9CUspoYjR4ViwHZDKQU2g/soVZd+6xOlqelcYV4=; b=b7VQ4Vh6mVtMGqbkBuVVHoEJ4IKzwRPgbEdBK6rpse1xPXmvcAs0DWfcsc2Dv/lwkj8wGHW5GBhFb2QfRiMh6PplsbDJbdzYf6dmqXpFSSGqyWrxQHnUyJq0ol7tiL70JfRWSq1i4R49OW73sMGEjwVsH8E4+fY/zFG+snSe4Kc= Received: from AM7PR02CA0005.eurprd02.prod.outlook.com (2603:10a6:20b:100::15) by AS8PR08MB6455.eurprd08.prod.outlook.com (2603:10a6:20b:338::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.13; Tue, 14 Dec 2021 19:44:46 +0000 Received: from VE1EUR03FT028.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:100:cafe::2c) by AM7PR02CA0005.outlook.office365.com (2603:10a6:20b:100::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.17 via Frontend Transport; Tue, 14 Dec 2021 19:44:46 +0000 X-MS-Exchange-Authentication-Results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=temperror action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT028.mail.protection.outlook.com (10.152.18.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.12 via Frontend Transport; Tue, 14 Dec 2021 19:44:43 +0000 Received: ("Tessian outbound a33f292be81b:v110"); Tue, 14 Dec 2021 19:44:43 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: e5a90f1df7132313 X-CR-MTA-TID: 64aa7808 Received: from 23ad710fd553.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 16E916BA-3365-4E9E-B13C-417D529DAF4A.1; Tue, 14 Dec 2021 19:44:26 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 23ad710fd553.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 14 Dec 2021 19:44:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K7thlWkKhYlxb/wA7Lhocxy909jIGS3Wb+EjMqq+9V/6b9RxtZTYFSFWfTTbHe9gaYE93+a7unSJ/JoyVCkwJ5zAlTLrtsiSBH3iskWVjMqrB+CpriKX9/Kgely9Q7wxQng+y/X2R4pjboXT3/nI5GlxRJ+X1Ul2mx4DBxZLBnGoyIXt0v4LB0vrDLFXskpZXl/tWEs4tudbY8tTrNQ3v/acmm4+leTIHBLpzHdgWHb9y1gT0qIYp6ZxlGNVByAkhb5XPVqv29Ua8CODudaWebUEuB3PIcQJS55dGQQjTQ4TucvPBJam/8rcbouiS4W4rfqNXYhzqdempDLRqDS5lw== 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=p40M9CUspoYjR4ViwHZDKQU2g/soVZd+6xOlqelcYV4=; b=H7NJWCyuaniDnOzMt8cZjizKjsaAfmhVDj3+3ro777exAQtXWZhJVBHdDotYi1RMcxYED/IQmGLA+sgDYnxNdk+fBitu6kn7xh3o31PPZtg3DZlPQw9yrIEhCHdHMhJQfQTDC+fQr5CzUvlqG1cJD5QO18irbUqLBvfOBojMSLXl82YfEvWjFOPOZkeH58HGIAcBHzBAgASW7ncN2lHiHGx11jx66MzsvR1GasRT/RcMXPkUiMLOlovBDbf8Tblh+m4Rr6KyBlvlon0vOUluDbpisP6qIUFYIZZW3BdCnCeNxRV+x3TgQar50Fdpg83AA5tdTouKRS0a8soi5a7HIg== 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=p40M9CUspoYjR4ViwHZDKQU2g/soVZd+6xOlqelcYV4=; b=b7VQ4Vh6mVtMGqbkBuVVHoEJ4IKzwRPgbEdBK6rpse1xPXmvcAs0DWfcsc2Dv/lwkj8wGHW5GBhFb2QfRiMh6PplsbDJbdzYf6dmqXpFSSGqyWrxQHnUyJq0ol7tiL70JfRWSq1i4R49OW73sMGEjwVsH8E4+fY/zFG+snSe4Kc= 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 PR3PR08MB5674.eurprd08.prod.outlook.com (2603:10a6:102:81::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.17; Tue, 14 Dec 2021 19:44:24 +0000 Received: from PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::64a1:69a1:148d:9fa]) by PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::64a1:69a1:148d:9fa%7]) with mapi id 15.20.4778.018; Tue, 14 Dec 2021 19:44:23 +0000 From: "Khasim Mohammed" To: devel@edk2.groups.io Cc: nd@arm.com, Khasim Syed Mohammed Subject: [PATCH v4 0/3] Enable CCIX port as PCIe root host on N1SDP Date: Wed, 15 Dec 2021 01:13:53 +0530 Message-Id: <20211214194356.21005-1-khasim.mohammed@arm.com> X-Mailer: git-send-email 2.17.1 X-ClientProxiedBy: PN0PR01CA0011.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:4f::16) To PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 4c717339-4f73-4673-2193-08d9bf3a2d51 X-MS-TrafficTypeDiagnostic: PR3PR08MB5674:EE_|VE1EUR03FT028:EE_|AS8PR08MB6455:EE_ 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: RhHfEPjnVNheePd+sc3JTt8XefmnKBZuQOqfkov0DpRW96Bl28oxlUhegqkYnxk5muzoZuhJk/LUktL9laETKAA/IaaGRQmqL/5RgaChgP/cxAbcTjVWG9EvGRWigUQqgUj1dVHTpCJnZ8aQShgwc/ssbdzb7hM7cYXJNE7AVKIHU2fTQv+QhReCDktxzzf91d02ZDGy/TIQ2eeAqoHV0OoRnODh9mWxXdgeo2vlqLCDDFhCa8E+Kt1HPD9N/XMap44wotX9ipPZNvesWFE56B+ssvh2EAkxpNcQubHeTSSf9KVB9yzBRjP2qN7UU2jWdb0FAQG3vmFexRpefFoFumNQGZs+Oi23WHrlpz5Yp3KtsF+YtsqWikuuBWq6CsFmGhbraVpvDVgIrUgVwdCMIW2DPP8FjT6RLcbQlE6TA3gB8j6glhe6DuzdMhro4+bLvPerFK5zQmE3jMCPbZCvD+rO0G8f4kzmC0DVNUdsGmf7RYXRiJMxyfkgjqNZ0S6c1Zpyf9Ggy22yajpZH+xiIcn2XFNxft6YaI/WWbrXNFPBqNfyBWACsiczIRQ19KxHxPwDrak1G+YHdnBWaMPn8fdCSTG/swByTdTBFWYokV4SAdJWdROrKGQaCxVNBs/zFDOWSkftO8++o4TUh+fe46rzlh+4ilII5mQvhyCS/IExBFinucAf7BSy1nGjZm11G48H60X0Z3epIKLS6SanPfIs1ErXTk9NAObUYWfZOlBzKu+G5gMZe447zqHMB4T6aA0fQAcSb0NyDSwziIoCOluYEoLBDO9Cn+p6AOecStMabs5PXW3YBUsW4PWjE1Ea 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)(2906002)(36756003)(6486002)(6666004)(4326008)(66946007)(186003)(52116002)(6916009)(26005)(966005)(508600001)(19627235002)(6506007)(66476007)(66556008)(83380400001)(316002)(6512007)(86362001)(5660300002)(38100700002)(8676002)(1076003)(2616005)(8936002)(38350700002)(32563001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5674 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: VE1EUR03FT028.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 464a32fa-ebed-423d-e3d0-08d9bf3a2134 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KGEOhBpHYen6nqp8NhsgZ5HHnZlMBLCv/c9y3F8u3egczktAvdnc2HkHQd8tO+5ZUAb1ddWjsBTvGii2bJ4d/1j4CQ0b1qZkgrhOzBa7wBucgM1BBujwWHhG/fQirLl0ALKV7mwmjFVDE2VGqa3YUSooes3H0RUycuQFbCtQteIepjWYwdrmw31zak7J/xDZzR6U6dhoEHMgZnGYc3FXdwJue37Q2UnugwS907G6F/s26ACH5B8h8pwgwg43CoV3z+Eik5RsutYv0AMr4SQ05EC3NL3vDDBS6z03fUFFX3/v4/LxwSDTeppfRWmY6+4/OoKa6CAoBz+YwwX9IokAF0Oj8WtmM+YqE/UZ2o952zTdq9kZLwQZMSvUCeFXbXCkOsDdjlgizY8n6/95GQ/3Ibf/Da6xBhzHq60WOjY3nL9rbyARXEnaoLbimg3HsH/dHXxKlpzTkUiBuZQTZ3usUqSytCco4303T8j/JigMmUEG2D+nbss8B0UmiKvfkHmVUAXFXUOHEDXZ01V8aZN9IHZ0IKhetSvVRyuL72QbBsWZPX+C6ASk5wcqm6zIoBLLZ/lNxIkMGtjs2YhMur7QFxvfMK3tZaHNRs35iNlkUYJJC3NxB2V27+m9ckilRCJOmuVh8R3FeMRoPB8XEH0ZOUZnKv3moKwuzER7nXcZGgSkDKwNSb7D7+Gb8Otpi2eC1dpVS/dF7D81vImlj9b3qJK5wsLhb6e2LhxK6W0wL2TeGVXLqmsnywHdqayk9sXeQtE5+jgwAnJTo5hxu5XrG5wN1pOuu6Clit8N0S6u99QYptQetPST5v05QS5iIEyPPNEGOkUThT91PH2crBilAncWSz3UYsYjDiixEOxZB5e5QucfE2s5bKGEs1HHODdU 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)(46966006)(36840700001)(40470700001)(6506007)(186003)(70586007)(70206006)(26005)(36756003)(6512007)(19627235002)(508600001)(6486002)(966005)(336012)(47076005)(8936002)(356005)(6666004)(86362001)(81166007)(63370400001)(1076003)(5660300002)(63350400001)(2616005)(83380400001)(6916009)(36860700001)(2906002)(8676002)(40460700001)(316002)(82310400004)(4326008)(32563001);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2021 19:44:43.7842 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4c717339-4f73-4673-2193-08d9bf3a2d51 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: VE1EUR03FT028.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6455 Content-Type: text/plain The patch series removes PciExpressLib and enables CCIX port as PCIe root on N1SDP. 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 (3): Silicon/ARM/NeoverseN1Soc: Port PCI Segment Library Silicon/ARM/NeoverseN1Soc: Add CCIX root complex support Silicon/ARM/NeoverseN1Soc: Remove PciExpressLib use PciSegmentLib instead .../ConfigurationManager.c | 6 +- .../ConfigurationManagerDxe.inf | 4 +- Platform/ARM/N1Sdp/N1SdpPlatform.dec | 10 +- Platform/ARM/N1Sdp/N1SdpPlatform.dsc | 5 +- .../PciExpressLib.c | 1589 ---------------- .../PciExpressLib.inf | 56 - .../PciHostBridgeLib/PciHostBridgeLib.c | 71 +- .../PciHostBridgeLib/PciHostBridgeLib.inf | 11 +- .../Library/PciSegmentLib/PciSegmentLib.c | 1643 +++++++++++++++++ .../Library/PciSegmentLib/PciSegmentLib.inf | 38 + .../Library/PlatformLib/PlatformLib.inf | 1 + .../Library/PlatformLib/PlatformLibMem.c | 4 +- Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec | 10 +- 13 files changed, 1773 insertions(+), 1675 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