XenevaOS
Loading...
Searching...
No Matches
XenevaOS
BootAA64
paging.h
Go to the documentation of this file.
1
30
#ifndef __PAGING_H__
31
#define __PAGING_H__
32
33
#include <stdint.h>
34
35
/* memory attributes*/
36
#define PAGE_TABLE_ENTRY_PRESENT (1UL << 0)
37
#define PAGE_TABLE_ENTRY_BLOCK (0UL << 1)
38
#define PAGE_TABLE_ENTRY_PAGE (1UL << 1)
39
#define PAGE_TABLE_ENTRY_AF (1UL << 10)
40
#define PAGE_TABLE_ENTRY_SH (3UL << 8)
41
#define PAGE_TABLE_ENTRY_SH_NONE (0UL << 8)
42
#define PAGE_TABLE_ENTRY_AP_RW (0UL << 6)
43
#define PAGE_TABLE_ENTRY_MEMATTR (1UL << 2)
44
#define PAGE_TABLE_ENTRY_PXN (1UL << 53)
45
#define PAGE_TABLE_ENTRY_UXN (1UL << 54)
46
#define PAGE_TABLE_ENTRY_DEVICE (0ULL << 2)
47
48
#define PAGE_FLAGS (PAGE_TABLE_ENTRY_PRESENT | PAGE_TABLE_ENTRY_PAGE | PAGE_TABLE_ENTRY_AF | \
49
PAGE_TABLE_ENTRY_SH | PAGE_TABLE_ENTRY_AP_RW | PAGE_TABLE_ENTRY_MEMATTR);
50
51
/*
52
* XEPagingInitialize -- initialize paging
53
*/
54
extern
void
XEPagingInitialize
();
55
56
/*
57
* XEPagingMap -- maps a physical address to virtual address
58
* @param virtualAddr -- virtual address
59
* @param physAddr -- physical address
60
*/
61
extern
void
XEPagingMap
(
uint64_t
virtualAddr,
uint64_t
physAddr);
62
63
64
extern
void
XEPagingCopy
();
65
#endif
XEPagingInitialize
void XEPagingInitialize()
Definition
paging.cpp:80
XEPagingCopy
void XEPagingCopy()
Definition
paging.cpp:147
XEPagingMap
bool XEPagingMap(void *vaddr, paddr_t paddr, size_t length, size_t attributes)
Definition
paging.cpp:381
uint64_t
COMPILER_DEPENDENT_UINT64 uint64_t
Definition
acefiex.h:165
Generated by
1.9.8