contiguous memory allocation problem

Ian Dowse iedowse at iedowse.com
Sun Jul 2 12:05:04 UTC 2006


In message <200607021138.11945.hselasky at c2i.net>, Hans Petter Selasky writes:
>But there is one problem, that has been overlooked, and that is High speed 
>isochronous transfers, which are not supported by the existing USB system. I 
>don't think that the EHCI specification was designed for scatter and gather, 
>when you consider this:
>
>8 transfers of 0xC00 bytes has to fit on 7 pages. If this is going to work, 
>and I am right, one page has to contain two transfers. (see page 43 of 
>ehci-r10.pdf)

I haven't looked into the details, but the text in section 3.3.3
seems to suggest that EHCI is designed to not require physically
contiguous allocations here either, so the same approach of using
bus_dmamap_load() should work:

  This data structure requires the associated data buffer to be
  contiguous (relative to virtual memory), but allows the physical
  memory pages to be non-contiguous. Seven page pointers are provided
  to support the expression of 8 isochronous transfers. The seven
  pointers allow for 3 (transactions) * 1024 (maximum packet size)
  * 8 (transaction records) (24576 bytes) to be moved with this
  data structure, regardless of the alignment offset of the first
  page.

Ian


More information about the freebsd-hackers mailing list