blob: e63e8a5fd6b80c4fb0b85756bd07ff8137446ee2 [file] [log] [blame]
// Copyright 2020 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.
// This specific FIDL file is used in two contexts:
//
// 1. Define the `zx` library for plain-vanilla FIDL files, i.e. channel
// transport
// 2. Part of the overall definition of the Kernel ABI, i.e. Syscall transport
//
// Since the FIDL compiler does not support splitting definitions per-transport
// yet, we split definitions by file.
library zx;
// zx_status_t and errors.h.
alias status = int32;
// zx_time_t: absolute monotonic time in nanoseconds, from a device-specific
// timebase defined here:
// https://fuchsia.dev/fuchsia-src/concepts/kernel/time/monotonic.md
alias time = int64;
// zx_duration_t: a duration in nanoseconds.
alias duration = int64;
// zx_ticks_t: a duration in hardware ticks.
alias ticks = int64;
// zx_koid_t: global kernel object id.
alias koid = uint64;
// zx_vaddr_t: virtual address.
alias vaddr = uint64;
// zx_paddr_t: physical address.
alias paddr = uint64;
// zx_paddr32_t: low mem physical address.
alias paddr32 = uint32;
// zx_gpaddr_t: hypervisor guest physical addresses.
alias gpaddr = uint64;
// zx_off_t: offset.
alias off = uint64;
// See zircon/processargs.h.
alias procarg = uint32;
// zx_signals_t.
alias signals = uint32;
// TODO(fxbug.dev/51002): These are currently duplicated with zircon/types.h.
// Eventually the definitions in zircon/types.h will be generated from this
// source.
const CHANNEL_MAX_MSG_BYTES uint64 = 65536;
const CHANNEL_MAX_MSG_HANDLES uint64 = 64;
const MAX_NAME_LEN uint64 = 32;
const MAX_CPUS uint64 = 512;
type obj_type = strict enum : uint32 {
NONE = 0;
PROCESS = 1;
THREAD = 2;
VMO = 3;
CHANNEL = 4;
EVENT = 5;
PORT = 6;
INTERRUPT = 9;
PCI_DEVICE = 11;
LOG = 12;
SOCKET = 14;
RESOURCE = 15;
EVENTPAIR = 16;
JOB = 17;
VMAR = 18;
FIFO = 19;
GUEST = 20;
VCPU = 21;
TIMER = 22;
IOMMU = 23;
BTI = 24;
PROFILE = 25;
PMT = 26;
SUSPEND_TOKEN = 27;
PAGER = 28;
EXCEPTION = 29;
CLOCK = 30;
STREAM = 31;
MSI = 32;
};
resource_definition handle : uint32 {
properties {
subtype obj_type;
rights rights;
};
};