Kernel: Define constant USERSPACE_END

This should be used for userspace generic allocations. Currently I used
KERNEL_OFFSET, but I want to limit userspace to the actual lower half of
the address space
This commit is contained in:
2025-04-15 23:07:22 +03:00
parent 36baf7b0af
commit a933fabb86
3 changed files with 7 additions and 5 deletions

View File

@@ -103,7 +103,7 @@ namespace Kernel
thread->m_kernel_stack = TRY(VirtualRange::create_to_vaddr_range(
page_table,
0x200000, KERNEL_OFFSET,
0x200000, USERSPACE_END,
kernel_stack_size,
PageTable::Flags::ReadWrite | PageTable::Flags::Present,
true
@@ -111,7 +111,7 @@ namespace Kernel
thread->m_userspace_stack = TRY(VirtualRange::create_to_vaddr_range(
page_table,
0x200000, KERNEL_OFFSET,
0x200000, USERSPACE_END,
userspace_stack_size,
PageTable::Flags::UserSupervisor | PageTable::Flags::ReadWrite | PageTable::Flags::Present,
true