mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 17:01:24 +12:00
Rsx/vm: fix base addresses
This commit is contained in:
parent
f349695a75
commit
449888b9db
6 changed files with 8 additions and 9 deletions
|
@ -399,7 +399,7 @@ s32 _cellGcmInitBody(vm::pptr<CellGcmContextData> context, u32 cmdSize, u32 ioSi
|
||||||
// Create contexts
|
// Create contexts
|
||||||
|
|
||||||
u32 rsx_ctxaddr = 0;
|
u32 rsx_ctxaddr = 0;
|
||||||
for (u32 addr = 0x40000000; addr < 0xC0000000; addr += 0x10000000)
|
for (u32 addr = 0x30000000; addr < 0xC0000000; addr += 0x10000000)
|
||||||
{
|
{
|
||||||
if (vm::map(addr, 0x10000000, 0x400))
|
if (vm::map(addr, 0x10000000, 0x400))
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,7 +45,7 @@ error_code sys_mmapper_allocate_address(u64 size, u64 flags, u64 alignment, vm::
|
||||||
case 0x40000000:
|
case 0x40000000:
|
||||||
case 0x80000000:
|
case 0x80000000:
|
||||||
{
|
{
|
||||||
for (u64 addr = ::align<u64>(0x40000000, alignment); addr < 0xC0000000; addr += alignment)
|
for (u64 addr = ::align<u64>(0x30000000, alignment); addr < 0xC0000000; addr += alignment)
|
||||||
{
|
{
|
||||||
if (const auto area = vm::map(static_cast<u32>(addr), static_cast<u32>(size), flags))
|
if (const auto area = vm::map(static_cast<u32>(addr), static_cast<u32>(size), flags))
|
||||||
{
|
{
|
||||||
|
@ -272,7 +272,7 @@ error_code sys_mmapper_map_shared_memory(u32 addr, u32 mem_id, u64 flags)
|
||||||
|
|
||||||
const auto area = vm::get(vm::any, addr);
|
const auto area = vm::get(vm::any, addr);
|
||||||
|
|
||||||
if (!area || addr < 0x40000000 || addr >= 0xC0000000)
|
if (!area || addr < 0x30000000 || addr >= 0xC0000000)
|
||||||
{
|
{
|
||||||
return CELL_EINVAL;
|
return CELL_EINVAL;
|
||||||
}
|
}
|
||||||
|
@ -320,7 +320,7 @@ error_code sys_mmapper_search_and_map(u32 start_addr, u32 mem_id, u64 flags, vm:
|
||||||
|
|
||||||
const auto area = vm::get(vm::any, start_addr);
|
const auto area = vm::get(vm::any, start_addr);
|
||||||
|
|
||||||
if (!area || start_addr < 0x40000000 || start_addr >= 0xC0000000)
|
if (!area || start_addr < 0x30000000 || start_addr >= 0xC0000000)
|
||||||
{
|
{
|
||||||
return {CELL_EINVAL, start_addr};
|
return {CELL_EINVAL, start_addr};
|
||||||
}
|
}
|
||||||
|
@ -353,7 +353,7 @@ error_code sys_mmapper_unmap_shared_memory(u32 addr, vm::ptr<u32> mem_id)
|
||||||
|
|
||||||
const auto area = vm::get(vm::any, addr);
|
const auto area = vm::get(vm::any, addr);
|
||||||
|
|
||||||
if (!area || addr < 0x40000000 || addr >= 0xC0000000)
|
if (!area || addr < 0x30000000 || addr >= 0xC0000000)
|
||||||
{
|
{
|
||||||
return {CELL_EINVAL, addr};
|
return {CELL_EINVAL, addr};
|
||||||
}
|
}
|
||||||
|
|
|
@ -446,7 +446,7 @@ s32 sys_rsx_device_map(vm::ptr<u64> dev_addr, vm::ptr<u64> a2, u32 dev_id)
|
||||||
return CELL_EINVAL; // sys_rsx_device_map called twice
|
return CELL_EINVAL; // sys_rsx_device_map called twice
|
||||||
}
|
}
|
||||||
|
|
||||||
for (u32 addr = 0x40000000; addr < 0xC0000000; addr += 0x10000000)
|
for (u32 addr = 0x30000000; addr < 0xC0000000; addr += 0x10000000)
|
||||||
{
|
{
|
||||||
if (vm::map(addr, 0x10000000, 0x400))
|
if (vm::map(addr, 0x10000000, 0x400))
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,7 +21,7 @@ error_code sys_vm_memory_map(u32 vsize, u32 psize, u32 cid, u64 flag, u64 policy
|
||||||
}
|
}
|
||||||
|
|
||||||
// Look for unmapped space (roughly)
|
// Look for unmapped space (roughly)
|
||||||
for (u32 found = 0x40000000; found <= 0xC0000000 - vsize; found += 0x1000000)
|
for (u32 found = 0x30000000; found <= 0xC0000000 - vsize; found += 0x1000000)
|
||||||
{
|
{
|
||||||
// Try to map
|
// Try to map
|
||||||
if (const auto area = vm::map(found, vsize, flag))
|
if (const auto area = vm::map(found, vsize, flag))
|
||||||
|
|
|
@ -808,7 +808,6 @@ namespace vm
|
||||||
std::make_shared<block_t>(0xC0000000, 0x10000000), // video
|
std::make_shared<block_t>(0xC0000000, 0x10000000), // video
|
||||||
std::make_shared<block_t>(0xD0000000, 0x10000000), // stack
|
std::make_shared<block_t>(0xD0000000, 0x10000000), // stack
|
||||||
std::make_shared<block_t>(0xE0000000, 0x20000000), // SPU reserved
|
std::make_shared<block_t>(0xE0000000, 0x20000000), // SPU reserved
|
||||||
std::make_shared<block_t>(0x30000000, 0x10000000), // main extend
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1304,7 +1304,7 @@ void Emulator::Resume()
|
||||||
|
|
||||||
std::string dump;
|
std::string dump;
|
||||||
|
|
||||||
for (u32 i = 0x10000; i < 0x40000000;)
|
for (u32 i = 0x10000; i < 0x30000000;)
|
||||||
{
|
{
|
||||||
if (vm::check_addr(i))
|
if (vm::check_addr(i))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue