blob: 74b08e10d948ddb7c3d3816095d21451a1b9118a [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.
library zx;
@transport("Syscall")
protocol bti {
/// Create a new bus transaction initiator.
/// Rights: iommu must be of type ZX_OBJ_TYPE_IOMMU and have ZX_RIGHT_NONE.
// TODO(fxbug.dev/32803): This is an unusual rights spec.
bti_create(resource struct {
iommu handle:IOMMU;
options uint32;
bti_id uint64;
}) -> (resource struct {
status status;
out handle:BTI;
});
/// Pin pages and grant devices access to them.
/// Rights: handle must be of type ZX_OBJ_TYPE_BTI and have ZX_RIGHT_MAP.
/// Rights: vmo must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_MAP.
/// Rights: If options & ZX_BTI_PERM_READ, vmo must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_READ.
/// Rights: If options & ZX_BTI_PERM_WRITE, vmo must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_WRITE.
/// Rights: If options & ZX_BTI_PERM_EXECUTE, vmo must be of type ZX_OBJ_TYPE_VMO and have ZX_RIGHT_READ.
// READ is intentional in the EXECUTE condition.
bti_pin(resource struct {
handle handle:BTI;
options uint32;
vmo handle:VMO;
offset uint64;
size uint64;
}) -> (resource struct {
status status;
addrs vector_paddr;
pmt handle:PMT;
});
/// Releases all quarantined PMTs.
/// Rights: handle must be of type ZX_OBJ_TYPE_BTI and have ZX_RIGHT_WRITE.
bti_release_quarantine(resource struct {
handle handle:BTI;
}) -> (struct {
status status;
});
};