10 Commits

Author SHA1 Message Date
Mikael Ågren
7755716b1e
Format c code 2025-04-11 11:55:04 +02:00
Mikael Ågren
801fee2ef0
testloadapp: Print syscall return codes on error 2025-04-11 09:38:05 +02:00
Michael Cardell Widerkrantz
a3bdc73efa
fw: Simplify starting management app
- In state INITIAL: Register allowed app digest early for the default
  case where we start from flash slot 0. Transition to LOAD_FLASH_MGMT.

- Introduce new state FW_STATE_LOAD_FLASH_MGMT which loads an app from
  flash slot 0 and registers app as a prospective management app.

- Rely on ordinary verification in state START to actually do the
  verification of the prospective management app.
2025-04-11 09:38:04 +02:00
Mikael Ågren
b865111c0f
fw: Add pointer argument NULL checks 2025-04-11 09:38:00 +02:00
Michael Cardell Widerkrantz
dd641118b8
fw: Use BLAKE2s functions from tkey-libs
Instead of using the firmware's own copy of BLAKE2s functions, use the
functions from tkey-libs.
2025-04-11 09:37:57 +02:00
Michael Cardell Widerkrantz
f87a70b87a
Import tag fw-3 of tkey-libs
- Use tag fw-3 from https://github.com/tillitis/tkey-libs/

- New tkey-libs also affects testloadapp which means new
  allowed_app_digest and new default_partition.bin.
2025-04-11 09:37:57 +02:00
Michael Cardell Widerkrantz
98f852b27b
fw: testloadapp: Add reset to client loading 2025-04-11 09:37:55 +02:00
Michael Cardell Widerkrantz
4c29de23dc
Update length and digest of testloadapp 2025-04-11 09:37:52 +02:00
Mikael Ågren
b837eec9e6
fw: Remove TK1_SYSCALL_REG_MGMT
Validate preload API access using the fixed, pre-calculated app digest
instead of letting an app register itself as a management app.
2025-04-11 09:37:49 +02:00
Michael Cardell Widerkrantz
f2b78be4cb
Add start of pre-loaded app from flash
Based on earlier code by Daniel Jobson <jobson@tillitis.se> now
integrated into the new world order.

Co-authored-by: Mikael Ågren <mikael@tillitis.se>
Co-authored-by: Daniel Jobson <jobson@tillitis.se>
2025-04-08 11:00:59 +02:00