luxos/SysCore/memory/mmngr_vi.h
2021-09-14 18:35:52 +03:00

26 lines
571 B
C

#ifndef __MEMORY_MANAGER_VIRTUAL__
#define __MEMORY_MANAGER_VIRTUAL__
#include "lib/pde.h"
#include "lib/pte.h"
#define PAGES_PER_TABLE 1024
#define PAGES_PER_DIR 1024
typedef unsigned virtual_address;
typedef struct {
pt_entry m_entries[PAGES_PER_TABLE];
} ptable ;
typedef struct {
pd_entry m_entries[PAGES_PER_DIR];
} pdirectory ;
//extern pdirectory* _current_directory;
extern void vmmngr_flush_tbl_entry (unsigned addr);
extern unsigned char vmmngr_initialize();
extern unsigned char vmmngr_map_page(unsigned phys, unsigned virt);
#endif