mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-12-09 22:05:45 -05:00
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:
parent
14e4cd09c9
commit
e935195846
8 changed files with 51 additions and 11 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue