From owner-freebsd-hackers@freebsd.org Thu Dec 13 15:53:41 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECE341329A0B for ; Thu, 13 Dec 2018 15:53:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0097C8D997 for ; Thu, 13 Dec 2018 15:53:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x844.google.com with SMTP id r14so2672370qtp.1 for ; Thu, 13 Dec 2018 07:53:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fzccQgKTpAFs4ytrOSOCXM6BAxqxFNZ9e4SObqusW7c=; b=yHR7qIMAKmY7D60/gyWTftxnB3QktcYcUf8JMLWBgoWVEo6LzFoH1T5Rl7UKrCSbs9 L/Wr9mRONca/vdhWZxwzjSX5Isgq2MmwrakP+dgZgmb4UVSQOhDRSSSCOTY9JzxZROKo 11FHHg/I4ZPseRyX9loErwbmAF8FiCAbimhibjF4opzXe+61iWd58FDf1xk9CMor7efU 5m4xC/OknDF/bQr4t33AMx6DxPY7RzPLk2Ak/EQvCe6GQ9nBM1mcoHte1zR9+FaAQRdz 5j6HTUIZ0Eszm/JFZ52reVhUOo2cwn//0w8E0rPU7Cky/wooQI8tFKLipHlMfWZJVqpX B7iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fzccQgKTpAFs4ytrOSOCXM6BAxqxFNZ9e4SObqusW7c=; b=avQgck3rV2UaEK4iFIBWfpE5FeqNRpcFvSaVzp5BD6tXfwUAUDHtiQm0h78mRCVt07 UOEIMHlxjZ4t7xZk9b6GlCccbyJcIcFNRW9YfznvXEf2KHQJcXcMk+JecwISsdPuwfTM BySMIpEAl1ieGsxyUGo4qyPepko6JWX5uXZ8j/QyS0UZwPn2XdN+amFVWiBT3/18KLOm kJF26OKItteDxkg3okD2w+arbHK0vXlOoSbGR9tB8+4benFdWrPgu9NzKlNIaTiwtlmB WD/If3NVd6BihqXGMSXoYLs0+K80rtAAr7Y7kO0cLow5HphN8/nJtCNF/Ag/RvC1iZk2 UuqA== X-Gm-Message-State: AA+aEWaOLBfx9VPz9fRQZz8V46IZRgcAKXyueRz2fpQWeK8fai7t+yHi lphqIn1xERhzGf7v8u/Muf5Wnrat2YA7VhO0mHOCuWPy X-Google-Smtp-Source: AFSGD/UZ/ZHRQ+Vx8fR93m4D6LW7NJpTFxgTfJzv6+bk3qZ6+SeW0iLrMX/UYA5VRHiyEEj4wN+9Y2ma25WvHh3Nb60= X-Received: by 2002:a0c:f143:: with SMTP id y3mr23963534qvl.21.1544716419308; Thu, 13 Dec 2018 07:53:39 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Warner Losh Date: Thu, 13 Dec 2018 08:53:15 -0700 Message-ID: Subject: Re: How to use the DMA Engine in FreeBSD? To: Rajesh Kumar Cc: freebsd-drivers@freebsd.org, FreeBSD Hackers X-Rspamd-Queue-Id: 0097C8D997 X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=yHR7qIMA X-Spamd-Result: default: False [3.10 / 15.00]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; IP_SCORE(0.45)[ip: (5.22), ipnet: 2607:f8b0::/32(-1.58), asn: 15169(-1.30), country: US(-0.09)]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; NEURAL_SPAM_MEDIUM(0.99)[0.991,0]; NEURAL_SPAM_SHORT(0.67)[0.670,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; MX_GOOD(-0.01)[cached: ALT1.aspmx.l.google.com]; RCVD_IN_DNSWL_NONE(0.00)[4.4.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; FREEMAIL_TO(0.00)[gmail.com]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+,1:+]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 15:53:41 -0000 On Thu, Dec 13, 2018, 3:04 AM Rajesh Kumar Hi, > > Is there any good documentation available to understand the existing > support, API's and how-to use the DMA Engine in FreeBSD? > Usually you just use pci busmastering and it just works. I am trying to write a test driver which will use DMA Engine to do the data > transfer (rather than plain memcpy which involves cpu). Can anyone point > to any driver implementation which has similar functions implemented? I > see references to SYS_RES_DRQ to allocate DMA channels and play around. But > that seems to be specific to ISA. Can it be used for PCI drivers as well? > No. ISA DMA is only for really old hardware without it's own DMA engine. Look at the busdma api/man page. Warner > Thanks, > Rajesh. > _______________________________________________ > freebsd-drivers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-drivers > To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.org" >