blob: 6c7c5814973fab751209070d3c14466e60a546fb [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TODO(fxb/39732): This should be read as "library zx".
library zz;
[Transport = "Syscall"]
protocol pager {
/// Create a new pager object.
/// Rights: None.
pager_create(uint32 options) -> (status status, handle<pager> out);
/// Create a pager owned vmo.
/// Rights: pager must be of type ZX_OBJ_TYPE_PAGER.
/// Rights: port must be of type ZX_OBJ_TYPE_PORT and have ZX_RIGHT_WRITE.
pager_create_vmo(handle<pager> pager, uint32 options, handle<port> port, uint64 key, uint64 size)
-> (status status, handle<vmo> out);
/// Detaches a vmo from a pager.
/// Rights: pager must be of type ZX_OBJ_TYPE_PAGER.
/// Rights: vmo must be of type ZX_OBJ_TYPE_VMO.
pager_detach_vmo(handle<pager> pager, handle<vmo> vmo) -> (status status);
/// Supply pages into a pager owned vmo.
/// Rights: pager must be of type ZX_OBJ_TYPE_PAGER.
/// Rights: pager_vmo must be of type ZX_OBJ_TYPE_VMO.
/// Rights: aux_vmo must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_READ and have ZX_RIGHT_WRITE.
pager_supply_pages(handle<pager> pager,
handle<vmo> pager_vmo,
uint64 offset,
uint64 length,
handle<vmo> aux_vmo,
uint64 aux_offset)
-> (status status);
};