#include <stdint.h>
Go to the source code of this file.
◆ PAGING_ACCESS_FROM_ALL
#define PAGING_ACCESS_FROM_ALL 0b00000100 |
◆ PAGING_CACHE_DISABLED
#define PAGING_CACHE_DISABLED 0b00010000 |
◆ PAGING_IS_PRESENT
#define PAGING_IS_PRESENT 0b00000001 |
◆ PAGING_IS_WRITEABLE
#define PAGING_IS_WRITEABLE 0b00000010 |
◆ PAGING_PAGE_SIZE
#define PAGING_PAGE_SIZE 4096 |
◆ PAGING_TOTAL_ENTRIES_PER_TABLE
#define PAGING_TOTAL_ENTRIES_PER_TABLE 1024 |
◆ PAGING_WRITE_THROUGH
#define PAGING_WRITE_THROUGH 0b00001000 |
◆ paging_align_address()
void * paging_align_address |
( |
void * |
ptr | ) |
|
Aligns pointer to page size.
- Parameters
-
- Returns
- void*
References PAGING_PAGE_SIZE.
◆ paging_align_address_to_lower_page()
void * paging_align_address_to_lower_page |
( |
void * |
ptr | ) |
|
◆ paging_enable()
◆ paging_free_directory()
◆ paging_get_directory()
uint32_t * paging_get_directory |
( |
struct paging_chunk * |
chunk | ) |
|
◆ paging_get_page()
uint32_t paging_get_page |
( |
uint32_t * |
directory, |
|
|
void * |
virtual_address |
|
) |
| |
◆ paging_map_to()
int paging_map_to |
( |
struct paging_chunk * |
chunk, |
|
|
void * |
virtual_address, |
|
|
void * |
physical_address, |
|
|
void * |
physical_end, |
|
|
int |
flags |
|
) |
| |
Maps virtual address to physical in page directory.
- Parameters
-
chunk | Paging chunk |
physical_address | Physical address start |
physical_end | Physical address end |
flags | Page directory entry flags |
- Returns
- int Error code
References EINVARG, flags, paging_map_range(), and PAGING_PAGE_SIZE.
◆ paging_new_directory()
◆ paging_set_page()
int paging_set_page |
( |
uint32_t * |
directory, |
|
|
void * |
virtual_address, |
|
|
uint32_t |
value |
|
) |
| |
Sets page table entry.
- Parameters
-
directory | Page directory pointer |
virtual_address | Virtual address |
value | Value for page table entry |
- Returns
- int Status
References EINVARG.
◆ paging_switch()