HomeFreeBSD

arm64: Check DMAP address is valid in PHYS_IN_DMAP

Description

arm64: Check DMAP address is valid in PHYS_IN_DMAP

When checking if a physical address is in the DMAP region we assume
all physical addresses between DMAP_MIN_PHYSADDR and DMAP_MAX_PHYSADDR
are able to be accesses through the DMAP. It may be the case that
there is device memory in this range that shouldn't be accessed through
the DMAP mappings.

Add a check to PHYS_IN_DMAP that the translated virtual address is a
valid kernel address. To support code that already checks the address
is valid add PHYS_IN_DMAP_RANGE.

PR: 278233
Reviewed by: alc, markj
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D44677

Details

Provenance
andrewAuthored on Mon, Apr 8, 10:44 AM
Reviewer
alc
Differential Revision
D44677: arm64: Check DMAP address is valid in PHYS_IN_DMAP
Parents
rGef80df0a7191: arm64/vmm: Ensure the tlbi has completed
Branches
Unknown
Tags
Unknown