mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 01:38:37 +12:00
Fix shared memory page flags
TODO: From hw testing, it seems like sys_memory_get_page_attribute and sys_rsx_context_iomap check page size a little differently get_page_attribute() always go by area flags, sys_rsx_context_iomap checks page by the page granularity This means that if the area page size 64k, but shared memory is mapped with SYS_MEMORY_GRANULARITY_1M It can be mapped for rsxio, but the page attribute will indicate 64k page size :thonk: rsxio memory is verified to need 1m pages.
This commit is contained in:
parent
7470388e5a
commit
a43e7c172c
3 changed files with 18 additions and 6 deletions
|
@ -665,8 +665,14 @@ namespace vm
|
|||
}
|
||||
}
|
||||
|
||||
u32 block_t::alloc(const u32 orig_size, u32 align, const std::shared_ptr<utils::shm>* src)
|
||||
u32 block_t::alloc(const u32 orig_size, u32 align, const std::shared_ptr<utils::shm>* src, u64 flags)
|
||||
{
|
||||
if (!src)
|
||||
{
|
||||
// Use the block's flags
|
||||
flags = this->flags;
|
||||
}
|
||||
|
||||
vm::writer_lock lock(0);
|
||||
|
||||
// Determine minimal alignment
|
||||
|
@ -720,8 +726,14 @@ namespace vm
|
|||
return 0;
|
||||
}
|
||||
|
||||
u32 block_t::falloc(u32 addr, const u32 orig_size, const std::shared_ptr<utils::shm>* src)
|
||||
u32 block_t::falloc(u32 addr, const u32 orig_size, const std::shared_ptr<utils::shm>* src, u64 flags)
|
||||
{
|
||||
if (!src)
|
||||
{
|
||||
// Use the block's flags
|
||||
flags = this->flags;
|
||||
}
|
||||
|
||||
vm::writer_lock lock(0);
|
||||
|
||||
// Determine minimal alignment
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue