pub fn map_contiguous(
        &self,
        vmo: Arc<VmObject>,
        offset: usize,
        size: usize,
        perms: IommuPerms,
    ) -> ZxResult<(DevVAddr, usize)> {
        if perms == IommuPerms::empty() {
            return Err(ZxError::INVALID_ARGS);
        }
        if offset + size > vmo.len() {
            return Err(ZxError::INVALID_ARGS);
        }
        let p_addr = vmo.commit_page(offset, MMUFlags::empty())?;
        if vmo.is_paged() {
            Ok((p_addr, PAGE_SIZE))
        } else {
            Ok((p_addr, pages(size) * PAGE_SIZE))
        }
    }
/// Same as `map`, but with additional guarantee that this will never return a
/// partial mapping.  It will either return a single contiguous mapping or
/// return a failure.
Same as `map`, but with additional guarantee that this will never return a
partial mapping.  It will either return a single contiguous mapping or
return a failure.
Same as ` map ` but with additional guarantee that this will never return a partial mapping . It will either return a single contiguous mapping or return a failure .
pub fn map_contiguous(
        &self,
        vmo: Arc<VmObject>,
        offset: usize,
        size: usize,
        perms: IommuPerms,
    ) -> ZxResult<(DevVAddr, usize)> {
        if perms == IommuPerms::empty() {
            return Err(ZxError::INVALID_ARGS);
        }
        if offset + size > vmo.len() {
            return Err(ZxError::INVALID_ARGS);
        }
        let p_addr = vmo.commit_page(offset, MMUFlags::empty())?;
        if vmo.is_paged() {
            Ok((p_addr, PAGE_SIZE))
        } else {
            Ok((p_addr, pages(size) * PAGE_SIZE))
        }
    }
pub fn map_contiguous ( & self , vmo : Arc < VmObject > , offset : usize , size : usize , perms : IommuPerms , ) -> ZxResult < ( DevVAddr , usize ) > { if perms == IommuPerms :: empty ( ) { return Err ( ZxError :: INVALID_ARGS ) ; } if offset + size > vmo . len ( ) { return Err ( ZxError :: INVALID_ARGS ) ; } let p_addr = vmo . commit_page ( offset , MMUFlags :: empty ( ) ) ? ; if vmo . is_paged ( ) { Ok ( ( p_addr , PAGE_SIZE ) ) } else { Ok ( ( p_addr , pages ( size ) * PAGE_SIZE ) ) } }
Same as `map`, but with additional guarantee that this will never return a
partial mapping.
Same as ` map ` but with additional guarantee that this will never return a partial mapping .
&self
vmo
Arc<VmObject>
offset
usize
size
usize
perms
IommuPerms
&self
vmo
Arc<VmObject>
offset
usize
size
usize
perms
IommuPerms