svn commit: r314828 - head/sys/boot/efi/loader
Dexuan Cui
dexuan at FreeBSD.org
Tue Mar 7 03:35:51 UTC 2017
Author: dexuan
Date: Tue Mar 7 03:35:50 2017
New Revision: 314828
URL: https://svnweb.freebsd.org/changeset/base/314828
Log:
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
Modified:
head/sys/boot/efi/loader/copy.c
Modified: head/sys/boot/efi/loader/copy.c
==============================================================================
--- head/sys/boot/efi/loader/copy.c Tue Mar 7 03:01:09 2017 (r314827)
+++ head/sys/boot/efi/loader/copy.c Tue Mar 7 03:35:50 2017 (r314828)
@@ -79,10 +79,6 @@ efi_verify_staging_size(unsigned long *n
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 *n
goto out;
}
+ i++;
for ( ; i < ndesc;
i++, p = NextMemoryDescriptor(p, dsz)) {
if (p->Type != EfiConventionalMemory &&
More information about the svn-src-all
mailing list