Move memory training code into it's own stage (fusee-mtc)

This commit is contained in:
hexkyz 2019-07-26 20:38:15 +01:00
parent 72dd25a99e
commit dc4dbe29ae
38 changed files with 18225 additions and 30 deletions

View file

@ -48,6 +48,7 @@
#include "exocfg.h"
#include "display/video_fb.h"
#include "lib/ini.h"
#include "lib/log.h"
#include "splash_screen.h"
#define u8 uint8_t
@ -57,7 +58,6 @@
#include "sept_secondary_01_enc.h"
#include "lp0fw_bin.h"
#include "emummc_kip.h"
#include "lib/log.h"
#undef u8
#undef u32
@ -484,7 +484,7 @@ uint32_t nxboot_main(void) {
FILE *boot0, *pk2file;
void *exosphere_memaddr;
exo_emummc_config_t exo_emummc_cfg;
/* Configure emummc or mount the real NAND. */
if (!nxboot_configure_emummc(&exo_emummc_cfg)) {
emummc = NULL;
@ -649,7 +649,7 @@ uint32_t nxboot_main(void) {
fatal_error("[NXBOOT] Failed to get TSEC key!\n");
}
}
/* Display splash screen. */
display_splash_screen_bmp(loader_ctx->custom_splash_path, (void *)0xC0000000);
@ -715,7 +715,6 @@ uint32_t nxboot_main(void) {
}
}
/* Select the right address for the warmboot firmware. */
if (MAILBOX_EXOSPHERE_CONFIGURATION->target_firmware < ATMOSPHERE_TARGET_FIRMWARE_400) {
warmboot_memaddr = (void *)0x8000D000;
@ -800,6 +799,9 @@ uint32_t nxboot_main(void) {
print(SCREEN_LOG_LEVEL_INFO, "[NXBOOT] Powering on the CCPLEX...\n");
/* Wait for the splash screen to have been displayed for as long as it should be. */
splash_screen_wait_delay();
/* Return the memory address for booting CPU0. */
return (uint32_t)exosphere_memaddr;
}