Use the correct size when checking an EFI address

Use the correct page size macro when checking if an address is with
the EFI runtime map. This would previously work correctly when the
page size is 4k. With a larger page size it may incorrectly detect
memory as within the map when it's not.

Reported by:	imp
Sponsored by:	Innovate UK
This commit is contained in:
Andrew Turner 2022-09-09 08:42:49 +01:00
parent 20adba8bc1
commit 643e14d094

View File

@ -137,7 +137,7 @@ efi_is_in_map(struct efi_md *map, int ndesc, int descsz, vm_offset_t addr)
continue;
if (addr >= p->md_virt &&
addr < p->md_virt + p->md_pages * PAGE_SIZE)
addr < p->md_virt + p->md_pages * EFI_PAGE_SIZE)
return (true);
}