diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2026-07-16 06:49:21 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2026-07-16 15:32:50 +0000 |
| commit | a2f50c4b32d1c126cf2309dab61d27d6329908f8 (patch) | |
| tree | d02d12b2304a3074cd39a636a4f6ea34520caa7c | |
| parent | 7c22dda66913347fba2e488440cf00e7f8a26470 (diff) | |
amd64 efirt: register all runtime regions as fictitious
This is needed for VM_PHYS_TO_PAGE() to work, which is needed for
pmap_map_io_transient() to work, which is needed for uiomove_fromphys()
to work.
PR: 296348
Reported and tested by: Anton Saietskii <vsasjason@gmail.com>
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D58274
| -rw-r--r-- | sys/amd64/amd64/efirt_machdep.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/amd64/amd64/efirt_machdep.c b/sys/amd64/amd64/efirt_machdep.c index f3e3db9cba9c..f5be20e99b40 100644 --- a/sys/amd64/amd64/efirt_machdep.c +++ b/sys/amd64/amd64/efirt_machdep.c @@ -54,6 +54,7 @@ #include <vm/vm_object.h> #include <vm/vm_page.h> #include <vm/vm_pager.h> +#include <vm/vm_phys.h> #include <vm/vm_radix.h> /* The EFI regions we're allowed to map. */ @@ -253,6 +254,8 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int descsz) "attributes unsupported\n", i); mode = VM_MEMATTR_UNCACHEABLE; } + (void)vm_phys_fictitious_reg_range(p->md_phys, p->md_phys + + p->md_pages * EFI_PAGE_SIZE, mode); bits = pmap_cache_bits(kernel_pmap, mode, false) | X86_PG_RW | X86_PG_V; VM_OBJECT_WLOCK(obj_1t1_pt); |
