amd64 efirt: initialize vm_pages backing EFI runtime memory
so that PHYS_TO_VM_PAGE() and consequently physcopyin() work for them Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30785
This commit is contained in:
parent
5b10e79edb
commit
0247c33e89
@ -180,6 +180,7 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int descsz)
|
||||
struct efi_md *p;
|
||||
pt_entry_t *pte;
|
||||
void *pml;
|
||||
vm_page_t m;
|
||||
vm_offset_t va;
|
||||
uint64_t idx;
|
||||
int bits, i, mode;
|
||||
@ -247,6 +248,14 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int descsz)
|
||||
va += PAGE_SIZE) {
|
||||
pte = efi_1t1_pte(va);
|
||||
pte_store(pte, va | bits);
|
||||
|
||||
m = PHYS_TO_VM_PAGE(va);
|
||||
if (m != NULL && VM_PAGE_TO_PHYS(m) == 0) {
|
||||
vm_page_init_page(m, va, -1);
|
||||
m->order = VM_NFREEORDER + 1; /* invalid */
|
||||
m->pool = VM_NFREEPOOL + 1; /* invalid */
|
||||
pmap_page_set_memattr(m, mode);
|
||||
}
|
||||
}
|
||||
VM_OBJECT_WUNLOCK(obj_1t1_pt);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user