mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 04:02:42 +01:00
sys: more constants
This commit is contained in:
parent
617d21fa84
commit
8fd3b26308
@ -31,6 +31,20 @@ enum : u64
|
||||
SYS_MEMORY_PAGE_SIZE_MASK = 0xf00ull,
|
||||
};
|
||||
|
||||
enum : u64
|
||||
{
|
||||
SYS_MEMORY_GRANULARITY_64K = 0x0000000000000200,
|
||||
SYS_MEMORY_GRANULARITY_1M = 0x0000000000000400,
|
||||
SYS_MEMORY_GRANULARITY_MASK = 0x0000000000000f00,
|
||||
};
|
||||
|
||||
enum : u64
|
||||
{
|
||||
SYS_MEMORY_PROT_READ_WRITE = 0x0000000000040000,
|
||||
SYS_MEMORY_PROT_READ_ONLY = 0x0000000000080000,
|
||||
SYS_MEMORY_PROT_MASK = 0x00000000000f0000,
|
||||
};
|
||||
|
||||
struct sys_memory_info_t
|
||||
{
|
||||
be_t<u32> total_user_memory;
|
||||
|
@ -114,10 +114,10 @@ error_code sys_mmapper_allocate_shared_memory(ppu_thread& ppu, u64 ipc_key, u64
|
||||
}
|
||||
|
||||
// Check page granularity
|
||||
switch (flags & SYS_MEMORY_PAGE_SIZE_MASK)
|
||||
switch (flags & SYS_MEMORY_GRANULARITY_MASK)
|
||||
{
|
||||
case 0:
|
||||
case SYS_MEMORY_PAGE_SIZE_1M:
|
||||
case SYS_MEMORY_GRANULARITY_1M:
|
||||
{
|
||||
if (size % 0x100000)
|
||||
{
|
||||
@ -126,7 +126,7 @@ error_code sys_mmapper_allocate_shared_memory(ppu_thread& ppu, u64 ipc_key, u64
|
||||
|
||||
break;
|
||||
}
|
||||
case SYS_MEMORY_PAGE_SIZE_64K:
|
||||
case SYS_MEMORY_GRANULARITY_64K:
|
||||
{
|
||||
if (size % 0x10000)
|
||||
{
|
||||
@ -171,10 +171,10 @@ error_code sys_mmapper_allocate_shared_memory_from_container(ppu_thread& ppu, u6
|
||||
}
|
||||
|
||||
// Check page granularity.
|
||||
switch (flags & SYS_MEMORY_PAGE_SIZE_MASK)
|
||||
switch (flags & SYS_MEMORY_GRANULARITY_MASK)
|
||||
{
|
||||
case 0:
|
||||
case SYS_MEMORY_PAGE_SIZE_1M:
|
||||
case SYS_MEMORY_GRANULARITY_1M:
|
||||
{
|
||||
if (size % 0x100000)
|
||||
{
|
||||
@ -183,7 +183,7 @@ error_code sys_mmapper_allocate_shared_memory_from_container(ppu_thread& ppu, u6
|
||||
|
||||
break;
|
||||
}
|
||||
case SYS_MEMORY_PAGE_SIZE_64K:
|
||||
case SYS_MEMORY_GRANULARITY_64K:
|
||||
{
|
||||
if (size % 0x10000)
|
||||
{
|
||||
@ -240,9 +240,9 @@ error_code sys_mmapper_allocate_shared_memory_ext(ppu_thread& ppu, u64 ipc_key,
|
||||
return CELL_EALIGN;
|
||||
}
|
||||
|
||||
switch (flags & SYS_MEMORY_PAGE_SIZE_MASK)
|
||||
switch (flags & SYS_MEMORY_GRANULARITY_MASK)
|
||||
{
|
||||
case SYS_MEMORY_PAGE_SIZE_1M:
|
||||
case SYS_MEMORY_GRANULARITY_1M:
|
||||
case 0:
|
||||
{
|
||||
if (size % 0x100000)
|
||||
@ -252,7 +252,7 @@ error_code sys_mmapper_allocate_shared_memory_ext(ppu_thread& ppu, u64 ipc_key,
|
||||
|
||||
break;
|
||||
}
|
||||
case SYS_MEMORY_PAGE_SIZE_64K:
|
||||
case SYS_MEMORY_GRANULARITY_64K:
|
||||
{
|
||||
if (size % 0x10000)
|
||||
{
|
||||
|
@ -892,6 +892,7 @@ void fmt_class_string<CellPrxError>::format(std::string& out, u64 arg)
|
||||
STR_CASE(CELL_PRX_ERROR_UNDEFINED_SYMBOL);
|
||||
STR_CASE(CELL_PRX_ERROR_UNSUPPORTED_RELOCATION_TYPE);
|
||||
STR_CASE(CELL_PRX_ERROR_ELF_IS_REGISTERED);
|
||||
STR_CASE(CELL_PRX_ERROR_NO_EXIT_ENTRY);
|
||||
}
|
||||
|
||||
return unknown;
|
||||
|
Loading…
Reference in New Issue
Block a user