mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-08-14 01:15:52 -04:00
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:
parent
970668a47b
commit
dd147657a4
4 changed files with 28 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue