summaryrefslogtreecommitdiff
path: root/sys/inc
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-11-18 11:15:07 -0500
committerIan Moffett <ian@osmora.org>2025-11-18 11:15:07 -0500
commit6576b39538f3c83c0d85ef7b4182add9a6cb77f7 (patch)
tree62260b8500f47c5b5cbea7f1e93a8e6da68cab9f /sys/inc
parentbc1c4e11a560d46d17d4e2e7b1e94fa0d5e1daa6 (diff)
kern/amd64: mmu: Add function to map pages
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/inc')
-rw-r--r--sys/inc/mu/mmu.h15
1 files changed, 15 insertions, 0 deletions
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 <sys/mman.h>
#include <sys/types.h>
#include <sys/cdefs.h>
#include <md/vas.h> /* 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