Cleaning code

This commit is contained in:
Loic Guegan 2021-04-13 18:09:43 +02:00
parent 5a9a57177f
commit e1e75aa387
9 changed files with 66 additions and 25 deletions

View file

@ -3,19 +3,24 @@
#define PAGING_CR0_BIT 0x80000000
#define PAGING_PAGE_SIZE 4096
#define PAGING_MAX_PAGES 2048
#define PAGING_MAX_PAGES 2048 // At least 1024 for the kernel
#if PAGING_MAX_PAGES%1024>0
#define PAGING_MAX_DIR_ENTRY PAGING_MAX_PAGES/1024+1
#else
#define PAGING_MAX_DIR_ENTRY PAGING_MAX_PAGES/1024
#endif
/*
/**
* Configure and enable paging
*/
void paging_enable();
/**
* Allocate a new page and return its address
*/
char* paging_allocate_next_page();
/**
* Set usage status of a page
*/
void paging_set_usage(int addr,char state);
/**
* Create a new page directory containing
@ -23,4 +28,8 @@ void paging_set_usage(int addr,char state);
*/
char *paging_allocate(int p);
void paging_dump(int min,int max);
/**
* Handler of page fault
*/
void paging_page_fault();
#endif