From 6576b39538f3c83c0d85ef7b4182add9a6cb77f7 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Tue, 18 Nov 2025 11:15:07 -0500 Subject: kern/amd64: mmu: Add function to map pages Signed-off-by: Ian Moffett --- sys/inc/mu/mmu.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'sys/inc/mu') diff --git a/sys/inc/mu/mmu.h b/sys/inc/mu/mmu.h index 945e375..da2a286 100644 --- a/sys/inc/mu/mmu.h +++ b/sys/inc/mu/mmu.h @@ -30,10 +30,25 @@ #ifndef _MU_PMAP_H_ #define _MU_PMAP_H_ 1 +#include #include #include #include /* shared */ +typedef enum { + PAGESIZE_4K, +} pagesize_t; + +/* + * Create a virtual to physical mapping of a single + * page of memory with a specific page size and specific + * protection flags. + */ +__strong int mu_pmap_map( + struct mmu_vas *vas, uintptr_t pa, uintptr_t va, + uint16_t prot, pagesize_t ps +); + /* * Copy the current VAS leaving the user-side * zeroed -- cgit v1.2.3