Kintsugi OS 0.5.0
x86 Monolithic OS
Loading...
Searching...
No Matches
memory.h File Reference
#include "../kklibc/ctypes.h"

Go to the source code of this file.

Classes

struct  memory_stats_t
 

Macros

#define PAGE_SIZE   4096u
 
#define PMM_LIMIT   0x10000000u
 
#define VMM_WRITE   2u
 
#define USER_BASE   0x40000000u
 
#define USER_TOP   0x80000000u
 

Functions

u32 vmm_space_create (void)
 
void vmm_space_destroy (u32 space)
 
void vmm_space_switch (u32 space)
 
int vmm_user_page (u32 space, u32 address, int writable)
 
u32 vmm_user_physical (u32 space, u32 address, int write)
 
struct __attribute__ ((packed))
 
void memory_init (void)
 
u32 pmm_alloc_page (void)
 
int pmm_free_page (u32 address)
 
int vmm_map_page (u32 virtual_address, u32 physical_address, u32 flags)
 
int vmm_unmap_page (u32 virtual_address)
 
u32 vmm_translate (u32 address)
 
memory_stats_t memory_stats (void)
 
void memory_print_info (void)
 
void memory_print_map (void)
 

Variables

 memory_region_t
 

Macro Definition Documentation

◆ PAGE_SIZE

#define PAGE_SIZE   4096u

◆ PMM_LIMIT

#define PMM_LIMIT   0x10000000u

◆ USER_BASE

#define USER_BASE   0x40000000u

◆ USER_TOP

#define USER_TOP   0x80000000u

◆ VMM_WRITE

#define VMM_WRITE   2u

Function Documentation

◆ __attribute__()

struct __attribute__ ( (packed)  )

◆ memory_init()

void memory_init ( void  )

◆ memory_print_info()

void memory_print_info ( void  )

◆ memory_print_map()

void memory_print_map ( void  )

◆ memory_stats()

memory_stats_t memory_stats ( void  )

◆ pmm_alloc_page()

u32 pmm_alloc_page ( void  )

◆ pmm_free_page()

int pmm_free_page ( u32  address)

◆ vmm_map_page()

int vmm_map_page ( u32  virtual_address,
u32  physical_address,
u32  flags 
)

◆ vmm_space_create()

u32 vmm_space_create ( void  )

◆ vmm_space_destroy()

void vmm_space_destroy ( u32  space)

◆ vmm_space_switch()

void vmm_space_switch ( u32  space)

◆ vmm_translate()

u32 vmm_translate ( u32  address)

◆ vmm_unmap_page()

int vmm_unmap_page ( u32  virtual_address)

◆ vmm_user_page()

int vmm_user_page ( u32  space,
u32  address,
int  writable 
)

◆ vmm_user_physical()

u32 vmm_user_physical ( u32  space,
u32  address,
int  write 
)

Variable Documentation

◆ memory_region_t

memory_region_t