From f13822407654c72a2c2c84065ff06103cc6f5f51 Mon Sep 17 00:00:00 2001 From: chaoskagami Date: Sun, 19 Jun 2016 17:41:56 -0400 Subject: [PATCH] Comments --- source/patch/reboot.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/patch/reboot.c b/source/patch/reboot.c index 6d36ba8..95a5bfe 100644 --- a/source/patch/reboot.c +++ b/source/patch/reboot.c @@ -73,7 +73,12 @@ patch_reboot() fprintf(stderr, "reboot: TWLF @ %x\n", pos_twl); fprintf(stderr, "reboot: AGBF @ %x\n", pos_agb); - uint8_t *mem = (uint8_t *)0x01FF8000; // 0x8000 space that will be resident. + uint8_t *mem = (uint8_t *)0x01FF8000; // 0x8000 space that will be resident. This is AXI WRAM. We have about 0x3700 bytes here. + // According to 3dbrew, this space's props from userland: + // [L2L] VA fff00000..fff20000 -> PA 1ff80000..1ffa0000 [ X ] [ Priv: R-, User: -- ] + // It can be executed by the system but not written (and can only be executed with privs) + // This seems to be the perfect place to stick some code to be resident in memory. Beyond this, + // it might be needed to replace a svc call to access it. I'm rather sure that NTR does this. *pos_native = (uint32_t)mem; memcpy(mem, L"sdmc:", 10); -- 2.39.5