Commit Graph

16 Commits

Author SHA1 Message Date
Julien Cretin
371b8af224 Move choice between prod and test storage to embedded_flash module
This way all users of storage can share the logic to choose between flash or RAM
storage depending on the "std" feature. This is needed because the store_latency
example assumes flash storage but is built when running `cargo test
--features=std`.
2020-12-10 18:04:25 +01:00
Julien Cretin
4253854cf1 Remove ram_storage feature
We don't need to build a production key without persistent storage. Tests and
fuzzing continue to use the std feature to use the RAM implementation (that does
sanity checks).
2020-12-10 13:06:05 +01:00
Julien Cretin
5673b9148f Use new persistent store library (and delete old) 2020-11-11 17:31:31 +01:00
Guillaume Endignoux
85a34ad085 Migrate import statements and macros to Rust 2018. 2020-09-24 11:28:24 +02:00
Guillaume Endignoux
ff73936a4d Fix imports in ctap, embedded_flash and lang-items. 2020-09-22 13:14:33 +02:00
Guillaume Endignoux
3c5e0c9cf1 Update src/ to the new libtock. 2020-08-07 15:09:07 +02:00
Julien Cretin
ba5caf0691 Filter syscall at platform-level instead of driver-level 2020-05-14 20:19:21 +02:00
Julien Cretin
cf31110922 Define the storage locations in the board 2020-05-13 15:17:35 +02:00
Julien Cretin
ecf02eb6ce Only store the storage location in the Kernel 2020-05-08 17:00:59 +02:00
Julien Cretin
3edb387615 Remove writable flash regions support
Removing support for writable flash regions permits to save 1 page in the binary
due to alignment constraints. It also permits to reduce the diff with libtock-rs
which doesn't support writable flash regions.

This commit also updates the `SyscallStorage` documentation.
2020-05-06 15:18:27 +02:00
Julien Cretin
1a337ab90d Fix typos in documentation 2020-03-23 12:57:27 +01:00
Julien Cretin
4a9cc3ce2e Add more details to the store documentation 2020-03-22 17:17:21 +01:00
Julien Cretin
b798b195f4 Return invariant status only and assert in test 2020-03-18 11:10:01 +01:00
Julien Cretin
61a4fb9784 Wipe sensitive data on entry deletion
When inserting (or replacing) entries in the store, the data may be marked as
sensitive. When that entry is deleted, the data is wiped by overwritting it with
zeroes. This may cost a few bytes of overhead per entry with sensitive data to
satisfy the constraint that words may only be written twice.
2020-03-10 14:27:07 +01:00
Julien Cretin
e52a671810 Support storing in RAM instead of flash
This permits to run without persistent storage. The benefit is that the board
doesn't implement a the syscall API in Tock. The disadvantage is that rebooting
the key will reset the storage.
2020-03-04 16:24:06 +01:00
Jean-Michel Picod
f91d2fd3db Initial commit 2020-01-30 11:47:29 +01:00