diff --git a/src/kboot.c b/src/kboot.c index 5e8dc06b..76cc6f9e 100644 --- a/src/kboot.c +++ b/src/kboot.c @@ -635,6 +635,7 @@ int kboot_boot(void *kernel) next_stage.args[1] = 0; next_stage.args[2] = 0; next_stage.args[3] = 0; + next_stage.args[4] = 0; next_stage.restore_logo = false; return 0; diff --git a/src/main.c b/src/main.c index e8fece08..ef4e4028 100644 --- a/src/main.c +++ b/src/main.c @@ -168,8 +168,8 @@ void m1n1_main(void) printf("Vectoring to next stage...\n"); - next_stage.entry(next_stage.args[0], next_stage.args[1], next_stage.args[2], - next_stage.args[3]); + next_stage.entry(next_stage.args[0], next_stage.args[1], next_stage.args[2], next_stage.args[3], + next_stage.args[4]); panic("Next stage returned!\n"); } diff --git a/src/proxy.c b/src/proxy.c index 141ffe50..f01693ad 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -44,8 +44,8 @@ int proxy_process(ProxyRequest *request, ProxyReply *reply) return 1; case P_CALL: { generic_func *f = (generic_func *)request->args[0]; - reply->retval = - f(request->args[1], request->args[2], request->args[3], request->args[4]); + reply->retval = f(request->args[1], request->args[2], request->args[3], + request->args[4], request->args[5]); break; } case P_GET_BOOTARGS: @@ -90,7 +90,7 @@ int proxy_process(ProxyRequest *request, ProxyReply *reply) usb_hpm_restore_irqs(1); iodev_console_flush(); next_stage.entry = (generic_func *)request->args[0]; - memcpy(next_stage.args, &request->args[1], 4 * sizeof(u64)); + memcpy(next_stage.args, &request->args[1], 5 * sizeof(u64)); next_stage.restore_logo = true; return 1; case P_GL1_CALL: diff --git a/src/utils.h b/src/utils.h index 37f3e3eb..d8e3c125 100644 --- a/src/utils.h +++ b/src/utils.h @@ -415,11 +415,11 @@ static inline int poll32(u64 addr, u32 mask, u32 target, u32 timeout) return -1; } -typedef u64(generic_func)(u64, u64, u64, u64); +typedef u64(generic_func)(u64, u64, u64, u64, u64); struct vector_args { generic_func *entry; - u64 args[4]; + u64 args[5]; bool restore_logo; };