diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c index d5bd74d35..4303509f2 100644 --- a/grub-core/kern/ieee1275/init.c +++ b/grub-core/kern/ieee1275/init.c @@ -166,7 +166,7 @@ heap_init (grub_uint64_t addr, grub_uint64_t len, grub_memory_type_t type, { unsigned long *total = data; - if (type != 1) + if (type != GRUB_MEMORY_AVAILABLE) return 0; if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_NO_PRE1_5M_CLAIM)) diff --git a/grub-core/loader/sparc64/ieee1275/linux.c b/grub-core/loader/sparc64/ieee1275/linux.c index 63d6a1f33..346d9538e 100644 --- a/grub-core/loader/sparc64/ieee1275/linux.c +++ b/grub-core/loader/sparc64/ieee1275/linux.c @@ -196,7 +196,7 @@ alloc_phys_choose (grub_uint64_t addr, grub_uint64_t len, struct alloc_phys_ctx *ctx = data; grub_addr_t end = addr + len; - if (type != 1) + if (type != GRUB_MEMORY_AVAILABLE) return 0; addr = ALIGN_UP (addr, FOUR_MB); @@ -430,7 +430,7 @@ static int get_physbase (grub_uint64_t addr, grub_uint64_t len __attribute__ ((unused)), grub_memory_type_t type, void *data __attribute__ ((unused))) { - if (type != 1) + if (type != GRUB_MEMORY_AVAILABLE) return 0; if (addr < phys_base) phys_base = addr;