From owner-freebsd-questions@FreeBSD.ORG Wed May 27 14:26:17 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35F1925F for ; Wed, 27 May 2015 14:26:17 +0000 (UTC) (envelope-from ps06756@gmail.com) Received: from mail-vn0-x231.google.com (mail-vn0-x231.google.com [IPv6:2607:f8b0:400c:c0f::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E5BE3328 for ; Wed, 27 May 2015 14:26:16 +0000 (UTC) (envelope-from ps06756@gmail.com) Received: by vnbf129 with SMTP id f129so1150968vnb.1 for ; Wed, 27 May 2015 07:26:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=rNSe3ee9zas15YcKQI+AXu8dSZUjoubVlFuK1oJadZk=; b=YlyhQfgHf+F6LrZR8+BgpRtXm79JXu0WOtN+cl9Z0W5uxNSRp1Gs0U0gzScGe1AEwN 6oFYwlyT1+kdhXZjyu4/rBh5qLUtl+mRE5Clak1AmAHoqvuVM3j0iWyw9s9jxlReS2Zj 2s5K8s2vgqlepWfCbyoy4jfndGmuR1aksBzq95bDIiN60ORC0Be3lpGcx3ol0meCCF+T +qFQ1hSIyrrtcbwFUPD7rPeaIXtPpOBYJEgZ2LZkIwLu6M1VUTpVTuvnmH/6OwNJ0Mwd 52OEsSl6c0nC3fozw9kM1LX8sPptFOmUACVRtgf/w8AMq8s41lFWJLTOt5oE0WkqPQ6c GgRQ== X-Received: by 10.53.1.234 with SMTP id bj10mr27114439vdd.60.1432736775803; Wed, 27 May 2015 07:26:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.185.134 with HTTP; Wed, 27 May 2015 07:25:55 -0700 (PDT) From: Pratik Singhal Date: Wed, 27 May 2015 19:55:55 +0530 Message-ID: Subject: How do we use the bus_dma interface ? To: FreeBSD Questions Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2015 14:26:17 -0000 Hello, I have to program the Cubieboard's DMA controller. So far, after the initialization of the driver, to perform DMA transfer I was trying to pass the actual physical address to the DMA controller which I came to know that, is not the correct way to program the DMA controller. Instead, I should try using the bus_dma(9) interface. I have read the relevant parts of the DMA from the book FreeBSD Device Driver, but I am unable to understand the bus_dma interface. (How to use it ? ) . Can someone please give a overview of the whole process (tags and maps) so that I can at least get started on the programming part. for ex, How should I use the interface to start the DMA transfer ? Regards, Pratik Singhal