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

(cherry picked from commit 9d40492efa467095340cf3dca5860880aa441472)

Details

Provenance
andrewAuthored on Apr 8 2024, 10:44 AM
Reviewer
alc
Differential Revision
D44677: arm64: Check DMAP address is valid in PHYS_IN_DMAP
Parents
rG93b11fe0a16a: nuageinit: start the script after zfs
Branches
Unknown
Tags
Unknown