ZXFoundation™ 26h2
Loading...
Searching...
No Matches
zxfoundation.memory.pmm.core Module Reference

Data Structures

class  zxfoundation::memory::pmm::transaction
 Atomic multi-folio allocation transaction. More...

Typedefs

using zxfoundation::memory::pmm::allocation_retry_fn = auto (*)(u8 node, u32 target_pages) noexcept -> u32
 Callback invoked once after a sleepable allocation exhausts all eligible node zones.

Functions

auto zxfoundation::memory::pmm::alloc (const allocation_request &request) noexcept -> std::expected< allocation_result, lib::kernel_error >
 Allocate a single folio.
auto zxfoundation::memory::pmm::alloc (u32 order, zone z, purpose p, page_init init) noexcept -> std::expected< folio_embryo, lib::kernel_error >
 Allocate a single folio.
auto alloc (u32 order, zone z, purpose p=purpose::generic, page_init init=page_init::uninitialized) noexcept -> std::expected< folio_embryo, lib::kernel_error >
 Allocate one folio within this transaction.
auto count () const noexcept -> u32
auto zxfoundation::memory::pmm::desc_of_checked (u64 phys) noexcept -> std::expected< frame_desc *, lib::kernel_error >
 Fail-closed frame-descriptor accessor.
auto zxfoundation::memory::pmm::frame_clear_mapping_metadata (u64 phys) noexcept -> std::expected< void, lib::kernel_error >
 Clear the authority identity stamped on one physical frame.
auto zxfoundation::memory::pmm::frame_desc_of (u64 phys) noexcept -> frame_desc *
 Return a pointer to the frame_desc for a physical address.
auto zxfoundation::memory::pmm::frame_node_of (u64 phys) noexcept -> std::expected< u8, lib::kernel_error >
 Return the NUMA node id recorded for a frame.
auto zxfoundation::memory::pmm::frame_object_generation_of (u64 phys) noexcept -> std::expected< u32, lib::kernel_error >
 Resolve the SCOMS generation paired with a frame authority id.
auto zxfoundation::memory::pmm::frame_object_id_of (u64 phys) noexcept -> std::expected< u32, lib::kernel_error >
 Resolve the SCOMS memory_object_id that authorizes a frame.
auto zxfoundation::memory::pmm::frame_ref (u64 phys) noexcept -> std::expected< u16, lib::kernel_error >
 Atomically increment a frame's refcount.
auto zxfoundation::memory::pmm::frame_refcount (u64 phys) noexcept -> std::expected< u16, lib::kernel_error >
 Return the current atomic reference count of a frame.
auto zxfoundation::memory::pmm::frame_release_pin (u64 phys) noexcept -> std::expected< bool, lib::kernel_error >
 Release one order-zero mapping pin and return the frame.
auto zxfoundation::memory::pmm::frame_set_mapping_metadata (u64 phys, u32 object_id, u32 object_generation, bool writable) noexcept -> std::expected< void, lib::kernel_error >
 Stamp the SCOMS memory_object id that authorizes this frame.
auto zxfoundation::memory::pmm::frame_unref (u64 phys) noexcept -> std::expected< u16, lib::kernel_error >
 Atomically decrement a frame's refcount.
auto zxfoundation::memory::pmm::frame_validate_mapping (u64 phys_start, u64 length, u32 object_id, u32 object_generation) noexcept -> std::expected< void, lib::kernel_error >
 Validate that a physical range is owned by one SCOMS object.
auto zxfoundation::memory::pmm::free (folio_active f) noexcept -> void
 Return a folio to the allocator.
auto zxfoundation::memory::pmm::free_page_count () noexcept -> u64
 Advisory free page count (sum across all zones).
auto zxfoundation::memory::pmm::init (const arch::s390x::init::zxfl::protocol &proto) noexcept -> void
 Initialize the PMM from the ZXFL boot protocol.
auto zxfoundation::memory::pmm::install_allocation_retry (allocation_retry_fn callback) noexcept -> std::expected< void, lib::kernel_error >
 Install the allocation-pressure reclaim callback.
auto zxfoundation::memory::pmm::max_pfn () noexcept -> u64
auto operator= (const transaction &)=delete
auto phys (u32 i) const noexcept -> u64
 Retrieve the physical address of slot i (valid after commit).
auto zxfoundation::memory::pmm::reserve (u64 phys, u32 order) noexcept -> void
 Mark a physical range as permanently reserved (runtime call).
auto zxfoundation::memory::pmm::total_page_count () noexcept -> u64
 Total managed page count (sum across all zones).
 transaction (const transaction &)=delete

Variables

u8 node_id {numa::NUMA_NODE_BOOT}
u32 order {0}
purpose p {purpose::generic}
u64 phys {0}
constexpr u32 zxfoundation::memory::pmm::TXN_MAX = 16
zone z {zone::normal}

Files

file  zxfoundation/memory/pmm.zcomponent/core.cxxm
 Physical Memory Manager — core interface.
file  zxfoundation/memory/pmm.zcomponent/core.cxx
 Physical Memory Manager.