From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 57BE64247C; Tue, 24 Jan 2023 15:07:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E811C40150; Tue, 24 Jan 2023 15:07:54 +0100 (CET) Received: from outbound.mail.protection.outlook.com (mail-sn1nam02on2077.outbound.protection.outlook.com [40.107.96.77]) by mails.dpdk.org (Postfix) with ESMTP id 13F0E400EF for ; Tue, 24 Jan 2023 15:07:54 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NtfwSZWvNACRgxK4wGWhkXatVBSXSrEs29Gut3m39v5O6LNyeR5lkEoFhFGA79dPNFBJJwbBztqxz98hOHstTtRzhay/ht08yNmGoFR4sxvLfSBhuigCdCfijg1np0/agmtWyVYPAUsuISnIOabLswPZsIqk9R0K6KtaPjhDzzozRiOeBYKPX6LhdgX64FUgNOFJ5x39CBW0l69kVET75udpr1bftO27hKw3480cXnZNL+ubpyUgKqI9WDrcqhEfsWGEuTD0ElCpaC6QE85VyrAhlQKQ9xEXlIc3hyNx+ctoDF8YHaF+Cmiyv/lz4YYS8zCiqkPz4N25AYozFPeZwg== 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=VsRcaDrOmEJTLHqHRKtqatWIlT+JIUupII2P+M7OyEM=; b=OBUaQfzc/tSSenxo+G1YUPQkLfyaPX/aQt8NjTMCAxqsfPeklg/AZq8CA90tdkhbq1JoxEVWYQR3oMYNza3y5rVn/Decyi+HFklkO8qiP8g1qoSfyKjWN5nEAxs1BYdXoCDx0noi4JCyfHS+V9VQUfgiapmtsdQwdigSknyYCP6l10oOMcipckXR7UC2VRgNH4MaOBc7mTLZO7/qp5js8VMBhEgJa/cgRzuHh8ddS768YPjsl4liUn9LFvyhH2/wEMSU9420V6zvt2MHnwAtd3uoaI3sBkjkIlXlXYMewbqIxO2FI/qHzI/NMeLJbSSJr34ar7I7NNouI96lFqO6qg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VsRcaDrOmEJTLHqHRKtqatWIlT+JIUupII2P+M7OyEM=; b=iGDlOUmOJFvBRiM27PM/wqsIDAR++9hvg4tVlYBvDkbc6IQiLmbwyS+j4PCARXD902LQDF0m+jIrVI5ekay+gg+rC2oBOeldzWRfZ3zLuF6KWhpQ6KaRtxiUVUaXFFzKRY7Rpzr4DxoXEGeIPHoaEaE1DoiAyw3EACxcDJ4KHmw= Received: from BN0PR02CA0008.namprd02.prod.outlook.com (2603:10b6:408:e4::13) by IA1PR12MB6651.namprd12.prod.outlook.com (2603:10b6:208:3a0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Tue, 24 Jan 2023 14:07:51 +0000 Received: from BN8NAM11FT101.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e4:cafe::84) by BN0PR02CA0008.outlook.office365.com (2603:10b6:408:e4::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33 via Frontend Transport; Tue, 24 Jan 2023 14:07:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT101.mail.protection.outlook.com (10.13.177.126) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6002.13 via Frontend Transport; Tue, 24 Jan 2023 14:07:51 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Tue, 24 Jan 2023 08:07:49 -0600 Received: from xhdipdslab49.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Tue, 24 Jan 2023 08:07:47 -0600 From: Nipun Gupta To: , , CC: , , Subject: [RFC PATCH 0/6] add support for CDX bus Date: Tue, 24 Jan 2023 19:37:40 +0530 Message-ID: <20230124140746.594066-1-nipun.gupta@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT101:EE_|IA1PR12MB6651:EE_ X-MS-Office365-Filtering-Correlation-Id: b182f69f-4b1b-4f30-bbd7-08dafe146151 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DEewyOxpbsvN7NjnkaTUOIo7RpvpvNn6Ww9oMz62fUuO/gegFIWf/39vGdzZzFn7qJNEbUbkc8TNze0M7s4bdMP8vSmMq+qZFjE1URIF2RtUh42iLrpyPajPmyW1TVmMJL+bYAx0nMhOMW62AD/pPehh1Js2arFx6x1xRsZtOa7RmJ9hCweIeIdhH1uYXfaTxVE9eaJ15SPSoy8edDwwstPo1fF950jWgDTrVEA4gGigALCaId27Xjdvy0ELEFvsFLNXo6KhOuIfIz+5uLlCKr7bwZCSq9vha/DIoE0yefPFZWvjQ6KW1gnhDY7F5NKRaGKjXNfp6aXmvBLCBvE4w03T9IOjGf75j2BKF8G+jcTWDkOPKvOh6jHJHEGFv4CRbgWxWXLtgm0bHuOPAyQD0MoMkD2NZ4D0+Lq5NN10onUlIWqJZ36GQlVRqkmnKDfJV7KsZrpVk+/vqoHWKrMjnVxpkSKzTVwkVjCQtnTvpGZ/QqYnnw/2JuqeHsosvf6dR+RTaI1malUdoOPslL9vnrB0U6xw6OptRkWLlqdLt1V26Wm8xRI5HqUYO9Chkp6bDDYLPecA7FoFXbXzoYVioTeoXwCet3bTyoJO/2PXL564OhGlG5jnHWwBfpxvR6G4ASLKfzb8/XoguU0sdqSL0YNqGp4TzUmGNoSeV0XbM9m4w1kQA9/OmbKr+xQwv4xSsdueUGu1SMY+AyKJ9ANbcXNUwQUqOpihEYLWxdSRO8n5ARH4GMFSjkdfeLzaFmUtAbUBu8yzQgYQ0RDBr0hO3A== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(39860400002)(396003)(376002)(136003)(346002)(451199015)(36840700001)(40470700004)(46966006)(36860700001)(81166007)(82740400003)(41300700001)(86362001)(356005)(44832011)(2906002)(82310400005)(8936002)(5660300002)(4326008)(40460700003)(316002)(40480700001)(26005)(186003)(8676002)(6666004)(47076005)(426003)(336012)(70586007)(70206006)(54906003)(2616005)(1076003)(110136005)(478600001)(966005)(36756003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2023 14:07:51.1425 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b182f69f-4b1b-4f30-bbd7-08dafe146151 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT101.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6651 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Support AMD CDX bus, for FPGA based CDX devices. The CDX devices are memory mapped on system bus for embedded CPUs. It uses sysfs interface and the vfio-cdx driver to discover and initialize the CDX devices. The patches are intended for DPDK 23.07 release, and have been sent as an RFC as patches are yet to be merged in Linux. Linux CDX bus patches has been submitted at: https://lore.kernel.org/lkml/20230117134139.1298-4-nipun.gupta@amd.com/T/ CDX is a Hardware Architecture designed for AMD FPGA devices. It consists of mechanism for interaction between FPGA, Firmware and the APUs (Application CPUs). Firmware resides on RPU (Realtime CPUs) which interacts with the FPGA program manager and the APUs. The RPU provides memory-mapped interface (RPU if) which is used to communicate with APUs. VFIO CDX driver provides the CDX device resources like MMIO and interrupts to map to user-space. DPDK CDX bus uses sysfs interface and the vfio-cdx driver to discover and initialize the CDX devices for user-space applications. Nipun Gupta (6): bus/cdx: introduce cdx bus bus/cdx: add dma map and unmap support bus/cdx: add support for MSI bus/cdx: support plug unplug and dev iterator bus: enable cdx bus config/arm: add AMD CDX MAINTAINERS | 5 + config/arm/arm64_cdx_linux_gcc | 17 + config/arm/meson.build | 15 + drivers/bus/cdx/cdx.c | 737 +++++++++++++++++++++++++ drivers/bus/cdx/cdx.h | 54 ++ drivers/bus/cdx/cdx_logs.h | 37 ++ drivers/bus/cdx/cdx_vfio.c | 606 ++++++++++++++++++++ drivers/bus/cdx/meson.build | 13 + drivers/bus/cdx/rte_bus_cdx.h | 245 ++++++++ drivers/bus/cdx/version.map | 21 + drivers/bus/meson.build | 1 + lib/eal/common/eal_common_interrupts.c | 21 + lib/eal/common/eal_interrupts.h | 1 + lib/eal/include/rte_interrupts.h | 32 ++ lib/eal/version.map | 2 + 15 files changed, 1807 insertions(+) create mode 100644 config/arm/arm64_cdx_linux_gcc create mode 100644 drivers/bus/cdx/cdx.c create mode 100644 drivers/bus/cdx/cdx.h create mode 100644 drivers/bus/cdx/cdx_logs.h create mode 100644 drivers/bus/cdx/cdx_vfio.c create mode 100644 drivers/bus/cdx/meson.build create mode 100644 drivers/bus/cdx/rte_bus_cdx.h create mode 100644 drivers/bus/cdx/version.map -- 2.25.1