feat: start adding physical memory allocator

This commit is contained in:
Katharina 2026-06-28 16:19:21 +02:00
parent 8dc53f662e
commit e2ea22ad53
15 changed files with 440 additions and 38 deletions

View file

@ -7,13 +7,12 @@ constexpr uint64_t high_base = 0xFFFF800000000000;
#define read_symbol(symbol) [](){uint64_t res; asm volatile("movabsq $" symbol ", %0": "=r"(res)); return res;}()
struct paddr_t {
uint64_t address;
template<typename T>
T* access() {
return reinterpret_cast<T*>(address+high_base);
}
uint64_t address;
template<typename T>
T* access() {
return reinterpret_cast<T*>(address+high_base);
}
};
inline void* operator new(size_t, void* p) {