2021-09-14 15:35:13 +00:00
|
|
|
#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);
|
2021-09-14 15:35:52 +00:00
|
|
|
extern unsigned char vmmngr_initialize();
|
|
|
|
extern unsigned char vmmngr_map_page(unsigned phys, unsigned virt);
|
2021-09-14 15:35:13 +00:00
|
|
|
|
|
|
|
#endif
|