mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-29 00:33:01 +00:00
Merge pull request #40 from osvcos/master
Halfplement syscall 351 (sys_memory_get_page_attribute)
This commit is contained in:
commit
3858f5097e
@ -131,7 +131,7 @@ static func_caller* sc_table[1024] =
|
|||||||
null_func, null_func, null_func, null_func, null_func, //339
|
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, 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, 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, //359
|
||||||
null_func, null_func, null_func, null_func, null_func, //364
|
null_func, null_func, null_func, null_func, null_func, //364
|
||||||
null_func, null_func, null_func, null_func, null_func, //369
|
null_func, null_func, null_func, null_func, null_func, //369
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "ErrorCodes.h"
|
#include "ErrorCodes.h"
|
||||||
#include "lv2/SC_FileSystem.h"
|
#include "lv2/SC_FileSystem.h"
|
||||||
|
#include "lv2/SC_Memory.h"
|
||||||
#include "lv2/SC_Timer.h"
|
#include "lv2/SC_Timer.h"
|
||||||
#include "lv2/SC_Rwlock.h"
|
#include "lv2/SC_Rwlock.h"
|
||||||
#include "lv2/SC_SPU_Thread.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_allocate(u32 size, u32 flags, u32 alloc_addr_addr);
|
||||||
extern int sys_memory_free(u32 start_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_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_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_allocate_memory(u32 size, u64 flags, u32 mem_id_addr);
|
||||||
extern int sys_mmapper_map_memory(u32 start_addr, u32 mem_id, u64 flags);
|
extern int sys_mmapper_map_memory(u32 start_addr, u32 mem_id, u64 flags);
|
||||||
|
@ -158,5 +158,17 @@ int sys_memory_get_user_memory_size(u32 mem_info_addr)
|
|||||||
info.total_user_memory = re(Memory.GetUserMemTotalSize());
|
info.total_user_memory = re(Memory.GetUserMemTotalSize());
|
||||||
info.available_user_memory = re(Memory.GetUserMemAvailSize());
|
info.available_user_memory = re(Memory.GetUserMemAvailSize());
|
||||||
Memory.WriteData(mem_info_addr, info);
|
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;
|
return CELL_OK;
|
||||||
}
|
}
|
@ -56,4 +56,12 @@ struct sys_vm_statistics {
|
|||||||
u32 physical_mem_size;
|
u32 physical_mem_size;
|
||||||
u32 physical_mem_used;
|
u32 physical_mem_used;
|
||||||
u64 timestamp;
|
u64 timestamp;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct sys_page_attr_t
|
||||||
|
{
|
||||||
|
u64 attribute;
|
||||||
|
u64 access_right;
|
||||||
|
u32 page_size;
|
||||||
|
u32 pad;
|
||||||
};
|
};
|
Loading…
x
Reference in New Issue
Block a user