aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/memory
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/memory')
-rw-r--r--src/kernel/memory/paging.c6
-rw-r--r--src/kernel/memory/paging.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/kernel/memory/paging.c b/src/kernel/memory/paging.c
index ad19091..861cdcb 100644
--- a/src/kernel/memory/paging.c
+++ b/src/kernel/memory/paging.c
@@ -20,7 +20,7 @@ extern void copy_page_physical();
#define INDEX_FROM_BIT(a) (a/(8*4))
#define OFFSET_FROM_BIT(a) (a%(8*4))
-static void paging_set_frame(uint32_t frame_addr)
+void paging_set_frame(uint32_t frame_addr)
{
uint32_t frame = frame_addr / 0x1000;
uint32_t idx = INDEX_FROM_BIT(frame);
@@ -28,7 +28,7 @@ static void paging_set_frame(uint32_t frame_addr)
frames[idx] |= (0x1 << off);
}
-static void paging_clear_frame(uint32_t frame_addr)
+void paging_clear_frame(uint32_t frame_addr)
{
uint32_t frame = frame_addr / 0x1000;
uint32_t idx = INDEX_FROM_BIT(frame);
@@ -36,7 +36,7 @@ static void paging_clear_frame(uint32_t frame_addr)
frames[idx] &= ~(0x1 << off);
}
-static uint32_t paging_first_frame()
+uint32_t paging_first_frame()
{
uint32_t i, j;
for (i = 0; i < INDEX_FROM_BIT(nframes); i++) {
diff --git a/src/kernel/memory/paging.h b/src/kernel/memory/paging.h
index bb6ee4f..77258b7 100644
--- a/src/kernel/memory/paging.h
+++ b/src/kernel/memory/paging.h
@@ -26,6 +26,8 @@ typedef struct page_directory {
int paging_enabled;
+void paging_set_frame(uint32_t frame_addr);
+
void paging_alloc_frame(page_t *page, int is_kernel, int is_writeable);
void paging_free_frame(page_t *page);