pmm: Ignore allow_high_allocs on non x86-64 architectures
diff --git a/common/mm/pmm.s2.c b/common/mm/pmm.s2.c
index 41267094..a5dbd514 100644
--- a/common/mm/pmm.s2.c
+++ b/common/mm/pmm.s2.c
@@ -573,7 +573,7 @@ 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 (__aarch64__) && !defined (__riscv64)
+#if !defined (__x86_64__)
(void)allow_high_allocs;
#endif
@@ -589,9 +589,10 @@ void *ext_mem_alloc_type_aligned_mode(size_t count, uint32_t type, size_t alignm
int64_t entry_base = (int64_t)(memmap[i].base);
int64_t entry_top = (int64_t)(memmap[i].base + memmap[i].length);
+#if defined(__x86_64__) || defined(__i386__)
// Let's make sure the entry is not > 4GiB
if (entry_top >= 0x100000000
-#if defined (__x86_64__) || defined (__aarch64__) || defined (__riscv64)
+#if defined (__x86_64__)
&& !allow_high_allocs
#endif
) {
@@ -599,6 +600,7 @@ void *ext_mem_alloc_type_aligned_mode(size_t count, uint32_t type, size_t alignm
if (entry_base >= entry_top)
continue;
}
+#endif
int64_t alloc_base = ALIGN_DOWN(entry_top - (int64_t)count, alignment);
