restoremii: make sure bootmii-boot2 is installed

update armboot.bin and ppcboot.elf (mini will panic otherwise)
and someone please look at my wait_any_key() change.
This commit is contained in:
Sven Peter 2009-04-07 21:27:34 +02:00 committed by bushing
parent b409c9694e
commit 7715064060
3 changed files with 15 additions and 3 deletions

14
boot2.c
View File

@ -361,7 +361,7 @@ void boot2_run(u32 tid_hi, u32 tid_lo) {
return; return;
} }
void boot2_ipc(volatile ipc_request *req) int boot2_ipc(volatile ipc_request *req)
{ {
switch (req->req) { switch (req->req) {
case IPC_BOOT2_RUN: case IPC_BOOT2_RUN:
@ -373,8 +373,20 @@ void boot2_ipc(volatile ipc_request *req)
} else { } else {
ipc_post(req->code, req->tag, 1, -1); ipc_post(req->code, req->tag, 1, -1);
} }
return 0;
break; break;
case IPC_BOOT2_TMD:
if (boot2_initialized) {
ipc_post(req->code, req->tag, 1, &boot2_tmd);
} else {
ipc_post(req->code, req->tag, 1, -1);
}
return 1;
break;
default: default:
gecko_printf("IPC: unknown SLOW BOOT2 request %04X\n", req->req); gecko_printf("IPC: unknown SLOW BOOT2 request %04X\n", req->req);
} }
return 1;
} }

3
ipc.c
View File

@ -134,8 +134,7 @@ static int process_slow(volatile ipc_request *req)
aes_ipc(req); aes_ipc(req);
break; break;
case IPC_DEV_BOOT2: case IPC_DEV_BOOT2:
boot2_ipc(req); return boot2_ipc(req);
return 0;
break; break;
case IPC_DEV_PPC: case IPC_DEV_PPC:
powerpc_ipc(req); powerpc_ipc(req);

1
ipc.h
View File

@ -56,6 +56,7 @@
#define IPC_AES_DECRYPT 0x0003 #define IPC_AES_DECRYPT 0x0003
#define IPC_BOOT2_RUN 0x0000 #define IPC_BOOT2_RUN 0x0000
#define IPC_BOOT2_TMD 0x0001
#define IPC_PPC_BOOT 0x0000 #define IPC_PPC_BOOT 0x0000