loader.efi: fix an off-by-one bug in efi_verify_staging_size()
Also remove the warning message: it may not be unusual to see the memory range containing 2MB is not of EfiConventionalMemory. MFC after: 2 weeks2 weeks Sponsored by: Microsoft
This commit is contained in:
parent
34998ef9b5
commit
d5437e63a6
@ -79,10 +79,6 @@ efi_verify_staging_size(unsigned long *nr_pages)
|
||||
KERNEL_PHYSICAL_BASE >= end)
|
||||
continue;
|
||||
|
||||
if (p->Type != EfiConventionalMemory)
|
||||
printf("Warning: wrong EFI memory type: %d\n",
|
||||
p->Type);
|
||||
|
||||
available_pages = p->NumberOfPages -
|
||||
((KERNEL_PHYSICAL_BASE - start) >> EFI_PAGE_SHIFT);
|
||||
break;
|
||||
@ -93,6 +89,7 @@ efi_verify_staging_size(unsigned long *nr_pages)
|
||||
goto out;
|
||||
}
|
||||
|
||||
i++;
|
||||
for ( ; i < ndesc;
|
||||
i++, p = NextMemoryDescriptor(p, dsz)) {
|
||||
if (p->Type != EfiConventionalMemory &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user