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

Portal lifecycle. More...

import std;
import lib.error;
import zxfoundation.base.types;
import zxfoundation.memory.vm.types;
import zxfoundation.dgp.portal.types;
Include dependency graph for core.cxxm:

Functions

auto zxfoundation::dgp::portal::destroy_for_domain (u32 domain_id) noexcept -> void
 Destroy all portals involving a specific domain.
auto zxfoundation::dgp::portal::init () noexcept -> void
 Initialize the portal subsystem.
auto zxfoundation::dgp::portal::portal_count () noexcept -> u32
 Return the number of currently active portals in the system.
auto zxfoundation::dgp::portal::portal_create (u32 source_domain_id, u32 target_domain_id, u64 va_start, u64 va_end, portal_prot prot, u8 ar_num, zxfoundation::memory::vm::vm_region *backing) noexcept -> std::expected< u32, lib::kernel_error >
 Create a new portal from source_domain_id to target_domain_id.
auto zxfoundation::dgp::portal::portal_destroy (u32 id) noexcept -> std::expected< void, lib::kernel_error >
 Destroy the portal identified by id.
auto zxfoundation::dgp::portal::portal_find (u32 id) noexcept -> portal_desc *
auto zxfoundation::dgp::portal::register_portal_cap_lookup () noexcept -> void

Detailed Description

Portal lifecycle.

SPDX-License-Identifier: Apache-2.0

Function Documentation

◆ destroy_for_domain()

auto zxfoundation::dgp::portal::destroy_for_domain ( u32 domain_id) ->void
exportnoexcept

Destroy all portals involving a specific domain.

Parameters
domain_idThe domain whose portals should be destroyed.

◆ portal_create()

auto zxfoundation::dgp::portal::portal_create ( u32 source_domain_id,
u32 target_domain_id,
u64 va_start,
u64 va_end,
portal_prot prot,
u8 ar_num,
zxfoundation::memory::vm::vm_region * backing )->std::expected< u32, lib::kernel_error >
nodiscardexportnoexcept

Create a new portal from source_domain_id to target_domain_id.

Parameters
source_domain_idDomain that will hold the portal (owns the AR).
target_domain_idDomain whose address space is accessed.
va_startStart of the accessible VA range in the target.
va_endEnd (exclusive) of the accessible VA range.
protAccess protection (read, write, rw).
ar_numAccess register number (0-15) in the source domain.
Returns
The portal slot ID of the newly created portal, or a kernel_error.

◆ portal_destroy()

auto zxfoundation::dgp::portal::portal_destroy ( u32 id) ->std::expected< void, lib::kernel_error >
nodiscardexportnoexcept

Destroy the portal identified by id.

Parameters
idPortal slot ID returned by portal_create().
Returns
Nothing on success, or a kernel_error.