Kernel: map userspace arguments after the entry point

This allows cleaner memory layout for processes that are not loaded to
default location
This commit is contained in:
Bananymous 2024-08-27 22:46:08 +03:00
parent da0b4cd40e
commit 5f66ef34dd
1 changed files with 1 additions and 1 deletions

View File

@ -539,7 +539,7 @@ namespace Kernel
auto region = TRY(MemoryBackedRegion::create( auto region = TRY(MemoryBackedRegion::create(
page_table(), page_table(),
bytes, bytes,
{ .start = 0x400000, .end = KERNEL_OFFSET }, { .start = m_userspace_info.entry, .end = KERNEL_OFFSET },
MemoryRegion::Type::PRIVATE, MemoryRegion::Type::PRIVATE,
PageTable::Flags::UserSupervisor | PageTable::Flags::ReadWrite | PageTable::Flags::Present PageTable::Flags::UserSupervisor | PageTable::Flags::ReadWrite | PageTable::Flags::Present
)); ));