LV2/Loader: Fix kernel regions addresses #14523
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For a while I knew memory area addresses are inaccurate.
From what has been tested: if .ppu_private segment exists, it allocates its own 256MB block of 64k pages. If .rsx_image segment it allocates its own 256MB block of 1M pages. This seems to make sense because access rights (PPU/SPU/RSX flags) are block wide and not allocation specific.
At first, user64k is placed at
0x10000000
if no such special allocfation is made and user1m on0x30000000
. Adding ppu private and rsx image segment to the ELF causes this addresses to become0x30000000
and0x50000000
respectively.In #4522, the game tries to access a region of memory by mistake that would already be allocated on PS3 but not RPCS3 hence it crashes.
By fixing those addresses the game can be played and not crash anymore.
Fixes #4522.
Fixes #8491.
This also fixes some games broken with Debug Console Mode because now
user4k
region is 512MB long as opposed to 256MB. (because debug console has additional memory, some games use it onuser64k
)