mirror of
https://github.com/limine-bootloader/limine
synced 2024-11-25 01:49:52 +03:00
mm/vmm: Fix paging_mode_va_bits() for aarch64 4 level paging and loongarch64
This commit is contained in:
parent
d40cec11f6
commit
5294b2a4e5
@ -58,7 +58,7 @@ void map_page(pagemap_t pagemap, uint64_t virt_addr, uint64_t phys_addr, uint64_
|
||||
#define PAGING_MODE_MIN PAGING_MODE_AARCH64_4LVL
|
||||
#define PAGING_MODE_MAX PAGING_MODE_AARCH64_5LVL
|
||||
|
||||
#define paging_mode_va_bits(mode) ((mode) ? 53 : 48)
|
||||
#define paging_mode_va_bits(mode) ((mode) ? 53 : 49)
|
||||
|
||||
static inline uint64_t paging_mode_higher_half(int paging_mode) {
|
||||
if (paging_mode == PAGING_MODE_AARCH64_5LVL) {
|
||||
|
@ -785,7 +785,7 @@ FEAT_END
|
||||
|
||||
uint64_t pa = aa64mmfr0 & 0xF;
|
||||
|
||||
uint64_t tsz = 64 - paging_mode_va_bits(paging_mode);
|
||||
uint64_t tsz = 64 - (paging_mode_va_bits(paging_mode) - 1);
|
||||
#endif
|
||||
|
||||
struct limine_file *kf = ext_mem_alloc(sizeof(struct limine_file));
|
||||
|
Loading…
Reference in New Issue
Block a user