blob: f60edf26dea0bf77f2e5697261a5e14b0e3f7169 [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 time in nanoseconds (generally with respect to the
// monotonic clock).
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/7802): These are currently duplicated with zircon/types.h.
// Eventually the definitions in zircon/types.h will be generated from this
// source.
const uint64 CHANNEL_MAX_MSG_BYTES = 65536;
const uint64 CHANNEL_MAX_MSG_HANDLES = 64;
const uint64 MAX_NAME_LEN = 32;
const uint64 MAX_CPUS = 512;
enum obj_type : 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_ALLOCATION = 32;
MSI_INTERRUPT = 33;
};
resource_definition handle : uint32 {
properties {
obj_type subtype;
};
};