aboutsummaryrefslogtreecommitdiff
path: root/sys/vm/vm_map.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm/vm_map.c')
-rw-r--r--sys/vm/vm_map.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index ae93c38..0d27738 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -47,14 +47,14 @@
* be enforced via a panic.
*/
static void
-vm_map_cleanup(struct vm_ctx *ctx, vaddr_t va, size_t bytes_aligned,
- size_t granule)
+vm_map_cleanup(struct vas vas, struct vm_ctx *ctx, vaddr_t va,
+ size_t bytes_aligned, size_t granule)
{
__assert(bytes_aligned != 0);
__assert((bytes_aligned & (granule - 1)) == 0);
for (size_t i = 0; i < bytes_aligned; i += 0x1000) {
- if (pmap_unmap(ctx, va + i) != 0) {
+ if (pmap_unmap(ctx, vas, va + i) != 0) {
/*
* XXX: This shouldn't happen... If it somehow does,
* then this should be handled.
@@ -75,7 +75,7 @@ vm_map_cleanup(struct vm_ctx *ctx, vaddr_t va, size_t bytes_aligned,
* machine's page granule, typically a 4k boundary.
*/
int
-vm_map_create(vaddr_t va, paddr_t pa, vm_prot_t prot, size_t bytes)
+vm_map_create(struct vas vas, vaddr_t va, paddr_t pa, vm_prot_t prot, size_t bytes)
{
size_t granule = vm_get_page_size();
int s;
@@ -95,10 +95,10 @@ vm_map_create(vaddr_t va, paddr_t pa, vm_prot_t prot, size_t bytes)
}
for (uintptr_t i = 0; i < bytes; i += granule) {
- s = pmap_map(ctx, va + i, pa + i, prot);
+ s = pmap_map(ctx, vas, va + i, pa + i, prot);
if (s != 0) {
/* Something went a bit wrong here, cleanup */
- vm_map_cleanup(ctx, va, i, bytes);
+ vm_map_cleanup(vas, ctx, va, i, bytes);
return -1;
}
}
@@ -111,7 +111,7 @@ vm_map_create(vaddr_t va, paddr_t pa, vm_prot_t prot, size_t bytes)
* address space.
*/
int
-vm_map_destroy(vaddr_t va, size_t bytes)
+vm_map_destroy(struct vas vas, vaddr_t va, size_t bytes)
{
struct vm_ctx *ctx = vm_get_ctx();
size_t granule = vm_get_page_size();
@@ -128,7 +128,7 @@ vm_map_destroy(vaddr_t va, size_t bytes)
}
for (uintptr_t i = 0; i < bytes; i += granule) {
- s = pmap_unmap(ctx, va + i);
+ s = pmap_unmap(ctx, vas, va + i);
if (s != 0) {
return -1;
}