Updated virtual memory manager
Added page flags Added function current_address_space() Fixed create_address_space() Renamed some fields in page_table_entry_t to fit naming scheme
This commit is contained in:
@@ -3,6 +3,15 @@
|
||||
#include "pageallocator.h"
|
||||
#include "types/physaddr.h"
|
||||
|
||||
enum page_flag_t
|
||||
{
|
||||
PAGE_RW = 1,
|
||||
PAGE_EXECUTABLE = 1 << 1,
|
||||
PAGE_USERMODE = 1 << 2
|
||||
};
|
||||
|
||||
extern const size_t page_size;
|
||||
|
||||
/**
|
||||
* @brief Create a new top-level page table and map the kernel in it.
|
||||
*
|
||||
@@ -19,6 +28,15 @@ physaddr_t create_address_space(struct page_stack_t *page_stack);
|
||||
*/
|
||||
void load_address_space(physaddr_t table);
|
||||
|
||||
/**
|
||||
* @brief Returns the physical address of the top-level page table currently in
|
||||
* use.
|
||||
*
|
||||
* @param table
|
||||
* @return physaddr_t
|
||||
*/
|
||||
physaddr_t current_address_space();
|
||||
|
||||
/**
|
||||
* @brief Maps a single page with the specified flags.
|
||||
*
|
||||
@@ -36,4 +54,4 @@ int map_page(struct page_stack_t *page_stack, void *page, physaddr_t frame, int
|
||||
* @param page
|
||||
* @return physaddr_t
|
||||
*/
|
||||
physaddr_t unmap_page(void *page);
|
||||
physaddr_t unmap_page(void *page);
|
||||
|
||||
Reference in New Issue
Block a user