1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 10:42:36 +01:00

Merge pull request #40 from osvcos/master

Halfplement syscall 351 (sys_memory_get_page_attribute)
This commit is contained in:
Alexandro Sánchez Bach 2013-12-30 13:32:28 -08:00
commit 3858f5097e
4 changed files with 23 additions and 1 deletions

View File

@ -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

View File

@ -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<sys_page_attr_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);

View File

@ -160,3 +160,15 @@ int sys_memory_get_user_memory_size(u32 mem_info_addr)
Memory.WriteData(mem_info_addr, info);
return CELL_OK;
}
int sys_memory_get_page_attribute(u32 addr, mem_ptr_t<sys_page_attr_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;
}

View File

@ -57,3 +57,11 @@ struct sys_vm_statistics {
u32 physical_mem_used;
u64 timestamp;
};
struct sys_page_attr_t
{
u64 attribute;
u64 access_right;
u32 page_size;
u32 pad;
};