diff --git a/source/arm11/firm.c b/source/arm11/firm.c index b6450e2..da4e886 100644 --- a/source/arm11/firm.c +++ b/source/arm11/firm.c @@ -29,8 +29,8 @@ { *((vu32*)A11_FALLBACK_ENTRY) = 0; - // Answer ARM0 REG_PXI_SYNC = 0; // Disable all IRQs + // Tell ARM9 we are ready while(REG_PXI_CNT & PXI_SEND_FIFO_FULL); REG_PXI_SEND = 0xA8E4u; diff --git a/source/arm9/firm.c b/source/arm9/firm.c index 5662e80..e58545b 100644 --- a/source/arm9/firm.c +++ b/source/arm9/firm.c @@ -110,8 +110,10 @@ u32 entry11 = firm_hdr->entrypointarm11; + REG_PXI_SYNC = 0; // Disable all IRQs while(1) { + // Wait for the ARM11 to be ready before copying sections while(REG_PXI_CNT & PXI_RECV_FIFO_EMPTY); if(REG_PXI_RECV == 0xA8E4u) break; } @@ -151,13 +153,12 @@ REG_NDMA2_CNT & NDMA_ENABLE || REG_NDMA3_CNT & NDMA_ENABLE); // Tell ARM11 its entrypoint - REG_PXI_SYNC = 0; // Disable all IRQs while(REG_PXI_CNT & PXI_SEND_FIFO_FULL); REG_PXI_SEND = entry11; while(1) { - // Wait for ARM111 to confirm it received the entrypoint + // Wait for the ARM111 to confirm it received the entrypoint while(REG_PXI_CNT & PXI_RECV_FIFO_EMPTY); if(REG_PXI_RECV == 0x94C6u) break; }