utils: Expand vector_args from 4 to 5 arguments

This also expands the usual call/next stage functions to match.

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2022-03-09 20:36:24 +09:00
parent 963b74765c
commit 6a1a9bfc3c
4 changed files with 8 additions and 7 deletions

View file

@ -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;

View file

@ -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");
}

View file

@ -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:

View file

@ -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;
};