I'll look into it! The last thing we need is confusion. I'm just spending my day off here because hacking video games got me into computer science and I figure the best way to help is through explaining things as well as I can.
Let me break it down after looking over the repo as of 2:10 PM EST.
The value that you see printed is this
volatile u32 testVal = 0;
The DEADCAFE comes from this function here
static void kernel_entry() {
testVal = 0xDEADCAFE;
}
This function isn't called in the memchunkhax2 code though.
Instead it's set as manufactured vtable which has pointers to that function. Then that put in memory as part of a kernel object and the next pointer of the current memchunk is changed to point to that. When that pointer gets dereferenced, the kernel will execute the code of kernel_entry, which sets testVal to 0xDEADCAFE, then if it all worked you get to see that on your screen.
kernel_entry is just a test, but in the future it'll be the function that will allow downgrading, because it's happening in the space that the ARM11 kernel has access to.
Nifty, isn't it?