fix: GET_PTE uses the right value

This commit is contained in:
0x35c
2025-11-28 17:39:10 +01:00
parent 3df6011d7a
commit 2308ef509c

View File

@ -29,7 +29,7 @@
#define PDE_MULTIBOOT 1020 #define PDE_MULTIBOOT 1020
#define GET_PTE(pd_index, pt_index) \ #define GET_PTE(pd_index, pt_index) \
((uint32_t *)(VIRT_PT_BASE + pd_index * 1024 + pt_index)) ((uint32_t *)(VIRT_PT_BASE + pd_index * 4096 + pt_index))
#define PTE2VA(pd_index, pt_index) \ #define PTE2VA(pd_index, pt_index) \
((uint32_t *)((((uint32_t)pd_index * 1024) + (uint32_t)pt_index) * \ ((uint32_t *)((((uint32_t)pd_index * 1024) + (uint32_t)pt_index) * \