Subject: Re: Valid use of bus_dma(9)?
To: Jochen Kunz <firstname.lastname@example.org>
From: john heasley <email@example.com>
Date: 07/22/2004 06:50:09
Thu, Jul 22, 2004 at 03:13:10PM +0200, Jochen Kunz:
> Is this a valid use of bus_dma(9)?
> I.e. the usual way to get some DMA memory and later...
> y_segs = x_segs
> y_segs.ds_addr += sizeof(some_thing);
> y_segs.ds_len = sizeof(some_other_thing);
> Thus resulting in a double mapping of the previously allocated and maped
> "x" DMA memory. The physical "y" memory is subregion of the physical "x"
> memory mapped at a different KVA.
> To me this looks wrong. The "y" memory should be handled as an offset of
> the "x" memory and a driver should never modify or "self create" a DMA
> segment / map. (At least that is the way I understand bus_dma(9).)
> Background: fpa(4) does the above. It fails on hp700 for this reason.
> I now need to decide if the hp700 bus_dma(9) code needs fixing (my
> problem) or if fpa(4) needs fixing (not my problem ;-) ).
I believe thats the purpose of
Some drivers need to be able to pass a subregion of already-mapped bus
space to another driver or module within a driver. The
bus_space_subregion() function allows such subregions to be created.