git: 020edaea2ab0 - main - Split out pmap_map_delete on arm64
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 28 Apr 2023 11:28:03 UTC
The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=020edaea2ab05c9cea7d83872f28a4e5e65407e2 commit 020edaea2ab05c9cea7d83872f28a4e5e65407e2 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2023-04-28 10:54:19 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2023-04-28 10:54:19 +0000 Split out pmap_map_delete on arm64 This will be used when supporting some extensions, e.g. Branch Target Identification (BTI). Sponsored by: Arm Ltd --- sys/arm64/arm64/pmap.c | 12 ++++++++++++ sys/arm64/include/pmap.h | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 6bea9cde55b5..1d1986b34f66 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -3686,6 +3686,18 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) vm_page_free_pages_toq(&free, true); } +/* + * Remove the given range of addresses as part of a logical unmap + * operation. This has the effect of calling pmap_remove(), but + * also clears any metadata that should persist for the lifetime + * of a logical mapping. + */ +void +pmap_map_delete(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +{ + pmap_remove(pmap, sva, eva); +} + /* * Routine: pmap_remove_all * Function: diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h index bf387c9cf25b..ad77450f0233 100644 --- a/sys/arm64/include/pmap.h +++ b/sys/arm64/include/pmap.h @@ -155,7 +155,7 @@ int pmap_pinit_stage(pmap_t, enum pmap_stage, int); bool pmap_ps_enabled(pmap_t pmap); uint64_t pmap_to_ttbr0(pmap_t pmap); void pmap_disable_promotion(vm_offset_t sva, vm_size_t size); -#define pmap_map_delete(pmap, sva, eva) pmap_remove(pmap, sva, eva) +void pmap_map_delete(pmap_t, vm_offset_t, vm_offset_t); void *pmap_mapdev(vm_paddr_t, vm_size_t); void *pmap_mapbios(vm_paddr_t, vm_size_t);