feat: add page table
This commit is contained in:
parent
61dfda6a70
commit
ada1859910
8 changed files with 435 additions and 13 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include "util/number.h"
|
||||
|
||||
constexpr uint64_t high_base = 0xFFFF800000000000;
|
||||
constexpr uint64_t uncached_base = high_base + (uint64_t{1} << 38);
|
||||
|
||||
#define read_symbol(symbol) \
|
||||
[]() { \
|
||||
|
|
@ -18,6 +19,11 @@ struct paddr_t {
|
|||
T* access() {
|
||||
return reinterpret_cast<T*>(address + high_base);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T* access_uc() {
|
||||
return reinterpret_cast<T*>(address + uncached_base);
|
||||
}
|
||||
};
|
||||
|
||||
inline void* operator new(size_t, void* p) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue