Capability Invocations
Syscall 9 (Invoke) dispatches to object-type-specific operations based on the label field of the message info word.
The caller provides a capability address in argument 1; the kernel resolves the capability, checks rights, and dispatches to the handler identified by the label.
All invoke label values in this page are verified against lib/trona/uapi/consts/kernel.rs.
|
CNode Operations (0x10-0x18)
| Label | Name | Description |
|---|---|---|
|
|
Copy a capability from source to destination with reduced rights. Requires |
|
|
Create a badged copy of an endpoint/notification capability. Destination cannot have |
|
|
Transfer a |
|
|
Move an endpoint capability and overwrite its badge. |
|
|
Delete a single capability slot. Fails if the slot has CDT children. |
|
|
Recursively delete all CDT descendants, then delete the target slot. |
|
|
Save the reply capability from the current thread’s |
|
|
Set guard bits and guard value on a CNode (for multi-level CSpace configuration). |
|
|
Return type, rights, badge, depth, and child count for a capability. |
Untyped Operations (0x20-0x21)
| Label | Name | Description |
|---|---|---|
|
|
Carve typed kernel objects from untyped memory. Arguments: object type, size_bits, destination CNode, destination offset, count. |
|
|
Reset the untyped watermark back to zero once every child capability has been revoked. Fails while the untyped-child list is non-empty. |
Retype constraints:
-
Device untyped can only produce
FrameorUntyped. -
All destination slots must be empty.
-
Alignment is type-specific (CNode:
align_of::<CNode>(), VSpace:PAGE_SIZE, others: object size). -
Frameminimum size is 4 KiB even if smaller bits are requested.
SchedContext Operations (0x30-0x31)
| Label | Name | Description |
|---|---|---|
|
|
Set budget, period, and deadline on a SchedContext. |
|
|
Bind a SchedContext to a TCB. |
TCB Operations (0x40-0x4F)
| Label | Name | Description |
|---|---|---|
|
|
Set VSpace root, CSpace root, IPC buffer address, and fault endpoint. |
|
|
Transition thread from Inactive to Ready. |
|
|
Transition thread to Inactive. |
|
|
Set CSpace root and VSpace root separately (without full configure). |
|
|
Write saved register state (instruction pointer, stack pointer, arguments). |
|
|
Set IPC buffer virtual address. |
|
|
Bind a notification for combined endpoint+notification wait. |
|
|
Break the TCB↔Notification link previously established by |
|
|
Set fault handler endpoint. |
|
|
Copy FPU/SIMD state from another TCB. |
|
|
Set TLS base register ( |
|
|
Set notification dispatcher entry point for Call interruption. |
|
|
Return VSpace, CSpace, and IPC buffer configuration. |
| Labels 0x44, 0x45, 0x47 are not assigned — the numbering is sparse to leave room for future TCB operations. |
TCB Introspection Extensions
The primary TCB block at 0x40-0x4F is saturated, so accounting / introspection extensions live at higher numbers while staying in the TCB namespace (capability type ObjectType::Tcb).
| Label | Name | Description |
|---|---|---|
|
|
Sample the target thread’s cumulative user and kernel ticks ( |
|
|
Set ABI thread pointer for fork/TLS handoff. |
VSpace Operations (0x50-0x5F)
| Label | Name | Description |
|---|---|---|
|
|
Map a frame capability into a VSpace at a given virtual address. |
|
|
Unmap a page from a VSpace. |
|
|
Map a page table page into a VSpace. |
|
|
Walk page tables and return physical addresses for a VA range. |
|
|
Copy a page from one VSpace mapping to another. |
|
|
Map device memory (uncached) into a VSpace. |
|
|
Clone a single page with COW semantics. |
|
|
Map a contiguous range of device pages. |
|
|
Change page permissions on an existing mapping. |
|
|
Install a demand-page marker (PRESENT=0, DEMAND=1) for a single page. |
|
|
Install demand-page markers for a range. |
|
|
Manually resolve a COW page (force copy). |
|
|
Set the COW frame pool for a VSpace. |
|
|
Set notification for COW pool depletion. |
|
|
Add frames to the COW pool. |
|
|
Change permissions on a range of pages. |
VSpace Accounting Extensions
Assigned outside the 0x50-0x5F block because that block is saturated. The capability type is still ObjectType::VSpace.
| Label | Name | Description |
|---|---|---|
|
|
Write a |
|
|
Write a |
VSpace MemoryObject Mapping (0x97, 0x99-0x9A)
| Label | Name | Description |
|---|---|---|
|
|
Map a MemoryObject page range into a VSpace. Adds reverse map entry on the MO. |
|
|
Share a single read-only page between MemoryObjects. |
|
|
Bulk COW fork: clone MO ranges and remap for fork. |
MO-backed ranges are torn down with the plain VSPACE_UNMAP / VSPACE_PROTECT_RANGE invocations — there is no dedicated VSPACE_UNMAP_MO label.
Label 0x97 is shared between MO_HAS_PAGE (MemoryObject context) and VSPACE_MAP_MO (VSpace context). Label 0x99 is similarly shared between MO_UPDATE_PAGE_FLAGS (MO context) and VSPACE_SHARE_RO_PAGE (VSpace context). In both cases the kernel dispatches based on the invoked capability’s object type.
|
IRQ Operations (0x60-0x64)
| Label | Name | Description |
|---|---|---|
|
|
Create a new IRQ handler for a given IRQ number. Requires the IRQ control capability. |
|
|
Acknowledge an interrupt, re-enabling delivery for this handler. |
|
|
Bind a notification to an IRQ handler. Signals arrive on the notification when the IRQ fires. |
|
|
Unbind the notification from this handler. |
|
|
Create a device untyped capability for an MMIO region. |
IoPort Operations (0x70-0x77)
| Label | Name | Description |
|---|---|---|
|
|
Read 8-bit value from I/O port. |
|
|
Write 8-bit value to I/O port. |
|
|
Read 16-bit value from I/O port. |
|
|
Write 16-bit value to I/O port. |
|
|
Read 32-bit value from I/O port. |
|
|
Write 32-bit value to I/O port. |
|
|
Configure I/O port range. |
|
|
Create a new IoPort capability for a given port range. |
| On aarch64, I/O port operations are emulated via MMIO-mapped PCI I/O windows. |
MemoryObject Operations (0x90-0x99)
| Label | Name | Description |
|---|---|---|
|
|
Allocate physical pages for a range of page indices. Dual-source: untyped (primary), PMM (fallback). |
|
|
Release physical pages for a range. Unmaps from all VSpaces via reverse map. |
|
|
Return the MO’s page count. |
|
|
Create a copy-on-write child MO. |
|
|
Grow or shrink the MO page count. |
|
|
Read data from MO pages (kernel-mediated read). |
|
|
Write data to MO pages (kernel-mediated write). |
|
|
Check whether a page is committed at a given index. |
|
|
Return how many live VSpace mappings reference a given page of this MO. |
|
|
Atomically set / clear |
Related Pages
-
Syscall ABI — calling convention and dispatch flow
-
Capabilities — rights checking and address resolution
-
CSpace — CNode operations and initial CSpace layout
-
Memory Objects — MO commit/decommit/clone semantics
-
Threads — TCB operations and SchedContext binding