From ef156dd6430855434b54275b22cd43ee3cedcfdc Mon Sep 17 00:00:00 2001 From: Fabian Imhof Date: Sun, 11 May 2025 09:29:56 +0000 Subject: make frame_allocator and active_page_table statically available --- arch/x86_64/src/context_switching/syscall/syscall_handler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/x86_64/src/context_switching/syscall') diff --git a/arch/x86_64/src/context_switching/syscall/syscall_handler.cpp b/arch/x86_64/src/context_switching/syscall/syscall_handler.cpp index b88f273..9ca03d9 100644 --- a/arch/x86_64/src/context_switching/syscall/syscall_handler.cpp +++ b/arch/x86_64/src/context_switching/syscall/syscall_handler.cpp @@ -2,6 +2,8 @@ #include "arch/context_switching/syscall/main.hpp" #include "arch/exception_handling/panic.hpp" +#include "arch/memory/heap/global_heap_allocator.hpp" +#include "arch/memory/main.hpp" #include "arch/video/vga/text.hpp" namespace teachos::arch::context_switching::syscall @@ -19,6 +21,10 @@ namespace teachos::arch::context_switching::syscall auto expand_user_heap() -> error { + // TODO: use actual addresses instead of this constant! + memory::remap_heap(memory::heap::USER_HEAP_SIZE + memory::heap::USER_HEAP_SIZE, memory::heap::USER_HEAP_SIZE, + memory::paging::entry::USER_ACCESSIBLE); + arguments args{}; asm volatile("mov %[input], %%rdi" : /* no output from call */ -- cgit v1.2.3