vm: replace vm-region with address-space
address-space is a non-recursive data structure, which contains a flat list of vm_areas representing mapped vm-objects. userspace programs can no longer create sub-address-spaces. instead, they can reserve portions of the address space, and use that reserved space to create mappings.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#include <kernel/address-space.h>
|
||||
#include <kernel/handle.h>
|
||||
#include <kernel/libc/string.h>
|
||||
#include <kernel/object.h>
|
||||
#include <kernel/sched.h>
|
||||
#include <kernel/util.h>
|
||||
#include <kernel/vm-region.h>
|
||||
#include <kernel/vm.h>
|
||||
#include <mango/types.h>
|
||||
|
||||
@@ -195,11 +195,11 @@ struct handle *handle_table_get_handle(
|
||||
}
|
||||
|
||||
kern_status_t handle_table_transfer(
|
||||
struct vm_region *dst_region,
|
||||
struct address_space *dst_region,
|
||||
struct handle_table *dst,
|
||||
kern_msg_handle_t *dst_handles,
|
||||
size_t dst_handles_max,
|
||||
struct vm_region *src_region,
|
||||
struct address_space *src_region,
|
||||
struct handle_table *src,
|
||||
kern_msg_handle_t *src_handles,
|
||||
size_t src_handles_count)
|
||||
@@ -214,7 +214,7 @@ kern_status_t handle_table_transfer(
|
||||
= (virt_addr_t)src_handles + (i * sizeof src_handle);
|
||||
virt_addr_t dst_handle_addr
|
||||
= (virt_addr_t)dst_handles + (i * sizeof dst_handle);
|
||||
status = vm_region_read_kernel(
|
||||
status = address_space_read(
|
||||
src_region,
|
||||
src_handle_addr,
|
||||
sizeof src_handle,
|
||||
@@ -223,7 +223,7 @@ kern_status_t handle_table_transfer(
|
||||
|
||||
if (status != KERN_OK) {
|
||||
src_handle.hnd_result = KERN_OK;
|
||||
vm_region_write_kernel(
|
||||
address_space_write(
|
||||
src_region,
|
||||
src_handle_addr,
|
||||
sizeof src_handle,
|
||||
@@ -244,7 +244,7 @@ kern_status_t handle_table_transfer(
|
||||
if (!src_entry) {
|
||||
status = KERN_INVALID_ARGUMENT;
|
||||
src_handle.hnd_result = KERN_INVALID_ARGUMENT;
|
||||
vm_region_write_kernel(
|
||||
address_space_write(
|
||||
src_region,
|
||||
src_handle_addr,
|
||||
sizeof src_handle,
|
||||
@@ -299,13 +299,13 @@ kern_status_t handle_table_transfer(
|
||||
|
||||
src_handle.hnd_result = status;
|
||||
|
||||
vm_region_write_kernel(
|
||||
address_space_write(
|
||||
src_region,
|
||||
src_handle_addr,
|
||||
sizeof src_handle,
|
||||
&src_handle,
|
||||
NULL);
|
||||
vm_region_write_kernel(
|
||||
address_space_write(
|
||||
dst_region,
|
||||
dst_handle_addr,
|
||||
sizeof dst_handle,
|
||||
@@ -317,7 +317,7 @@ kern_status_t handle_table_transfer(
|
||||
kern_msg_handle_t handle = {0};
|
||||
virt_addr_t handle_addr
|
||||
= (virt_addr_t)src_handles + (i * sizeof handle);
|
||||
vm_region_read_kernel(
|
||||
address_space_read(
|
||||
src_region,
|
||||
handle_addr,
|
||||
sizeof handle,
|
||||
|
||||
Reference in New Issue
Block a user