ZXFoundation™ 26h2
Loading...
Searching...
No Matches
types.cxxm File Reference

Gate subsystem types — per-namespace call IDs, the gate descriptor, and the flat dispatch-table types. More...

import zxfoundation.dgp.authorize;
import zxfoundation.scoms.kobject.base;
import zxfoundation.base.types;
Include dependency graph for types.cxxm:

Data Structures

struct  zxfoundation::dgp::gate::dispatch::entry_meta
 Metadata attached to each dispatch table entry. More...
struct  zxfoundation::dgp::gate::gate_desc

Typedefs

using zxfoundation::dgp::gate::dispatch::dispatch_handler
 Handler function signature for all nucleus calls.

Enumerations

enum class  zxfoundation::dgp::gate::call_namespace : u8 {
  dom = 0 , mem = 1 , gate = 2 , portal = 3 ,
  io = 4 , sgn = 5 , cap = 6 , sys = 7 ,
  _count = 8
}
 Namespace identifiers for dispatch.
enum class  zxfoundation::dgp::gate::dispatch::call_namespace
 Namespace identifiers for dispatch.
enum class  zxfoundation::dgp::gate::cap_op : u32 {
  acquire = 0 , release = 1 , validate = 2 , revoke = 3 ,
  _count = 4
}
enum class  zxfoundation::dgp::gate::dom_op : u32 {
  create = 0 , destroy = 1 , exit = 2 , info = 3 ,
  query = 4 , strand_create = 5 , strand_set_policy = 6 , strand_set_affinity = 7 ,
  strand_query_state = 8 , _count = 9
}
 Per-namespace operation IDs. More...
enum class  gate_auth : u8 { any = 0 , keyed = 1 , owner = 2 }
enum class  zxfoundation::dgp::gate::dispatch::gate_auth_level : u8 {
  none = 0 , capability = 1 , admin = 2 , domain_map = 3 ,
  storage_key = 4 , io = 5 , signal = 6
}
 Gate authorization level enforced at dispatch time. More...
enum class  gate_op : u32 { create = 0 , destroy = 1 , _count = 2 }
enum class  gate_type : u8 { nucleus = 0 , domain = 1 }
enum class  zxfoundation::dgp::gate::io_op : u32 {
  bind = 0 , unbind = 1 , submit = 2 , irq_bind = 3 ,
  dma_extent = 4 , completion_dequeue = 5 , _count = 6
}
enum class  mem_op : u32 {
  alloc = 0 , free = 1 , map = 2 , unmap = 3 ,
  protect = 4 , share = 5 , _count = 6
}
enum class  portal_op : u32 { create = 0 , destroy = 1 , _count = 2 }
enum class  zxfoundation::dgp::gate::sgn_op : u32 {
  register_handler = 0 , poll = 1 , ack = 2 , send = 3 ,
  mask_set = 4 , mask_get = 5 , wait = 6 , _count = 7
}
enum class  sys_op : u32 {
  time_yield = 0 , time_deadline = 1 , time_now = 2 , console_write = 3 ,
  register_service = 4 , lookup_service = 5 , unregister_service = 6 , ipc_endpoint_create = 7 ,
  ipc_endpoint_destroy = 8 , ipc_send = 9 , ipc_receive = 10 , shm_export = 11 ,
  shm_import = 12 , shm_map = 13 , policy_register = 14 , policy_unregister = 15 ,
  _count = 16
}

Functions

constexpr auto zxfoundation::dgp::gate::pack_call (call_namespace ns, u32 op) noexcept -> u32
constexpr auto zxfoundation::dgp::gate::dispatch::pack_index (call_namespace ns, u32 op) noexcept -> u32
 Pack a namespace and operation into a table index.

Variables

constexpr u32 zxfoundation::dgp::gate::dispatch::DISPATCH_TABLE_SIZE = 256U
 Maximum entries: 8 namespaces x 32 operations = 256.
constexpr u32 zxfoundation::dgp::gate::MAX_GATES = 512U

Detailed Description

Gate subsystem types — per-namespace call IDs, the gate descriptor, and the flat dispatch-table types.

SPDX-License-Identifier: Apache-2.0

Typedef Documentation

◆ dispatch_handler

Initial value:
auto (*)(
u64 a0, u64 a1, u64 a2, u64 a3, u64 a4
) noexcept -> u64

Handler function signature for all nucleus calls.

Enumeration Type Documentation

◆ cap_op

enum class zxfoundation::dgp::gate::cap_op : u32
exportstrong
Enumerator
revoke 

Admin-side revoke of a capability token (or its underlying rights bundle).

◆ dom_op

enum class zxfoundation::dgp::gate::dom_op : u32
exportstrong

Per-namespace operation IDs.

Enumerator
strand_set_policy 

(strand_id, &sched_policy, ctx) — change class/prio/affinity.

strand_set_affinity 

(strand_id, sched_mask_bits) — restrict CPU placement.

strand_query_state 

(strand_id, &out) — read cpu/on_rq/substate/prio/vruntime.

◆ gate_auth_level

Gate authorization level enforced at dispatch time.

Enumerator
none 

No capability check — self-domain, time, console.

capability 

Capability token required in a0.

admin 

Admin-level capability required.

domain_map 

Legacy domain capability with map right required.

storage_key 

Storage-key match required between caller and target.

io 

I/O authority required (a0 is op-specific, not a cap).

signal 

Signal-send right required (a0 = target domain id).

◆ io_op

enum class zxfoundation::dgp::gate::io_op : u32
exportstrong
Enumerator
irq_bind 

Retired: hard IRQs never enter user gates.

◆ sgn_op

enum class zxfoundation::dgp::gate::sgn_op : u32
exportstrong
Enumerator
send 

Cross-domain signal delivery: target_domain_id, kind, data.

mask_set 

Update blocked_mask (sigprocmask-style).

mask_get 

Read current blocked_mask.

wait 

Block current strand until any unblocked signal arrives.