class VmoMapper
Defined at line 19 of file ../../zircon/system/ulib/fzl/include/lib/fzl/vmo-mapper.h
Protected Members
RefPtr vmar_manager_
uintptr_t start_
uint64_t size_
Public Methods
zx_status_t CreateAndMap (uint64_t size, zx_vm_option_t map_flags, fbl::RefPtr<VmarManager> vmar_manager, zx::vmo * vmo_out, zx_rights_t vmo_rights, uint32_t cache_policy, uint32_t vmo_options)
Create a new VMO and map it into our address space using the provided map
flags and optional target VMAR. If requested, return the created VMO
with the requested rights.
size : The minimum size, in bytes, of the VMO to create.
map_flags : The flags to use when mapping the VMO.
vmar : A reference to a VmarManager to use when mapping the VMO, or
nullptr to map the VMO using the root VMAR.
vmo_out : A pointer which will receive the created VMO handle, or
nullptr if the handle should be simply closed after it has
been mapped.
vmo_rights : The rights which should be applied to the VMO which is
passed back to the user via vmo_out, or ZX_RIGHT_SAME_RIGHTS
to leave the default rights.
cache_policy : When non-zero, indicates the cache policy to apply to the
created VMO.
vmo_options : The options to use when creating the VMO.
Defined at line 12 of file ../../zircon/system/ulib/fzl/vmo-mapper.cc
void VmoMapper ()
Defined at line 21 of file ../../zircon/system/ulib/fzl/include/lib/fzl/vmo-mapper.h
void ~VmoMapper ()
Defined at line 22 of file ../../zircon/system/ulib/fzl/include/lib/fzl/vmo-mapper.h
void VmoMapper (const VmoMapper & )
Defined at line 23 of file ../../zircon/system/ulib/fzl/include/lib/fzl/vmo-mapper.h
VmoMapper & operator= (const VmoMapper & )
Defined at line 23 of file ../../zircon/system/ulib/fzl/include/lib/fzl/vmo-mapper.h
void VmoMapper (VmoMapper && other)
Move support
Defined at line 26 of file ../../zircon/system/ulib/fzl/include/lib/fzl/vmo-mapper.h
VmoMapper & operator= (VmoMapper && other)
Defined at line 28 of file ../../zircon/system/ulib/fzl/include/lib/fzl/vmo-mapper.h
zx_status_t Map (const zx::vmo & vmo, uint64_t offset, uint64_t size, zx_vm_option_t map_flags, fbl::RefPtr<VmarManager> vmar_manager)
Map an existing VMO our address space using the provided map
flags and optional target VMAR.
vmo : The vmo to map.
offset : The offset into the vmo, in bytes, to start the map
size : The amount of the vmo, in bytes, to map, or 0 to map from
the offset to the end of the VMO.
map_flags : The flags to use when mapping the VMO.
vmar : A reference to a VmarManager to use when mapping the VMO, or
nullptr to map the VMO using the root VMAR.
Defined at line 58 of file ../../zircon/system/ulib/fzl/vmo-mapper.cc
void * start ()
Defined at line 75 of file ../../zircon/system/ulib/fzl/include/lib/fzl/vmo-mapper.h
uint64_t size ()
Defined at line 76 of file ../../zircon/system/ulib/fzl/include/lib/fzl/vmo-mapper.h
const fbl::RefPtr<VmarManager> & manager ()
Defined at line 77 of file ../../zircon/system/ulib/fzl/include/lib/fzl/vmo-mapper.h
void Unmap ()
Unmap the VMO from whichever VMAR it was mapped into.
Defined at line 89 of file ../../zircon/system/ulib/fzl/vmo-mapper.cc
Protected Methods
void MoveFromOther (VmoMapper * other)
Defined at line 84 of file ../../zircon/system/ulib/fzl/include/lib/fzl/vmo-mapper.h
zx_status_t CheckReadyToMap (const fbl::RefPtr<VmarManager> & vmar_manager)
Defined at line 105 of file ../../zircon/system/ulib/fzl/vmo-mapper.cc
zx_status_t InternalMap (const zx::vmo & vmo, uint64_t offset, uint64_t size, zx_vm_option_t map_flags, fbl::RefPtr<VmarManager> vmar_manager)
Defined at line 117 of file ../../zircon/system/ulib/fzl/vmo-mapper.cc