diff --git a/rpcs3/Emu/SysCalls/SysCalls.cpp b/rpcs3/Emu/SysCalls/SysCalls.cpp index 959fd93dd1..f8093f533c 100644 --- a/rpcs3/Emu/SysCalls/SysCalls.cpp +++ b/rpcs3/Emu/SysCalls/SysCalls.cpp @@ -131,7 +131,7 @@ static func_caller* sc_table[1024] = null_func, null_func, null_func, null_func, null_func, //339 null_func, bind_func(sys_memory_container_create), bind_func(sys_memory_container_destroy), null_func, null_func, //344 null_func, null_func, null_func, bind_func(sys_memory_allocate), bind_func(sys_memory_free), //349 - null_func, null_func, bind_func(sys_memory_get_user_memory_size), null_func, null_func, //354 + null_func, bind_func(sys_memory_get_page_attribute), bind_func(sys_memory_get_user_memory_size), null_func, null_func, //354 null_func, null_func, null_func, null_func, null_func, //359 null_func, null_func, null_func, null_func, null_func, //364 null_func, null_func, null_func, null_func, null_func, //369 diff --git a/rpcs3/Emu/SysCalls/SysCalls.h b/rpcs3/Emu/SysCalls/SysCalls.h index f802f7a4b7..f85a2949a3 100644 --- a/rpcs3/Emu/SysCalls/SysCalls.h +++ b/rpcs3/Emu/SysCalls/SysCalls.h @@ -1,6 +1,7 @@ #pragma once #include "ErrorCodes.h" #include "lv2/SC_FileSystem.h" +#include "lv2/SC_Memory.h" #include "lv2/SC_Timer.h" #include "lv2/SC_Rwlock.h" #include "lv2/SC_SPU_Thread.h" @@ -186,6 +187,7 @@ extern int sys_memory_container_destroy(u32 cid); extern int sys_memory_allocate(u32 size, u32 flags, u32 alloc_addr_addr); extern int sys_memory_free(u32 start_addr); extern int sys_memory_get_user_memory_size(u32 mem_info_addr); +extern int sys_memory_get_page_attribute(u32 addr, mem_ptr_t a); extern int sys_mmapper_allocate_address(u32 size, u64 flags, u32 alignment, u32 alloc_addr); extern int sys_mmapper_allocate_memory(u32 size, u64 flags, u32 mem_id_addr); extern int sys_mmapper_map_memory(u32 start_addr, u32 mem_id, u64 flags); diff --git a/rpcs3/Emu/SysCalls/lv2/SC_Memory.cpp b/rpcs3/Emu/SysCalls/lv2/SC_Memory.cpp index be8a6ecb5d..1947275a3f 100644 --- a/rpcs3/Emu/SysCalls/lv2/SC_Memory.cpp +++ b/rpcs3/Emu/SysCalls/lv2/SC_Memory.cpp @@ -158,5 +158,17 @@ int sys_memory_get_user_memory_size(u32 mem_info_addr) info.total_user_memory = re(Memory.GetUserMemTotalSize()); info.available_user_memory = re(Memory.GetUserMemAvailSize()); Memory.WriteData(mem_info_addr, info); + return CELL_OK; +} + +int sys_memory_get_page_attribute(u32 addr, mem_ptr_t a) +{ + sc_mem.Warning("sys_memory_get_page_attribute(addr=0x%x, attr=0x%x)", addr, a.GetAddr()); + + a -> attribute = 0; + a -> page_size = 0; + a -> access_right = 0; + a -> pad = 0; + return CELL_OK; } \ No newline at end of file diff --git a/rpcs3/Emu/SysCalls/lv2/SC_Memory.h b/rpcs3/Emu/SysCalls/lv2/SC_Memory.h index 88837dcb4e..3f6b7e0dd4 100644 --- a/rpcs3/Emu/SysCalls/lv2/SC_Memory.h +++ b/rpcs3/Emu/SysCalls/lv2/SC_Memory.h @@ -56,4 +56,12 @@ struct sys_vm_statistics { u32 physical_mem_size; u32 physical_mem_used; u64 timestamp; +}; + +struct sys_page_attr_t +{ + u64 attribute; + u64 access_right; + u32 page_size; + u32 pad; }; \ No newline at end of file