contiguous memory allocation problem

Hans Petter Selasky hselasky at c2i.net
Sun Jul 2 19:06:24 UTC 2006


On Sunday 02 July 2006 17:20, Ian Dowse wrote:
> In message <200607021423.aa76796 at nowhere.iedowse.com>, Ian Dowse writes:
> >The trick is that if the 0x6000 bytes are contiguous in virtual
> >memory then they never span more than 6 pages so one iTD is enough.
>
> Sorry, I meant of course 6 page boundaries, which means no more
> than 7 pages. This is why the 7 physical address slots in the iTD
> is always enough for 8 x 3k transaction records if the 24k buffer
> is contiguous in virtual memory.
>

Ok. So the solution to my problem is to use scatter and gather. I will see 
about updating my USB system to do it like that.

But there is one thing I do not understand yet. When you load a page that 
physically resides above 4GB, because a computer has more than 4GB of memory, 
how does "bus_dmamap_load()" move that page down below 4GB, so that the 
32-bit USB host controllers can reach it?

--HPS


More information about the freebsd-hackers mailing list