Introduce syscalls to change preloaded app

Introduce syscalls:

- TK1_SYSCALL_PRELOAD_STORE
- TK1_SYSCALL_PRELOAD_STORE_FIN
- TK1_SYSCALL_PRELOAD_DELETE
- TK1_SYSCALL_REG_MGMT = 11

Change preload_store_finalize() not to take USS arg. Unused for
preloaded apps.
This commit is contained in:
Michael Cardell Widerkrantz 2025-03-18 14:56:15 +01:00 committed by Mikael Ågren
parent 970668a47b
commit dd147657a4
No known key found for this signature in database
GPG key ID: E02DA3D397792C46
4 changed files with 28 additions and 7 deletions

View file

@ -75,8 +75,7 @@ int preload_store(struct partition_table *part_table, uint32_t offset,
return flash_write_data(address, data, size);
}
int preload_store_finalize(struct partition_table *part_table, bool use_uss,
uint8_t *uss, size_t app_size, uint8_t to_slot)
int preload_store_finalize(struct partition_table *part_table, size_t app_size, uint8_t to_slot)
{
/* Check if we are allowed to store */
if (!mgmt_app_authenticate(&part_table->mgmt_app_data)) {
@ -88,8 +87,6 @@ int preload_store_finalize(struct partition_table *part_table, bool use_uss,
return -1;
}
// TODO: Maybe add the uss fields
if (app_size == 0 || app_size > SIZE_PRE_LOADED_APP) {
return -2;
}