Files
vystem/shelter/lib/include/memory/memory.h
2026-05-27 19:34:54 +02:00

27 lines
1.0 KiB
C

// SPDX-License-Identifier: MPL-2.0
#ifndef SH_LIB_MEMORY_H
#define SH_LIB_MEMORY_H
#include "std/type.h"
#include "std/status.h"
#include "kernel/conf.h"
#include "memory/page.h"
#include "memory/slab.h"
#include "memory/heap.h"
// Memory subsystem services structure
typedef struct {
sh_page_PAGE_TABLE_POOL kernel_ptp;
sh_slab_reg_phys_SLAB_ALLOCATOR slab_reg_phys;
sh_slab_reg_virt_SLAB_ALLOCATOR slab_reg_virt;
struct sh_slab_radix_node_SLAB_ALLOCATOR slab_radix_node;
sh_pez_PHYSICAL_PLANE physical_plane;
sh_pez_VIRTUAL_PLANE virtual_plane_kernel_heap;
sh_heap_KERNEL_HEAP kernel_heap;
} sh_memory_MEMORY_SERVICES;
// Initialize memory subsystem
SH_STATUS sh_memory_init_subsystem(sh_conf_BOOT_CONFIG *boot_config,sh_memory_MEMORY_SERVICES *services);
// Identity map a physical memory area
SH_STATUS sh_memory_identity_map(sh_page_PHYSICAL_ADDRESS phys_start,sh_uint64 page_count,sh_uint64 flags);
// Parse a memory DevS query
SH_STATUS sh_memory_devs_query(char *sub_path,sh_devs_RESULT *result);
#endif