diff --git a/boot2.c b/boot2.c index a60c339..ed6be54 100644 --- a/boot2.c +++ b/boot2.c @@ -361,7 +361,7 @@ void boot2_run(u32 tid_hi, u32 tid_lo) { return; } -void boot2_ipc(volatile ipc_request *req) +int boot2_ipc(volatile ipc_request *req) { switch (req->req) { case IPC_BOOT2_RUN: @@ -373,8 +373,20 @@ void boot2_ipc(volatile ipc_request *req) } else { ipc_post(req->code, req->tag, 1, -1); } + return 0; 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: gecko_printf("IPC: unknown SLOW BOOT2 request %04X\n", req->req); } + return 1; } diff --git a/ipc.c b/ipc.c index 8368352..02f5faf 100644 --- a/ipc.c +++ b/ipc.c @@ -134,8 +134,7 @@ static int process_slow(volatile ipc_request *req) aes_ipc(req); break; case IPC_DEV_BOOT2: - boot2_ipc(req); - return 0; + return boot2_ipc(req); break; case IPC_DEV_PPC: powerpc_ipc(req); diff --git a/ipc.h b/ipc.h index 4b2d9f5..b1fa814 100644 --- a/ipc.h +++ b/ipc.h @@ -56,6 +56,7 @@ #define IPC_AES_DECRYPT 0x0003 #define IPC_BOOT2_RUN 0x0000 +#define IPC_BOOT2_TMD 0x0001 #define IPC_PPC_BOOT 0x0000