mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-10 01:28:44 +02:00
fix(kernel): map SCE protections to readable host pages
SCE_KERNEL_PROT_CPU_RW (0x02) and CPU_EXEC (0x04) include read access, but were translated to write-only and execute-only host pages. GPU read and write bits also need host access because the emulated GPU reads and writes guest memory from the CPU. Write-only mappings made the AGC driver reject guest data segments as unreadable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -66,9 +66,9 @@ int LinuxProtFromSce(int prot) {
|
||||
throw std::invalid_argument("Unsupported memory protection bits");
|
||||
}
|
||||
int result = PROT_NONE;
|
||||
if (prot & 1) result |= PROT_READ;
|
||||
if (prot & 2) result |= PROT_WRITE;
|
||||
if (prot & 4) result |= PROT_EXEC;
|
||||
if (prot & 0x13) result |= PROT_READ;
|
||||
if (prot & 0x22) result |= PROT_READ | PROT_WRITE;
|
||||
if (prot & 4) result |= PROT_READ | PROT_EXEC;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user