Gate subsystem dispatch table implementation. More...
import zxfoundation.sync.qspinlock.core;import zxfoundation.dgp.gate.types;import zxfoundation.base.typestate;import lib.error;import zxfoundation.dgp.sync_contract;import std;import zxfoundation.dgp.gate.core;import zxfoundation.sys.printk.core;import zxfoundation.dgp.cap.types;import zxfoundation.base.types;import zxfoundation.dgp.authorize;import zxfoundation.dgp.cap.core;import zxfoundation.dgp.domain.core;import zxfoundation.dgp.domain.types;import zxfoundation.dgp.isolation.types;import zxfoundation.dgp.isolation;import zxfoundation.sync.lockable;Data Structures | |
| struct | zxfoundation::dgp::gate::dispatch::detail::cap_token |
| Opaque 64-bit capability token. More... | |
| struct | zxfoundation::dgp::gate::dispatch::cap_token |
| Opaque 64-bit capability token. More... | |
| struct | zxfoundation::dgp::gate::dispatch::domain |
| The domain struct — the central entity of the DGP kernel. More... | |
| struct | zxfoundation::dgp::gate::dispatch::detail::entry |
| struct | zxfoundation::dgp::gate::dispatch::detail::gate_desc |
Enumerations | |
| enum class | zxfoundation::dgp::gate::dispatch::cap_rights |
| Standard access rights usable with any capability type. | |
| enum class | zxfoundation::dgp::gate::dispatch::detail::cap_rights |
| Standard access rights usable with any capability type. | |
| enum class | gate_auth |
| enum class | zxfoundation::dgp::gate::dispatch::detail::isolation_rights |
| Authority bits interpreted by the DGP policy plane. | |
| enum class | zxfoundation::dgp::gate::dispatch::isolation_rights |
| Authority bits interpreted by the DGP policy plane. | |
| enum class | zxfoundation::dgp::gate::dispatch::detail::lifecycle_state |
| Unified lifecycle states for ALL typestate-tracked resources. More... | |
| enum class | zxfoundation::dgp::gate::dispatch::detail::lock_context |
| Execution context in which a DGP synchronization-sensitive operation occurs. | |
| enum class | zxfoundation::dgp::gate::dispatch::lock_context |
| Execution context in which a DGP synchronization-sensitive operation occurs. | |
| enum class | zxfoundation::dgp::gate::dispatch::detail::teardown_phase |
| Domain teardown phase used by lock-order documentation and checks. | |
| enum class | zxfoundation::dgp::gate::dispatch::teardown_phase |
| Domain teardown phase used by lock-order documentation and checks. | |
Functions | |
| auto | zxfoundation::dgp::gate::dispatch::detail::acquire_caller_domain () noexcept -> zxfoundation::dgp::domain::domain * |
| auto | zxfoundation::dgp::gate::dispatch::detail::dgp_rights_for (gate_auth_level auth) noexcept -> dgp::isolation::isolation_rights |
| auto | zxfoundation::dgp::gate::dispatch::dispatch (u32 packed_nr, u64 a0, u64 a1, u64 a2, u64 a3, u64 a4) noexcept -> u64 |
| Dispatch a nucleus call through the table. | |
| constexpr auto | zxfoundation::dgp::gate::dispatch::detail::has_all_rights (dgp::isolation::isolation_rights available, dgp::isolation::isolation_rights requested) noexcept -> bool |
| Test that all requested rights are present. | |
| auto | zxfoundation::dgp::gate::dispatch::is_registered (u32 packed_nr) noexcept -> bool |
| Return true if the given slot has a registered handler. | |
| auto | zxfoundation::dgp::gate::dispatch::detail::metadata_for_op (zxfoundation::dgp::operation_kind op_kind, u64 a0, u64 a1, u64 a2, u64 a3) noexcept -> zxfoundation::dgp::authorization_metadata |
| Extract operation-specific authorization metadata (VA range, gate id, requested-rights hint) from the syscall arguments. | |
| auto | zxfoundation::dgp::gate::dispatch::register_handler (u32 packed_nr, dispatch_handler handler, const entry_meta &meta) noexcept -> std::expected< void, lib::kernel_error > |
| Register a handler at a given packed call slot. | |
| auto | zxfoundation::dgp::gate::dispatch::register_namespace_handlers (call_namespace ns, const registration_op ops[], u32 count) noexcept -> std::expected< void, lib::kernel_error > |
| Bulk-register all handlers for a namespace. | |
| auto | zxfoundation::dgp::gate::dispatch::detail::target_domain_for_op (zxfoundation::dgp::operation_kind op_kind, zxfoundation::dgp::domain::domain &caller, u64 a0, u64 a1) noexcept -> zxfoundation::dgp::domain::domain * |
| Resolve the target domain for an op (the domain being acted upon, distinct from the caller). | |
| auto | zxfoundation::dgp::gate::dispatch::detail::validate_call (u32 packed_nr, u64 a0, u64 a1, u64 a2, u64 a3, const entry &ent, zxfoundation::dgp::domain::domain *caller) noexcept -> bool |
| Validate DGP contract + capability before dispatch. | |
| auto | zxfoundation::dgp::gate::dispatch::detail::validate_gate_entry (u32 caller_domain_id, zxfoundation::dgp::gate::gate_desc *gate, dgp::isolation::isolation_rights requested) noexcept -> bool |
| Full DGP gate validation — checks gate state, rights, and auth. | |
Variables | |
| static sync::qspinlock::qspinlock | zxfoundation::dgp::gate::dispatch::detail::s_lock {} |
| static entry | zxfoundation::dgp::gate::dispatch::detail::s_table [DISPATCH_TABLE_SIZE] {} |
Gate subsystem dispatch table implementation.
SPDX-License-Identifier: Apache-2.0
|
strong |
Unified lifecycle states for ALL typestate-tracked resources.
Every SCOMS-managed object, every folio, and every slab cache uses exactly these states. No subsystem may define its own.
|
nodiscardexportnoexcept |
Dispatch a nucleus call through the table.
| packed_nr | Table index. |
| a0-a4 | Arguments. |
|
nodiscardconstexprnoexcept |
Test that all requested rights are present.
| [in] | available | Available right mask. |
| [in] | requested | Required right mask. |
|
nodiscardexportnoexcept |
Register a handler at a given packed call slot.
| packed_nr | Table index: (namespace << 5) | operation. |
| handler | The handler function. |
| meta | Authorization metadata. |
|
nodiscardexportnoexcept |
Bulk-register all handlers for a namespace.
| ns | The namespace whose handlers to register. |
| ops | Array of (operation_id, handler, meta) tuples. |
| count | Number of entries in ops. |
|
nodiscardnoexcept |
Validate DGP contract + capability before dispatch.
|
nodiscardnoexcept |
Full DGP gate validation — checks gate state, rights, and auth.
| gate | Pointer to the gate_desc (must be non-null). |