mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-09 22:56:35 +00:00
kern: reflect nintendo cache management behavior for initial processes
This commit is contained in:
parent
54dde406bc
commit
6ad3219656
1 changed files with 5 additions and 3 deletions
|
@ -180,9 +180,11 @@ namespace ams::kern {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Flush caches. */
|
/* Flush caches. */
|
||||||
/* NOTE: official kernel does an entire cache flush by set/way here, which is incorrect as other cores are online. */
|
/* NOTE: This seems incorrect according to arm spec, which says not to flush via set/way after boot. */
|
||||||
/* We will simply flush by virtual address, since that's what ARM says is correct to do. */
|
/* However, Nintendo flushes the entire cache here and not doing so has caused reports of abort with ESR_EL1 */
|
||||||
MESOSPHERE_R_ABORT_UNLESS(cpu::FlushDataCache(GetVoidPointer(address), params.code_num_pages * PageSize));
|
/* as 0x02000000 (unknown abort) to occur. */
|
||||||
|
MESOSPHERE_UNUSED(params);
|
||||||
|
cpu::FlushEntireDataCache();
|
||||||
cpu::InvalidateEntireInstructionCache();
|
cpu::InvalidateEntireInstructionCache();
|
||||||
|
|
||||||
return ResultSuccess();
|
return ResultSuccess();
|
||||||
|
|
Loading…
Reference in a new issue