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
8347ae7c8e
fw: Add status syscall for flash status
...
Add a way of reporting invalid partition table copy through a new
syscall for TKey status.
2025-04-11 09:37:53 +02:00
Michael Cardell Widerkrantz
e1d25f6d74
fw: Indicate which partition table used by return value when reading
...
- Return 0: Slot 0 used.
- Return 1: Slot 1 used, indicating slot 0 broken!
2025-04-11 09:37:53 +02:00
Michael Cardell Widerkrantz
1636b40c71
fw: Implement redundancy of partition table
2025-04-11 09:37:52 +02:00
Michael Cardell Widerkrantz
03625b312d
Remove commented out code about creating partition table
2025-04-11 09:37:51 +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
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