@@ -161,13 +161,19 @@ static bool __init meminfo_add_bank(struct meminfo *mem,
EFI_MEMORY_DESCRIPTOR *desc)
{
struct membank *bank;
+ paddr_t start = desc->PhysicalStart;
+ paddr_t size = desc->NumberOfPages * EFI_PAGE_SIZE;
if ( mem->nr_banks >= NR_MEM_BANKS )
return false;
+#ifdef CONFIG_ACPI
+ if ( check_reserved_regions_overlap(start, size) )
+ return false;
+#endif
bank = &mem->bank[mem->nr_banks];
- bank->start = desc->PhysicalStart;
- bank->size = desc->NumberOfPages * EFI_PAGE_SIZE;
+ bank->start = start;
+ bank->size = size;
mem->nr_banks++;
@@ -350,6 +350,12 @@ bool __init check_reserved_regions_overlap(paddr_t region_start,
region_start, region_size) )
return true;
+#ifdef CONFIG_ACPI
+ /* Check if input region is overlapping with ACPI EfiACPIReclaimMemory */
+ if ( meminfo_overlap_check(&bootinfo.acpi, region_start, region_size) )
+ return true;
+#endif
+
return false;
}