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

@ -9,10 +9,9 @@
#include "partition_table.h"
#include "preload_app.h"
#include "reset.h"
#include "storage.h"
#include "../tk1/reset.h"
#include "../tk1/syscall_num.h"
#include "syscall_num.h"
// clang-format off
static volatile uint32_t *udi = (volatile uint32_t *)TK1_MMIO_TK1_UDI_FIRST;
@ -100,6 +99,10 @@ int32_t syscall_handler(uint32_t number, uint32_t arg1, uint32_t arg2,
case TK1_SYSCALL_STATUS:
return part_get_status();
case TK1_SYSCALL_GET_APP_DATA:
// arg1 next_app_data
return reset_data((uint8_t *)arg1);
default:
assert(1 == 2);
}