diff --git a/headers/private/kernel/arch/arm64/arch_cpu.h b/headers/private/kernel/arch/arm64/arch_cpu.h index 302489f43a..7d05aea1fd 100644 --- a/headers/private/kernel/arch/arm64/arch_cpu.h +++ b/headers/private/kernel/arch/arm64/arch_cpu.h @@ -9,6 +9,7 @@ #define CPU_MAX_CACHE_LEVEL 8 #define CACHE_LINE_SIZE 64 +// TODO: These will require a real implementation when PAN is enabled #define set_ac() #define clear_ac() diff --git a/src/system/kernel/arch/arm64/PMAPPhysicalPageMapper.cpp b/src/system/kernel/arch/arm64/PMAPPhysicalPageMapper.cpp index efddfdba21..4976cd3228 100644 --- a/src/system/kernel/arch/arm64/PMAPPhysicalPageMapper.cpp +++ b/src/system/kernel/arch/arm64/PMAPPhysicalPageMapper.cpp @@ -34,28 +34,31 @@ PMAPPhysicalPageMapper::MemsetPhysical(phys_addr_t address, int value, phys_size return B_OK; } - status_t PMAPPhysicalPageMapper::MemcpyFromPhysical(void* to, phys_addr_t from, size_t length, bool user) { - if (user) - panic("MemcpyFromPhysical user not impl"); - ASSERT(from < KERNEL_PMAP_SIZE); - memcpy(to, reinterpret_cast(KERNEL_PMAP_BASE + from), length); - return B_OK; + if (!user) { + memcpy(to, reinterpret_cast(KERNEL_PMAP_BASE + from), length); + return B_OK; + } else { + return user_memcpy(to, reinterpret_cast(KERNEL_PMAP_BASE + from), length); + } } status_t PMAPPhysicalPageMapper::MemcpyToPhysical(phys_addr_t to, const void* from, size_t length, bool user) { - if (user) - panic("MemcpyToPhysical user not impl"); - ASSERT(to < KERNEL_PMAP_SIZE); - memcpy(reinterpret_cast(KERNEL_PMAP_BASE + to), from, length); + + if (!user) { + memcpy(reinterpret_cast(KERNEL_PMAP_BASE + to), from, length); + return B_OK; + } else { + return user_memcpy(reinterpret_cast(KERNEL_PMAP_BASE + to), from, length); + } return B_OK; }