aboutsummaryrefslogtreecommitdiff
path: root/src/core/paging.h
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2021-04-13 15:31:45 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2021-04-13 15:31:45 +0200
commit5a9a57177f730d1c00ab2b47f91e5ea2660a4f77 (patch)
tree8d98016687cba592133ca8c57934f60e06f94bbf /src/core/paging.h
parent457a2117706cdaee34f894e67c89da7bf29f6143 (diff)
Enable .bss zeroing and improve paging
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