arm/mpu: Map domain page in MPU systems

In MPU systems, we implement map_domain_page()/unmap_domain_page()
through mapping the domain page with a MPU region on demand.

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Signed-off-by: Wei Chen <wei.chen@arm.com>
Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
This commit is contained in:
Penny Zheng authored and Michal Orzel committed 2026-01-16 09:38:30 +01:00
1 parent e232aa054c
commit 4b3cad91a1
3 files changed
+48

No files matched your search

+1
View File
@@ -91,6 +91,7 @@ config MMU
config MPU
bool "MPU" if UNSUPPORTED
select ARCH_MAP_DOMAIN_PAGE
select STATIC_MEMORY
help
Memory Protection Unit (MPU). Select if you plan to run Xen on ARMv8-R
+1
View File
@@ -1,5 +1,6 @@
obj-$(CONFIG_ARM_32) += arm32/
obj-$(CONFIG_ARM_64) += arm64/
obj-y += domain-page.o
obj-y += mm.o
obj-y += p2m.o
obj-y += setup.init.o
+46
View File
@@ -0,0 +1,46 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <xen/bug.h>
#include <xen/domain_page.h>
#include <xen/mm.h>
#include <xen/mm-frame.h>
#include <xen/types.h>
#include <xen/vmap.h>
void *map_domain_page_global(mfn_t mfn)
{
BUG_ON("unimplemented");
return NULL;
}
/* Map a page of domheap memory */
void *map_domain_page(mfn_t mfn)
{
return vmap_contig(mfn, 1);
}
/* Release a mapping taken with map_domain_page() */
void unmap_domain_page(const void *ptr)
{
vunmap(ptr);
}
mfn_t domain_page_map_to_mfn(const void *ptr)
{
BUG_ON("unimplemented");
return INVALID_MFN;
}
void unmap_domain_page_global(const void *va)
{
BUG_ON("unimplemented");
}
/*
* Local variables:
* mode: C
* c-file-style: "BSD"
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*/
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.