From owner-freebsd-hackers Tue Jan 18 15:15:35 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id C4D0414CF1 for ; Tue, 18 Jan 2000 15:15:32 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id QAA70496; Tue, 18 Jan 2000 16:15:09 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id QAA20891; Tue, 18 Jan 2000 16:15:36 -0700 (MST) Message-Id: <200001182315.QAA20891@harmony.village.org> To: YAMAMOTO Shigeru Subject: Re: how to allocate an alined address for a device? Cc: freebsd-hackers@FreeBSD.ORG In-reply-to: Your message of "Tue, 18 Jan 2000 16:38:32 +0900." <20000118163832A.shigeru@iij.ad.jp> References: <20000118163832A.shigeru@iij.ad.jp> Date: Tue, 18 Jan 2000 16:15:36 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20000118163832A.shigeru@iij.ad.jp> YAMAMOTO Shigeru writes: : In a CardBus system, a start address of status register must be aligned on : 4KB boundaries. : Such kind of address alignment is required at mapping meory window, : expansion ROM and etc. True. : I think we use bus_alloc_resource() to map a memory on a device. : But it seems me that bus_alloc_resource() never guarantees to allocate an : aligned address. : : How to allocate an aligned address to map a memory on a device? In a cardbus system, one would force the alignment in the card bus bridge. It would reject those things that aren't aligned in a sane manner for cardbus. It would try again to get a different range, if possible, or would reject the attempt. It would be nice if there was some way to have the underlying system, but there is no way to do that right now. Does this mean you are working on a cardbus thing? If so, please contact me off the list... Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message