From owner-freebsd-hackers Mon Aug 27 9:58:38 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 7940737B401 for ; Mon, 27 Aug 2001 09:58:35 -0700 (PDT) (envelope-from julian@elischer.org) Received: from elischer.org (InterJet.elischer.org [192.168.1.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id KAA74170; Mon, 27 Aug 2001 10:06:21 -0700 (PDT) Message-ID: <3B8A78CA.A888C9BC@elischer.org> Date: Mon, 27 Aug 2001 09:43:54 -0700 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Zhihui Zhang Cc: freebsd-hackers@freebsd.org Subject: Re: ata0-master: non aligned DMA transfer attempted References: Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Zhihui Zhang wrote: > I believe that message is from ata_dmasetup(): > > if (((uintptr_t)data & scp->alignment) || (count & scp->alignment)) { > ata_printf(scp, device, "non aligned DMA transfer attempted\n"); > return -1; > } > > The user address obtained by static allocation is not 16-byte aligned. The > kernel routine physio() grabs a physical buffer to do DMA, but it still > uses the user's address. The KVA associated with the buffer is not used. > > -Zhihui the physical address of a buffer will have the same allignment as the KVA address. -- +------------------------------------+ ______ _ __ | __--_|\ Julian Elischer | \ U \/ / hard at work in | / \ julian@elischer.org +------>x USA \ a very strange | ( OZ ) \___ ___ | country ! +- X_.---._/ presently in San Francisco \_/ \\ v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message