Fix derp in loader

This commit is contained in:
TuxSH 2017-05-17 22:11:09 +02:00
parent 1f300e1b75
commit 3b766de306
2 changed files with 2 additions and 5 deletions

View File

@ -23,9 +23,7 @@
#include "memory.h" #include "memory.h"
#include "cache.h" #include "cache.h"
extern u32 payloadSize; //Defined in start.s void main(u32 payloadSize)
void main(void)
{ {
void *payloadAddress = (void *)0x23F00000; void *payloadAddress = (void *)0x23F00000;

View File

@ -162,7 +162,6 @@ void loadPayload(u32 pressed, const char *payloadPath)
writeConfig(true); writeConfig(true);
memcpy(loaderAddress, loader_bin, loader_bin_size); memcpy(loaderAddress, loader_bin, loader_bin_size);
loaderAddress[1] = payloadSize;
backupAndRestoreShaHash(true); backupAndRestoreShaHash(true);
initScreens(); initScreens();
@ -170,7 +169,7 @@ void loadPayload(u32 pressed, const char *payloadPath)
flushDCacheRange(loaderAddress, loader_bin_size); flushDCacheRange(loaderAddress, loader_bin_size);
flushICacheRange(loaderAddress, loader_bin_size); flushICacheRange(loaderAddress, loader_bin_size);
((void (*)())loaderAddress)(); ((void (*)(u32))loaderAddress)(payloadSize);
} }
void payloadMenu(void) void payloadMenu(void)