mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 18:28:35 +12:00
sys_mmapper: Allow 0 alignment to mapping to fix Psl1ght homebrew booting
This commit is contained in:
parent
6f584049a2
commit
08d05e245d
1 changed files with 9 additions and 1 deletions
|
@ -33,6 +33,14 @@ s32 sys_mmapper_allocate_address(u64 size, u64 flags, u64 alignment, vm::ptr<u32
|
||||||
return CELL_ENOMEM;
|
return CELL_ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is a 'hack' / workaround for psl1ght, which gives us an alignment of 0, which is technically invalid,
|
||||||
|
// but apparently is allowed on actual ps3
|
||||||
|
// https://github.com/ps3dev/PSL1GHT/blob/534e58950732c54dc6a553910b653c99ba6e9edc/ppu/librt/sbrk.c#L71
|
||||||
|
if (!alignment && size == 0x10000000)
|
||||||
|
{
|
||||||
|
alignment = 0x10000000;
|
||||||
|
}
|
||||||
|
|
||||||
switch (alignment)
|
switch (alignment)
|
||||||
{
|
{
|
||||||
case 0x10000000:
|
case 0x10000000:
|
||||||
|
@ -317,7 +325,7 @@ s32 sys_mmapper_search_and_map(u32 start_addr, u32 mem_id, u64 flags, vm::ptr<u3
|
||||||
|
|
||||||
*alloc_addr = addr;
|
*alloc_addr = addr;
|
||||||
|
|
||||||
return CELL_ENOMEM;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 sys_mmapper_unmap_memory(u32 addr, vm::ptr<u32> mem_id)
|
s32 sys_mmapper_unmap_memory(u32 addr, vm::ptr<u32> mem_id)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue