HDDM -> HHDM Typo fix

This commit is contained in:
2024-03-23 10:18:17 +01:00
parent d039745d5f
commit 91524beaad
3 changed files with 11 additions and 11 deletions

View File

@@ -47,7 +47,7 @@ extern "C" void _start(void) {
limine_kern_save_response();
limine_modules_save();
barrier();
map_hddm(get_cr3());
map_hhdm(get_cr3());
barrier();
new (BOOT_AddressSpace_storage) AddressSpace((uint64_t *) HHDM_P2V(get_cr3()));
BOOT_AddressSpace = reinterpret_cast<AddressSpace *>(BOOT_AddressSpace_storage);
@@ -60,7 +60,7 @@ extern "C" void _start(void) {
uint64_t *KERN_AddressSpace_PML4 = static_cast<uint64_t *>(get4k());
for (int i = 0; i < 512; i++)
KERN_AddressSpace_PML4[i] = 0x02;
map_hddm((uint64_t *) HHDM_V2P(KERN_AddressSpace_PML4));
map_hhdm((uint64_t *) HHDM_V2P(KERN_AddressSpace_PML4));
new (KERN_AddressSpace_storage) AddressSpace(KERN_AddressSpace_PML4);
KERN_AddressSpace = reinterpret_cast<AddressSpace *>(KERN_AddressSpace_storage);

View File

@@ -44,8 +44,8 @@ void *AddressSpace::virt2real(void *virt) {
assert2(((uint64_t) virt & 0xFFF) == 0, "Trying to unmap non-aligned memory!");
// Assuming everything related to paging is HHDM
assert2((uint64_t) PML4 >= HHDM_BEGIN, "CR3 here must be in HDDM!");
assert2((uint64_t) PML4 < kernel_virt_base, "CR3 here must be in HDDM!");
assert2((uint64_t) PML4 >= HHDM_BEGIN, "CR3 here must be in HHDM!");
assert2((uint64_t) PML4 < kernel_virt_base, "CR3 here must be in HHDM!");
uint64_t pml4i = (uint64_t) virt >> 39 & 0x01FF;
uint64_t pdpei = (uint64_t) virt >> 30 & 0x01FF;
@@ -79,8 +79,8 @@ int AddressSpace::map(void *virt, void *real, uint32_t flags) {
assert2(((uint64_t) real & 0xFFF) == 0, "Trying to map to non-aligned memory!");
// Assuming everything related to paging is HHDM
assert2((uint64_t) PML4 >= HHDM_BEGIN, "CR3 here must be in HDDM!");
assert2((uint64_t) PML4 < kernel_virt_base, "CR3 here must be in HDDM!");
assert2((uint64_t) PML4 >= HHDM_BEGIN, "CR3 here must be in HHDM!");
assert2((uint64_t) PML4 < kernel_virt_base, "CR3 here must be in HHDM!");
uint64_t pml4i = (uint64_t) virt >> 39 & 0x01FF;
uint64_t pdpei = (uint64_t) virt >> 30 & 0x01FF;
@@ -133,8 +133,8 @@ int AddressSpace::unmap(void *virt) {
assert2(((uint64_t) virt & 0xFFF) == 0, "Trying to map non-aligned memory!");
// Assuming everything related to paging is HHDM
assert2((uint64_t) PML4 >= HHDM_BEGIN, "CR3 here must be in HDDM!");
assert2((uint64_t) PML4 < kernel_virt_base, "CR3 here must be in HDDM!");
assert2((uint64_t) PML4 >= HHDM_BEGIN, "CR3 here must be in HHDM!");
assert2((uint64_t) PML4 < kernel_virt_base, "CR3 here must be in HHDM!");
uint64_t pml4i = (uint64_t) virt >> 39 & 0x01FF;
uint64_t pdpei = (uint64_t) virt >> 30 & 0x01FF;
@@ -191,7 +191,7 @@ uint64_t *get_early_frame() {
return newp;
}
void map_hddm(uint64_t *pml4) {
void map_hhdm(uint64_t *pml4) {
assert2(kernel_virt_base != 0, "Kernel virt address not loaded!");
assert2(kernel_phys_base != 0, "Kernel phys address not loaded!");

View File

@@ -43,7 +43,7 @@ public:
FDT *getFdt();
private:
// Pointer to PML4 in HDDM
// Pointer to PML4 in HHDM
uint64_t *PML4;
FDT *_fdt = nullptr;
@@ -60,7 +60,7 @@ void limine_kern_save_response();
#define PAGE_USER (1 << 2)
#define PAGE_PRESENT (0x01ULL)
void map_hddm(uint64_t *pml4);
void map_hhdm(uint64_t *pml4);
extern "C" void _tlb_flush();