10 Commits

Author SHA1 Message Date
Michael Cardell Widerkrantz
1636b40c71
fw: Implement redundancy of partition table 2025-04-11 09:37:52 +02:00
Mikael Ågren
f24c7ea515
fw: Add checksum to partition table
Refuse to boot if blake2s digest over the partition table does not match
digest stored on flash
2025-04-11 09:37:51 +02:00
Mikael Ågren
930d204e9f
fw: Remove storage area address and size from partition table
Instead we calculate start addresses from area index and use fixed size.
2025-04-11 09:37:50 +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
Mikael Ågren
715d792d86
fw: Remove pre loaded app auth and status from partition table 2025-04-11 09:37:49 +02:00
Mikael Ågren
099fe46e1f
Do note delete or corrupt preloaded app 0 when storing preloaded app 1 2025-04-11 09:37:46 +02:00
Mikael Ågren
9018ae5b33
Store app digest and signature for each app slot 2025-04-11 09:37:45 +02:00
Mikael Ågren
ac5c2aef86
fw: Add second pre-loaded app slot in flash 2025-04-11 09:37:44 +02:00
Michael Cardell Widerkrantz
9316886c88
Introduce symbolic names for present and present & authenticated
A preloaded app can be:

- present and not yet authenticated (0x01)
- present and authenticated (0x02)

Let's use symbolic names for these.
2025-04-11 08:43:40 +02:00
Michael Cardell Widerkrantz
20b008d20e
Add filesystem code and storage syscalls
Adds syscalls:

- ALLOCATE_AREA
- DEALLOCATE_AREA
- WRITE_DATA
- READ_DATA

and code to access the filesystem and the flash over SPI.

Based on original work by Daniel Jobson <jobson@tillitis.see> for
these files:

- auth_app.[ch]
- flash.[ch]
- spi.[ch]
- partition_table.[ch]
- rng.[ch]
- storage.[ch]

which are used with small changes to integrate with the new syscall
method.

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