diff --git a/src/core/libraries/kernel/memory_management.cpp b/src/core/libraries/kernel/memory_management.cpp index aba81fbd..0433e2fb 100644 --- a/src/core/libraries/kernel/memory_management.cpp +++ b/src/core/libraries/kernel/memory_management.cpp @@ -201,8 +201,7 @@ int PS4_SYSV_ABI sceKernelQueryMemoryProtection(void* addr, void** start, void** } int PS4_SYSV_ABI sceKernelMProtect(void* addr, size_t size, int prot) { - LOG_INFO(Kernel_Vmm, "called addr = {}, size = {:#x}, prot = {:#x}", fmt::ptr(addr), size, - prot); + Core::MemoryManager* memory_manager = Core::Memory::Instance(); if (!memory_manager) { LOG_ERROR(Kernel_Vmm, "Failed to get MemoryManager instance"); @@ -217,8 +216,7 @@ int PS4_SYSV_ABI sceKernelMProtect(void* addr, size_t size, int prot) { } int PS4_SYSV_ABI sceKernelMTypeProtect(void* addr, size_t size, int mtype, int prot) { - LOG_INFO(Kernel_Vmm, "called addr = {}, size = {:#x}, mtype = {:#x}, prot = {:#x}", - fmt::ptr(addr), size, mtype, prot); + Core::MemoryManager* memory_manager = Core::Memory::Instance(); if (!memory_manager) { LOG_ERROR(Kernel_Vmm, "Failed to get MemoryManager instance"); diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 46e604e0..f321d898 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -307,15 +307,12 @@ int MemoryManager::MProtect(VAddr addr, size_t size, int prot) { perms |= Core::MemoryPermission::ReadWrite; // Add this line impl.Protect(addr, size, perms); - LOG_INFO(Core, "Changed protection on range {:#x}-{:#x} to {:#x}", addr, addr + size, prot); return ORBIS_OK; } int MemoryManager::MTypeProtect(VAddr addr, size_t size, VMAType mtype, int prot) { std::scoped_lock lk{mutex}; - LOG_INFO(Core, "MTypeProtect called: addr = {:#x}, size = {:#x}, mtype = {:#x}, prot = {:#x}", - addr, size, mtype, prot); // Find the virtual memory area that contains the specified address range. auto it = FindVMA(addr); @@ -325,8 +322,7 @@ int MemoryManager::MTypeProtect(VAddr addr, size_t size, VMAType mtype, int prot } VirtualMemoryArea& vma = it->second; - LOG_INFO(Core, "VMA found: base = {:#x}, size = {:#x}, prot = {:#x}, type = {}", vma.base, - vma.size, vma.prot, vma.type); + if (vma.type == VMAType::Free) { LOG_ERROR(Core, "Cannot change protection on free memory region"); @@ -348,8 +344,6 @@ int MemoryManager::MTypeProtect(VAddr addr, size_t size, VMAType mtype, int prot vma.type = mtype; vma.prot = static_cast(prot); - LOG_INFO(Core, "Changed VMA type and protection: type = {:#x}, prot = {:#x}", mtype, prot); - // Use the Protect function from the AddressSpace class. Core::MemoryPermission perms; if ((static_cast(prot) & static_cast(MemoryProt::CpuRead)) != 0) @@ -364,8 +358,6 @@ int MemoryManager::MTypeProtect(VAddr addr, size_t size, VMAType mtype, int prot perms |= Core::MemoryPermission::ReadWrite; impl.Protect(addr, size, perms); - LOG_INFO(Core, "Changed type and protection on range {:#x}-{:#x} to {:#x} {:#x}", addr, - addr + size, mtype, prot); return ORBIS_OK; } diff --git a/src/core/memory.h b/src/core/memory.h index 9f217e0f..5163f024 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -164,9 +164,9 @@ public: int MTypeProtect(VAddr addr, size_t size, VMAType mtype, int prot); - int VirtualQuery(VAddr addr, int flags, Libraries::Kernel::OrbisVirtualQueryInfo* info); + int VirtualQuery(VAddr addr, int flags, ::Libraries::Kernel::OrbisVirtualQueryInfo* info); - int DirectMemoryQuery(PAddr addr, bool find_next, Libraries::Kernel::OrbisQueryInfo* out_info); + int DirectMemoryQuery(PAddr addr, bool find_next, ::Libraries::Kernel::OrbisQueryInfo* out_info); int DirectQueryAvailable(PAddr search_start, PAddr search_end, size_t alignment, PAddr* phys_addr_out, size_t* size_out);