Permalink
Browse files

remove code i used for testing memory and backup payload for recovery…

… mode (#93)

* remove test code

backup payload into dram so we can jump back to it when done if there is no reinx bin on SD card
  • Loading branch information...
EliseZeroTwo authored and Reisyukaku committed Dec 21, 2018
1 parent 4b0eaef commit 94e454bdff497e3839171f18a74b9d07a4c1761b
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/firmware.c
@@ -516,7 +516,7 @@ void firmware() {
gfx_clear_color(&gfx_ctxt, 0xFF000000);
gfx_con_init(&gfx_con, &gfx_ctxt);
gfx_con_setcol(&gfx_con, DEFAULT_TEXT_COL, 0, 0);
u8 fo[] = {0xF0, 0xE0, 0xD0, 0x00};

if (!sdMount()) {
error("Failed to init SD card!\n");
print("Press POWER to power off, or any other key to continue without SD.\n");
@@ -542,6 +542,12 @@ void firmware() {
if(fopen("/ReiNX/Recovery.bin", "rb") != 0) {
fread((void*)PAYLOAD_ADDR, fsize(), 1);
fclose();
if(!fopen("/ReiNX.bin", "rb")) {
memcpy((void *)0x82000000, (void *)0x40008000, 0x1ed58);
} else {
PMC(APBDEV_PMC_SCRATCH49) = 69;
fclose();
}
sdUnmount();
CLOCK(CLK_RST_CONTROLLER_CLK_OUT_ENB_V) |= 0x400; // Enable AHUB clock.
CLOCK(CLK_RST_CONTROLLER_CLK_OUT_ENB_Y) |= 0x40; // Enable APE clock.

0 comments on commit 94e454b

Please sign in to comment.