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:
Dexuan Cui 2017-03-07 03:35:50 +00:00
parent 90b4425549
commit 0d0fae3406
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=314828

View File

@ -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 &&