aboutsummaryrefslogtreecommitdiff
path: root/include/apos/vmem.h
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2021-10-19 15:56:26 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2021-10-19 15:56:26 +0300
commit59a374b0eed4313d1a67e2cdb673a295e79a6494 (patch)
treea83157ac108c315f93536d4a3d8150b729bdcb1a /include/apos/vmem.h
parent7237d673904d8568a2f9c290a0247c9d1a07c5d2 (diff)
downloadkmi-59a374b0eed4313d1a67e2cdb673a295e79a6494.tar.gz
kmi-59a374b0eed4313d1a67e2cdb673a295e79a6494.zip
Initial virtual memory mapping functions
Diffstat (limited to 'include/apos/vmem.h')
-rw-r--r--include/apos/vmem.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/include/apos/vmem.h b/include/apos/vmem.h
index 589e814..d2dcedc 100644
--- a/include/apos/vmem.h
+++ b/include/apos/vmem.h
@@ -1,6 +1,8 @@
#ifndef APOS_VMEM_H
#define APOS_VMEM_H
+#include <apos/pmem.h>
+
/* arch-specific data */
#include <vmem.h>
@@ -14,19 +16,16 @@
* (un)map_vsize: map unknown physical region to unknown virtual region
*/
+/* defined by arch */
void map_vmem(struct vm_branch_t *branch,
pm_t paddr, vm_t vaddr,
uint8_t flags, enum mm_order_t order);
void unmap_vmem(struct vm_branch_t *branch, vm_t vaddr, enum mm_order_t order);
-#define map_kvregion(b, pb, pt) map_vregion(b, pb, pt, VMEM_BASE, VMEM_TOP);
-#define map_uvregion(b, pb, pt) map_vregion(b, pb, pt, UMEM_BASE, UMEM_TOP);
-
-vm_t map_vregion(struct vm_branch_t *branch, pm_t base, pm_t top, vm_t start, vm_t end);
-void unmap_vregion(struct vm_branch_t *branch, pm_t base, pm_t top);
-vm_t map_vsize(struct vm_branch_t *branch, size_t size);
-void unmap_vsize(struct vm_branch_t *branch, size_t size);
+vm_t map_vregion(struct vm_branch_t *branch, pm_t base, vm_t start, size_t size,
+ uint8_t flags);
+void unmap_vregion(struct vm_branch_t *branch, vm_t start);
#endif /* APOS_VMEM_H */