Fix SPU mapped memory page size

This commit is contained in:
Eladash 2021-03-19 20:07:35 +02:00 committed by Ivan
parent c4a8bb26fb
commit 1864419561
3 changed files with 4 additions and 4 deletions

View File

@ -1724,12 +1724,12 @@ spu_thread::spu_thread(lv2_spu_group* group, u32 index, std::string_view name, u
if (!group)
{
ensure(vm::get(vm::spu)->falloc(vm_offset(), SPU_LS_SIZE, &shm));
ensure(vm::get(vm::spu)->falloc(vm_offset(), SPU_LS_SIZE, &shm, 0x200));
}
else
{
// 0x1000 indicates falloc to allocate page with no access rights in base memory
ensure(vm::get(vm::spu)->falloc(vm_offset(), SPU_LS_SIZE, &shm, 0x1000));
ensure(vm::get(vm::spu)->falloc(vm_offset(), SPU_LS_SIZE, &shm, 0x1200));
}
// Try to guess free area

View File

@ -1642,7 +1642,7 @@ namespace vm
nullptr, // rsx context
std::make_shared<block_t>(0xC0000000, 0x10000000, 0x220), // video
std::make_shared<block_t>(0xD0000000, 0x10000000, 0x131), // stack
std::make_shared<block_t>(0xE0000000, 0x20000000), // SPU reserved
std::make_shared<block_t>(0xE0000000, 0x20000000, 0x200), // SPU reserved
};
std::memset(g_reservations, 0, sizeof(g_reservations));

View File

@ -101,7 +101,7 @@ namespace vm
bool try_alloc(u32 addr, u8 flags, u32 size, std::shared_ptr<utils::shm>&&);
public:
block_t(u32 addr, u32 size, u64 flags = 0);
block_t(u32 addr, u32 size, u64 flags);
~block_t();