• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
4include <zircon/syscalls.h>
5include <zircon/types.h>
6
7resource zx_vmo[zx_handle]
8
9zx_vmo_create(size int64, options flags[vmo_create_options], out ptr[out, zx_vmo])
10zx_vmo_read(handle zx_vmo, data ptr[out, array[int8]], offset int64, len intptr, actual ptr[out, intptr])
11zx_vmo_write(handle zx_vmo, data ptr[in, array[int8]], offset int64, len intptr, actual ptr[out, intptr])
12zx_vmo_clone(handle zx_vmo, options flags[vmo_clone_options], offset int64, size int64, out ptr[out, zx_vmo])
13zx_vmo_get_size(handle zx_vmo, size ptr[out, int64])
14zx_vmo_set_size(handle zx_vmo, size int64)
15zx_vmo_op_range$ZX_VMO_OP_COMMIT(handle zx_vmo, op const[ZX_VMO_OP_COMMIT], offset int64, size int64, data const[0], buffer_size const[0])
16zx_vmo_op_range$ZX_VMO_OP_DECOMMIT(handle zx_vmo, op const[ZX_VMO_OP_DECOMMIT], offset int64, size int64, data const[0], buffer_size const[0])
17zx_vmo_op_range$ZX_VMO_OP_CACHE_SYNC(handle zx_vmo, op const[ZX_VMO_OP_CACHE_SYNC], offset int64, size int64, data const[0], buffer_size const[0])
18zx_vmo_op_range$ZX_VMO_OP_CACHE_INVALIDATE(handle zx_vmo, op const[ZX_VMO_OP_CACHE_INVALIDATE], offset int64, size int64, data const[0], buffer_size const[0])
19zx_vmo_op_range$ZX_VMO_OP_CACHE_CLEAN(handle zx_vmo, op const[ZX_VMO_OP_CACHE_CLEAN], offset int64, size int64, data const[0], buffer_size const[0])
20zx_vmo_op_range$ZX_VMO_OP_CACHE_CLEAN_INVALIDATE(handle zx_vmo, op const[ZX_VMO_OP_CACHE_CLEAN_INVALIDATE], offset int64, size int64, data const[0], buffer_size const[0])
21
22# Not public:
23zx_vmo_set_cache_policy(handle zx_vmo, cache_policy flags[vmo_cache_policy])
24
25vmo_create_options = 0, ZX_VMO_NON_RESIZABLE
26vmo_clone_options = ZX_VMO_CLONE_COPY_ON_WRITE
27vmo_cache_policy = ZX_CACHE_POLICY_CACHED, ZX_CACHE_POLICY_UNCACHED, ZX_CACHE_POLICY_UNCACHED_DEVICE, ZX_CACHE_POLICY_WRITE_COMBINING
28