Hardcoding it causes preload_check_valid_app and therefore preload_store
to assume there already is an app installed. Causing the
TK1_SYSCALL_PRELOAD_STORE syscall to fail.
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.
Decide where to start from with data from resetinfo part of FW_RAM.
Co-authored-by: Jonas Thörnblad <jonas@tillitis.se>
Co-authored-by: Mikael Ågren <mikael@tillitis.se>
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>
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>
- Merge Makefile and Makefile.include into Makefile
- Format structure
- Remove unused variables, targets etc.
- Add missing check if it is ok to send data to the FPGA.
- Remove 'baud rate calculator.ods'
- Update encode_usb_strings.py to generate strings for
CdcCtrlInterfaceDesc, CdcDataInterfaceDesc,
FidoHidInterfaceDesc, TkeyCtrlInterfaceDesc.
Also store generated strings in UTF-16 instead of hex.
- Update usb_strings.h to match new encode_usb_strings.py
output.
- Remove unused struct SetupReqBuf.
This is an import of the fw-2 tag of tkey-libs.
We import the entire tkey-libs repo minus dot files into the
tillitis-key1 repo to make it very simple not to make mistakes
regarding which firmware tag depends on which tkey-libs tag,
especially considering locking down with NVCM.
Please see README for information about developing with another
tkey-libs or how to import future tkey-libs.
Since tkey-libs is now a part of the repo we also add tkey-libs to the
clean_fw target.
From now on the canonical home of the tk1_mem.h header file describing
the memory map of the TKey lives in tkey-libs:
https://github.com/tillitis/tkey-libs
Build firmware, testfw and testapp using tkey-libs:
https://github.com/tillitis/tkey-libs
In an effort not to have more or less identical code maintained in two
places, use tkey-libs when developing firmware, testfw and the
firmware testapp, too.
You can place the Git directory directly under hw/application_fpga
and then an ordinary make should work.
Or build with:
make LIBDIR=/path/to/tkey-libs
Co-authored-by: Mikael Ågren <mikael@tillitis.se>
- Revise firmware implementation notes
- Document how to do fw syscalls
- Document how to trigger a syscall function in the firmware, how to
pass arguments, what the caller is responsible for and what is
returned.
- Describe hardware syscall implementation
- how the syscall interrupts are triggered,
- the hardware privilege escalation,
- the UDS protection.
Co-authored-by: Daniel Jobson <jobson@tillitis.se>
Co-authored-by: Michael Cardell Widerkrantz <mc@tillitis.se>