Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2021601rdf; Mon, 6 Nov 2023 02:16:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IGm8r0saWWhBm03VWMIZrLHl/27acNZ8HJgEq78Uya6CwxZx0Hhaoph/XGo3v6O60p1ZzUA X-Received: by 2002:a05:6a20:2694:b0:161:2df0:eadf with SMTP id h20-20020a056a20269400b001612df0eadfmr18269055pze.24.1699265788904; Mon, 06 Nov 2023 02:16:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699265788; cv=none; d=google.com; s=arc-20160816; b=iTvI0LgnYybfsRyQW91M25myJ3Y1XHWzBafdRDUDvtNuXFuVJl9R72Z2ayMuQoSE77 gs3HIamHQk0wnLpV2UM7+I8MnJ8z/Itu8e6txoM7GvDOfFFladuDG4SpvUcKB1NqFdR1 tUkRGwZpSA+Rke7hgRlfFrBonRoCIuySmAMh6EoMBx2sbtss+540yQC5l2NTSY0eGBIu 2fB+77xeilK6VoO/mh6rCgUbpYKFRRNxnopxfqo2PYFC4wun55JeQID6ltpkJh/RJn8F jokyjWLx4TqavxEYVP6MzmELZq9yx80Yvbld6t1+Fh6jPvYHJQ810EC9O7FshRkz5Q14 eBqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=deoLUU5V2DfYqOil2/cFzLYfGdzbT+Kde22TQPmjuDA=; fh=+lpCKdFs1sf7Zz3pysJBAYDk4aohKnRY2WTb0SynkOI=; b=lDgf0dCEb3tayZ79oD/qIqaGXahwdvS2M+Z3OU+XHb49BWuJw/8/rwZ/IeWZCGzg0k b9aJ2d2N6lRPHf8yCJALWef8hBJBWlXPKDpc6CHUZT/xXTzCTfuY02Eqbg6WCmpUSLo+ EynTn2Cdehowto75oUptfzbsqYdpQ1rKeQyv37sAmK4KU6ykMYteUhuY3GUNCqcs+mDw Pxv2+rlYQWUF4KhEv+SWRuls4BCHNMeUiE4Zhgv5rd9sI/Xt6RSIXTBn9ch4VCOgCyj+ 9QzP1+nHlzHFVi+5cE5iM7z0L088xcrJhInd6dZnNMeHzRNS7ok6KZDf8LWeeWK4tf70 4nCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id ea15-20020a056a004c0f00b006be25c80c8fsi8251633pfb.267.2023.11.06.02.16.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 02:16:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id EC52B8084059; Mon, 6 Nov 2023 02:15:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229841AbjKFKPn (ORCPT + 99 others); Mon, 6 Nov 2023 05:15:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229921AbjKFKPl (ORCPT ); Mon, 6 Nov 2023 05:15:41 -0500 Received: from smtp.missinglinkelectronics.com (smtp.missinglinkelectronics.com [162.55.135.183]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A7C6112; Mon, 6 Nov 2023 02:15:38 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by smtp.missinglinkelectronics.com (Postfix) with ESMTP id C80842062D; Mon, 6 Nov 2023 11:15:33 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at missinglinkelectronics.com Received: from smtp.missinglinkelectronics.com ([127.0.0.1]) by localhost (mail.missinglinkelectronics.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3Osev43khplb; Mon, 6 Nov 2023 11:15:33 +0100 (CET) Received: from nucnuc.mle (ppp-88-217-64-136.dynamic.mnet-online.de [88.217.64.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: david) by smtp.missinglinkelectronics.com (Postfix) with ESMTPSA id 3A22920267; Mon, 6 Nov 2023 11:15:33 +0100 (CET) Date: Mon, 6 Nov 2023 11:15:27 +0100 From: David Epping To: David Laight Cc: "linux-arm-kernel@lists.infradead.org" , Dinh Nguyen , Lorenzo Pieralisi , "linux-kernel@vger.kernel.org" , "linux-pci@vger.kernel.org" , Bjorn Helgaas , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= Subject: Re: mach-socfpga: PCIe Root IO TLP support for Cyclone V Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 06 Nov 2023 02:15:59 -0800 (PST) Hi David, On Sun, Nov 05, 2023 at 11:20:03AM +0000, David Laight wrote: > It isn't an ARM root complex ... > I didn't think any of the Cyclone V had embedded arm cpu. > I know some of the more recent Altera FPGA do, by the Cyclone V > is pretty old now - although we are still using them in new cards. > (Only as PCIe endpoints though.) You are right, the root complex itself is (likely) not an ARM design. I should have said "... unlike many other Root Complexes used in similar ARM CPU based SoCs ...". The Cyclone V SoC sub-family of FPGAs features a dual core Cortex A9. The "Cyclone V SoC Development Kit" is a development kit that exposes a readily usable PCIe root slot. > If you are building the FPGA image then all the logic to convert the > memory mapped slave cycles (into the fpga logic) is supplied as > verilog source. The CPU subsystem and the PCIe IP are hard IP in silicon and can not be altered. They are connected via the FPGA logic, though, and I agree one approach could be to intercept their communication with custom HDL. However, Linux uses the exact same PCIe hard IP registers required for IO TLPs to send Config TLPs. Every TLP requires multiple accesses to multiple registers, so locking between FPGA logic and Linux transactions would be required. I'm not saying that this is impossible, but I don't think it can be robust without a Linux software change. A software only solution has the benefit of being available to all users of such an FPGA, without access to that special logic. > I thought that all recent endpoints were required [1] to work with > just memory BARs - even going back to the later PCI versions. > So I'm surprised a PCIe endpoint need an IO BAR. The AX99100 implements a so called "Legacy Endpoint" and is thus allowed to rely on support for IO space. I guess this choice was made to stay driver-compatible to the PCI version, although I don't know the ancestry if this product. Best regards, David