aboutsummaryrefslogtreecommitdiff
path: root/src/core/paging.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/paging.h')
-rw-r--r--src/core/paging.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/core/paging.h b/src/core/paging.h
index 1e8f4e3..ad3671e 100644
--- a/src/core/paging.h
+++ b/src/core/paging.h
@@ -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 \ No newline at end of file