github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/fuchsia/vmo.txt (about) 1 # Copyright 2017 syzkaller project authors. All rights reserved. 2 # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. 3 4 include <zircon/syscalls.h> 5 include <zircon/types.h> 6 7 resource zx_vmo[zx_handle] 8 9 zx_vmo_create(size int64, options flags[vmo_create_options], out ptr[out, zx_vmo]) 10 zx_vmo_read(handle zx_vmo, buffer ptr[out, array[int8]], offset int64, buffer_size len[buffer]) 11 zx_vmo_write(handle zx_vmo, buffer ptr[in, array[int8]], offset int64, buffer_size len[buffer]) 12 zx_vmo_get_size(handle zx_vmo, size ptr[out, int64]) 13 zx_vmo_set_size(handle zx_vmo, size int64) 14 zx_vmo_op_range(handle zx_vmo, op flags[vmo_op_range_options], offset int64, size int64, buffer const[0], buffer_size const[0]) 15 zx_vmo_create_child(handle zx_vmo, options flags[vmo_create_child_options], offset int64, size int64, out ptr[out, zx_vmo]) 16 zx_vmo_set_cache_policy(handle zx_vmo, cache_policy flags[vmo_cache_policy]) 17 zx_vmo_replace_as_executable(handle zx_vmo, vmex zx_handle, out ptr[out, zx_vmo]) 18 zx_vmo_create_contiguous(bti zx_handle, size int64, alignment_log2 int32, out ptr[out, zx_vmo]) 19 zx_vmo_create_physical(handle zx_vmo, paddr ptr[in, int64], size int64, out ptr[out, zx_vmo]) 20 21 vmo_create_options = 0, ZX_VMO_RESIZABLE, ZX_VMO_DISCARDABLE 22 vmo_op_range_options = ZX_VMO_OP_COMMIT, ZX_VMO_OP_DECOMMIT, ZX_VMO_OP_ZERO, ZX_VMO_OP_LOCK, ZX_VMO_OP_TRY_LOCK, ZX_VMO_OP_UNLOCK, ZX_VMO_OP_CACHE_SYNC, ZX_VMO_OP_CACHE_INVALIDATE, ZX_VMO_OP_CACHE_CLEAN, ZX_VMO_OP_CACHE_CLEAN_INVALIDATE, ZX_VMO_OP_DONT_NEED, ZX_VMO_OP_ALWAYS_NEED 23 vmo_create_child_options = ZX_VMO_CHILD_SNAPSHOT, ZX_VMO_CHILD_SNAPSHOT_AT_LEAST_ON_WRITE, ZX_VMO_CHILD_SLICE, ZX_VMO_CHILD_RESIZABLE, ZX_VMO_CHILD_NO_WRITE 24 vmo_cache_policy = ZX_CACHE_POLICY_CACHED, ZX_CACHE_POLICY_UNCACHED, ZX_CACHE_POLICY_UNCACHED_DEVICE, ZX_CACHE_POLICY_WRITE_COMBINING