fw: Add syscall TK1_SYSCALL_GET_APP_DATA

Add a new syscall to enable an app to get the data left for it by the
previous app in chain.

- Change testloadapp to leave some data for the next app to read.
- Call system call with:

  uint8_t next_app_data[RESET_DATA_SIZE];

  syscall(TK1_SYSCALL_GET_APP_DATA, (uint32_t)next_app_data, 0, 0);
This commit is contained in:
Michael Cardell Widerkrantz 2025-05-13 10:58:48 +02:00 committed by Mikael Ågren
parent 14e4cd09c9
commit e935195846
No known key found for this signature in database
GPG key ID: E02DA3D397792C46
8 changed files with 51 additions and 11 deletions

View file

@ -444,7 +444,19 @@ static enum state start_where(struct context *ctx)
{
assert(ctx != NULL);
// Where do we start? Read resetinfo 'startfrom'
debug_puts("resetinfo->type: ");
debug_putinthex(resetinfo->type);
debug_lf();
debug_puts(" ->app_digest: \n");
debug_hexdump(resetinfo->app_digest, RESET_DIGEST_SIZE);
debug_lf();
debug_puts(" ->next_app_data: \n");
debug_hexdump(resetinfo->next_app_data, RESET_DATA_SIZE);
debug_lf();
// Where do we start?
switch (resetinfo->type) {
case START_DEFAULT:
// fallthrough