class PhysIter
Defined at line 39 of file ../../src/devices/lib/dma-buffer/include/lib/dma-buffer/phys-iter.h
PhysIter -- An iterator yielding physical address and size pairs of a buffer, given as a
(zx_paddr_t, size_t) pair. These iterated pairs are suitable for hardware DMA transactions that
consume a physical address and length of bytes. The buffer need not be backed by physically
contiguous chunks (more below), or be chunk-aligned. The iterator will ensure chunk boundaries
are not crossed in given (addr, size) pairs unless the origin VMO was pinned with
ZX_BTI_CONTIGUOUS in effect.
The chunk list is given as a list of zx_paddr_t values, which is chunk-count in size. These
values are typically taken from the result of zx_bti_pin().
Chunks -- When pinned, a VMO may be subject to the effects of either ZX_BTI_CONTIGUOUS or
ZX_BTI_COMPRESS. These flags affect the size of contiguous bytes pointed at by the returned
zx_paddr_t list. There are three possibilities:
1. If neither flag was supplied, the returned list entries will point to page-sized chunks.
2. If ZX_BTI_CONTIGUOUS was given, the list will contain a single entry, pointing at a sequence
of (physically) contiguous pages. The chunk size isn't used in this case.
3. If ZX_BTI_COMPRESS was given, the list entries will point to minimum-contiguity-sized
chunks. This is an internal parameter, chosen by the kernel, which may be looked up via
zx_object_get_info().
Because this implementation seeks to not cross applicable chunk boundaries, it needs to know what
the chunk sizing actually is. The chunk size is a parameter given during construction, and
should be commensurate with how the origin VMO was actually pinned.
Public Methods
void PhysIter ()
Defined at line 44 of file ../../src/devices/lib/dma-buffer/include/lib/dma-buffer/phys-iter.h
void PhysIter (const zx_paddr_t * chunk_list, uint64_t chunk_count, size_t chunk_size, zx_off_t vmo_offset, size_t buf_length, size_t max_length)
Defined at line 46 of file ../../src/devices/lib/dma-buffer/include/lib/dma-buffer/phys-iter.h
void PhysIter (const zx_paddr_t * chunk_list, uint64_t chunk_count, zx_off_t vmo_offset, size_t buf_length, size_t max_length)
This overload defaults to page-sized chunks.
Defined at line 63 of file ../../src/devices/lib/dma-buffer/include/lib/dma-buffer/phys-iter.h
iterator begin ()
Defined at line 70 of file ../../src/devices/lib/dma-buffer/include/lib/dma-buffer/phys-iter.h
iterator cbegin ()
Defined at line 71 of file ../../src/devices/lib/dma-buffer/include/lib/dma-buffer/phys-iter.h
iterator end ()
Defined at line 72 of file ../../src/devices/lib/dma-buffer/include/lib/dma-buffer/phys-iter.h
iterator cend ()
Defined at line 73 of file ../../src/devices/lib/dma-buffer/include/lib/dma-buffer/phys-iter.h