Subject: Re: bce(4) and memory > 1GB problem
To: None <yhardy@uj.ac.za>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-kern
Date: 01/12/2007 21:13:56
yhardy@uj.ac.za wrote:

> Is there an advantage to passing by parameter rather than by flag (as in 
> my patch) ?
> Obviously my patch limits the address to a power of 2, will this be a 
> problem?

In the perfect world(tm), the API should be able to handle
any contiguous range, which could be represent by bus_dma_segment_t,
IMHO.

For example, AP-bus based DP83932 NIC found on newsmips port can
xfer data via DMA only into/from shared memory on the board.

> The additional flags for bus_dmamem_alloc in the patch I propose
> may address this on x86.

bus_dma(9) is designed for MI API, so we should make it generic
as much as possible for all affected archtecture, like alpha,
macppc, sparc64 etc.
(as mentioned in Jason's bus_dma paper in src/share/doc/papers/bus_dma)

I have not checked your patch closely, but I think it's better
to make clear API definitions of BUS_DMA_WIDTH(), BUS_DMA_WITDHFROM()
and BUS_DMA_HIGHADDR() macro and we should consider if it could be
implemented on other architectures. (only BUS_DMA_WIDTH() is public?)
---
Izumi Tsutsui