forked from lolo859/vystem
Vystem 0.2
This commit is contained in:
26
shelter/lib/include/memory/memory.h
Normal file
26
shelter/lib/include/memory/memory.h
Normal file
@@ -0,0 +1,26 @@
|
||||
// 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
|
||||
Reference in New Issue
Block a user