Enable .bss zeroing and improve paging
This commit is contained in:
parent
457a211770
commit
5a9a57177f
7 changed files with 135 additions and 19 deletions
|
@ -2,12 +2,25 @@
|
|||
#define PAGING_H
|
||||
|
||||
#define PAGING_CR0_BIT 0x80000000
|
||||
#define PAGING_DIR_LOCATION 0x1000
|
||||
#define PAGING_TABLE_LOCATION 0x5000
|
||||
#define PAGING_PAGE_SIZE 4096
|
||||
#define PAGING_MAX_PAGES 2048
|
||||
#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();
|
||||
|
||||
char* paging_allocate_next_page();
|
||||
void paging_set_usage(int addr,char state);
|
||||
/**
|
||||
* Create a new page directory containing
|
||||
* p pages.
|
||||
*/
|
||||
char *paging_allocate(int p);
|
||||
void paging_dump(int min,int max);
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue