mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 11:09:56 -04:00
Check the selftest's physical memory limit against the title's own pool size.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -406,7 +406,10 @@ static void check_memory(void) {
|
||||
CHECK(q.state == 0 && q.base == g->alias.base && q.size == g->alias.size, "QueryMemory on the free alias region");
|
||||
CHECK(mem_map_physical(a, 0x1000) == 0 && LD64(a + 0x10) == 0 && mem_unmap_physical(a, 0x1000) == 0,
|
||||
"remapped physical memory is not zeroed");
|
||||
CHECK(mem_map_physical(a, 0x100000000ull) == 0x10801, "MapPhysicalMemory beyond the pool is not LimitReached");
|
||||
// One page more than the whole pool (GetInfo 6), so the request is over the limit whatever the title's pool is.
|
||||
mem_info(6, &v);
|
||||
CHECK(mem_map_physical(a, ((v + 0xFFFull) & ~0xFFFull) + 0x1000) == 0x10801,
|
||||
"MapPhysicalMemory beyond the pool is not LimitReached");
|
||||
mem_query(RT_HOSTFN_BASE + 0x40, &q);
|
||||
CHECK(q.state == 0x10 && q.base == RT_HOSTFN_BASE, "QueryMemory on the host-function window");
|
||||
mem_query(g->alias.base + g->alias.size + 0x1000, &q);
|
||||
|
||||
Reference in New Issue
Block a user