diff --git a/common/mm/pmm.s2.c b/common/mm/pmm.s2.c index 94a6a3dc..5c7d2164 100644 --- a/common/mm/pmm.s2.c +++ b/common/mm/pmm.s2.c @@ -558,6 +558,10 @@ void *ext_mem_alloc_type_aligned(size_t count, uint32_t type, size_t alignment) // Allocate memory top down. void *ext_mem_alloc_type_aligned_mode(size_t count, uint32_t type, size_t alignment, bool allow_high_allocs) { +#if !defined (__x86_64__) && !defined (__i386__) + (void)allow_high_allocs; +#endif + count = ALIGN_UP(count, alignment); if (allocations_disallowed) @@ -572,9 +576,7 @@ void *ext_mem_alloc_type_aligned_mode(size_t count, uint32_t type, size_t alignm #if defined(__x86_64__) || defined(__i386__) // Let's make sure the entry is not > 4GiB - if (entry_top >= 0x100000000 - && !allow_high_allocs - ) { + if (entry_top >= 0x100000000 && !allow_high_allocs) { entry_top = 0x100000000; if (entry_base >= entry_top) continue; diff --git a/common/protos/limine_asm.asm_ia32 b/common/protos/limine_asm.asm_ia32 index 47997250..f0d1b565 100644 --- a/common/protos/limine_asm.asm_ia32 +++ b/common/protos/limine_asm.asm_ia32 @@ -13,7 +13,8 @@ local_gdt: local_gdt_ptr: dw local_gdt.top - local_gdt - 1 - dq local_gdt + dd local_gdt + dd 0 old_gdt_ptr: dw 0