[APT/Kernel] More fixing hacks

This commit is contained in:
wheremyfoodat 2023-04-19 23:11:29 +03:00
parent 98501c90d3
commit fecf038982
3 changed files with 15 additions and 12 deletions

View file

@ -51,6 +51,7 @@ void Kernel::setupIdleThread() {
std::memcpy(&mem.getFCRAM()[fcramIndex], idleThreadCode, sizeof(idleThreadCode));
t.entrypoint = codeAddress;
t.tlsBase = 0;
t.gprs[13] = 0; // Set SP & LR to 0 just in case. The idle thread should never access memory, but let's be safe
t.gprs[14] = 0;
t.gprs[15] = codeAddress;