Support EFIRT on arm64 with a non 4k page size

When the page size the kernel is built for is not the same as
EFI_PAGE_SIZE we need to increment the page index at a faster rate.

Add this adjustment to the arm64 EFIRT support in preperation for
experimental 16k PAGE_SIZE support.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Andrew Turner 2022-03-23 15:18:30 +00:00
parent 16d5f9a164
commit 863f3220d0

View File

@ -221,8 +221,8 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int descsz)
l3_attr |= ATTR_S1_XN;
VM_OBJECT_WLOCK(obj_1t1_pt);
for (va = p->md_phys, idx = 0; idx < p->md_pages; idx++,
va += PAGE_SIZE) {
for (va = p->md_phys, idx = 0; idx < p->md_pages;
idx += (PAGE_SIZE / EFI_PAGE_SIZE), va += PAGE_SIZE) {
l3 = efi_1t1_l3(va);
*l3 = va | l3_attr;
}