1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:57:44 +00:00

Kernel: Add Syscalls/mmap.cpp to aarch64 build

This commit is contained in:
Timon Kruiper 2023-01-25 16:15:35 +01:00 committed by Linus Groh
parent a146a19636
commit 80b722081b
2 changed files with 8 additions and 2 deletions

View file

@ -292,6 +292,7 @@ set(KERNEL_SOURCES
Syscalls/lseek.cpp
Syscalls/mkdir.cpp
Syscalls/mknod.cpp
Syscalls/mmap.cpp
Syscalls/mount.cpp
Syscalls/open.cpp
Syscalls/perf_event.cpp
@ -401,7 +402,6 @@ if ("${SERENITY_ARCH}" STREQUAL "x86_64")
Syscall.cpp
Syscalls/execve.cpp
Syscalls/fork.cpp
Syscalls/mmap.cpp
Syscalls/sigaction.cpp
)

View file

@ -6,10 +6,10 @@
*/
#include <Kernel/API/VirtualMemoryAnnotations.h>
#include <Kernel/Arch/CPU.h>
#include <Kernel/Arch/PageDirectory.h>
#include <Kernel/Arch/SafeMem.h>
#include <Kernel/Arch/SmapDisabler.h>
#include <Kernel/Arch/x86_64/MSR.h>
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/OpenFileDescription.h>
#include <Kernel/Memory/AnonymousVMObject.h>
@ -22,6 +22,10 @@
#include <Kernel/Process.h>
#include <LibELF/Validation.h>
#if ARCH(X86_64)
# include <Kernel/Arch/x86_64/MSR.h>
#endif
namespace Kernel {
static bool should_make_executable_exception_for_dynamic_loader(bool make_readable, bool make_writable, bool make_executable, Memory::Region const& region)
@ -562,8 +566,10 @@ ErrorOr<FlatPtr> Process::sys$allocate_tls(Userspace<char const*> initial_data,
TRY(main_thread->make_thread_specific_region({}));
#if ARCH(X86_64)
MSR fs_base_msr(MSR_FS_BASE);
fs_base_msr.set(main_thread->thread_specific_data().get());
#endif
return m_master_tls_region.unsafe_ptr()->vaddr().get();
});