From owner-freebsd-hackers@freebsd.org Thu Dec 13 11:16:32 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 B89551317937; Thu, 13 Dec 2018 11:16:32 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) (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 01ED983366; Thu, 13 Dec 2018 11:16:32 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: by mail-oi1-x22d.google.com with SMTP id x202so1284095oif.13; Thu, 13 Dec 2018 03:16:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=8qW5LlRMkcuhT9loX/aiMkvfpazq/y7Z/PX2nBuHS7g=; b=JMWQs9XvG2qBL2bAPdxL6Wv2L0y7sXt7Ecg+7LZtDLXwZQ5B2ViPJmnMf69gTQVeYO PrPHdNH7BKaVHBZOboDpXymmSVTgNbCElezVnJbunY/UkKto1bkC0amFe4oSwARKmbXz HE7uxjKAQqcWFmc9oqhL+E7i7hqHyndILoLjBVbXniI0wn0HHj1bSK4zdJadwGT259wM c4qXIh6dzI0zmuJvzQ50HK0I5AB9YqYBEL9g610Bu3GUFm9wnDRGvT/D5CUgy5o2kC5P k4jS1GbvlnOp+EnRsA/DIo+Yg44vS1eEG6yItrRbwLi6g6cM5a47RcEITRAXdNZMfyGJ OYOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=8qW5LlRMkcuhT9loX/aiMkvfpazq/y7Z/PX2nBuHS7g=; b=U6HzK0Jy+ixenQDnm6+hXhGN8h0/aObK6lRW6pLHt8WpvAooZG/d4KcpKpedZFuTfz 8NW5hPalJ6umfq/jhKEGbCW4FrySK/9Mt4z5zuzaOJP+sX7g1xQ9r3ibFNmEtaakNg0Z r1PvXl9BnfLE1V+ofZvJ+7jKv2J0eeOz4dSo0fndO/KPaoyMeIae/KLvGBsx4I+ejDn9 3IU6x1z7zr38ItaJDaINtg9Xty2IB1tp/PpJ2pqlJoEN+uZAWT2WBB1uHygO0loPOaZr JdHTJSaujOhavKpQtaV+A1vOpMX/WT5sXrpJwdbdtvRp8DwGsee7IwiGMzJdsa38tiKk rmMA== X-Gm-Message-State: AA+aEWYP3VO6wu3dWk6B9dtWp2YzQwmZffiVulwwBVHDOEFRVqAZDusz dHs7VdAnFEzE9mWFns5EalP+vMIa X-Google-Smtp-Source: AFSGD/VDPu6q0wJHAOUDne2nbVnrbT+aCJHYK5+vcomoC0UWafTTkH3iWlBNsanmLutaWTmMUylBQg== X-Received: by 2002:aca:b104:: with SMTP id a4mr2471872oif.133.1544699790824; Thu, 13 Dec 2018 03:16:30 -0800 (PST) Received: from [192.168.1.33] ([81.174.250.12]) by smtp.gmail.com with ESMTPSA id j23sm679877oih.22.2018.12.13.03.16.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Dec 2018 03:16:30 -0800 (PST) Subject: Re: How to use the DMA Engine in FreeBSD? To: Rajesh Kumar , freebsd-drivers@freebsd.org, freebsd-hackers@freebsd.org References: From: Johannes Lundberg Message-ID: <90ce7684-6a8f-c398-5a46-a7f6b03015e8@gmail.com> Date: Thu, 13 Dec 2018 11:16:27 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 01ED983366 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=JMWQs9Xv; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of johalun0@gmail.com designates 2607:f8b0:4864:20::22d as permitted sender) smtp.mailfrom=johalun0@gmail.com X-Spamd-Result: default: False [-2.55 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(-0.59)[ipnet: 2607:f8b0::/32(-1.58), asn: 15169(-1.30), country: US(-0.09)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[d.2.2.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]; SUBJECT_ENDS_QUESTION(1.00)[] 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 11:16:33 -0000 On 12/13/18 10:04 AM, Rajesh Kumar wrote: > Hi, > > Is there any good documentation available to understand the existing > support, API's and how-to use the DMA Engine in FreeBSD? > > 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? Hi The book "FreeBSD Device Drivers" by Joseph Kong has an example. Not sure it matches exactly what you are looking for but it might help more than the FreeBSD source code which tends to lack documentation. > Thanks, > Rajesh. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"