From 0bc8d39e5c12e8fefa43962d8a741061cd78c649 Mon Sep 17 00:00:00 2001
From: Xue Liu <liuxue@loongson.cn>
Date: Tue, 28 May 2024 16:49:06 +0800
Subject: [PATCH] Fix that patch 28dcf48482 introduced old code

---
 grub-core/kern/efi/mm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
index 31bffb534414..afad55e98880 100644
--- a/grub-core/kern/efi/mm.c
+++ b/grub-core/kern/efi/mm.c
@@ -501,7 +501,7 @@ filter_memory_map (grub_efi_memory_descriptor_t *memory_map,
 #ifdef GRUB_CPU_LOONGARCH64
           && desc->physical_start <= grub_efi_max_usable_address()
 #else
-	  && desc->physical_start <= GRUB_EFI_MAX_USABLE_ADDRESS
+	  && desc->physical_start <= GRUB_EFI_MAX_ALLOCATION_ADDRESS
 #endif
 	  && desc->physical_start + PAGES_TO_BYTES (desc->num_pages) > 0x100000
 	  && desc->num_pages != 0)
-- 
2.43.0

