Move kboot related code to shared/kboot.[ch] because it'll be reused by the firmwares of the add-ons.

This commit is contained in:
László Monda
2017-09-22 01:10:29 +02:00
parent 36be965db9
commit 11d9e85cb7
3 changed files with 26 additions and 24 deletions

12
shared/kboot.c Normal file
View File

@@ -0,0 +1,12 @@
#include "kboot.h"
void JumpToKboot(void) {
uint32_t runBootloaderAddress;
void (*runBootloader)(void *arg);
// Read the function address from the ROM API tree.
runBootloaderAddress = **(uint32_t **)(0x1c00001c);
runBootloader = (void (*)(void * arg))runBootloaderAddress;
runBootloader(NULL);
}