[kernel] Add VMA interface

Finished the VMA kobject and added the related syscalls. Processes can
now allocate memory! Other changes in this commit:

- stop using g_frame_allocator and add frame_allocator::get()
- make sure to release all handles in the process dtor
- fix kutil::map::iterator never comparing to end()
This commit is contained in:
2020-09-23 00:29:05 -07:00
parent d4283731e4
commit 0e0975e5f6
13 changed files with 245 additions and 173 deletions

View File

@@ -1,7 +1,7 @@
SYSCALL(0x00, system_log, const char *)
SYSCALL(0x01, system_noop, void)
SYSCALL(0x00, system_log, const char *)
SYSCALL(0x01, system_noop, void)
SYSCALL(0x09, object_wait, j6_handle_t, j6_signal_t, j6_signal_t *)
SYSCALL(0x09, object_wait, j6_handle_t, j6_signal_t, j6_signal_t *)
SYSCALL(0x0a, object_signal, j6_handle_t, j6_signal_t)
SYSCALL(0x10, process_koid, j6_koid_t *)
@@ -24,3 +24,8 @@ SYSCALL(0x2a, endpoint_send, j6_handle_t, size_t, void *)
SYSCALL(0x2b, endpoint_receive, j6_handle_t, size_t *, void *)
SYSCALL(0x2c, endpoint_sendrecv, j6_handle_t, size_t *, void *)
SYSCALL(0x30, vma_create, j6_handle_t *, size_t)
SYSCALL(0x31, vma_create_map, j6_handle_t *, size_t, uintptr_t)
SYSCALL(0x32, vma_close, j6_handle_t)
SYSCALL(0x33, vma_map, j6_handle_t, uintptr_t)
SYSCALL(0x34, vma_unmap, j6_handle_t)