mm: put all code into separate files
This commit is contained in:
+26
-4
@@ -1,11 +1,33 @@
|
||||
#ifndef PAGING_H
|
||||
#define PAGING_H
|
||||
|
||||
#include "../include/stdio.h"
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
extern uint32_t kernel_page_directory[1024] __attribute__((aligned(4096)));
|
||||
extern uint32_t kernel_page_table[1024] __attribute__((aligned(4096)));
|
||||
|
||||
|
||||
//paging.c
|
||||
void enablePaging();
|
||||
void loadPageDirectory(uint32_t* page_directory);
|
||||
void paging_init();
|
||||
void test_paging();
|
||||
|
||||
//page_alloc.c
|
||||
void init_allocator();
|
||||
void* alloc_page();
|
||||
void free_page(void* physaddr);
|
||||
|
||||
//page_tables.c
|
||||
void *get_physaddr(void *virtualaddr);
|
||||
void map_page(void* physaddr, void* virtualaddr, unsigned int flags);
|
||||
void map_kernel_page(void* virtualaddr, unsigned int flags);
|
||||
|
||||
//heap.c
|
||||
void heap_init();
|
||||
void* heap_alloc(uint32_t size);
|
||||
void heap_free(void *ptr);
|
||||
void test_paging();
|
||||
void init_allocator();
|
||||
#endif
|
||||
void heap_free(void* ptr);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user