Commit Graph

4 Commits

Author SHA1 Message Date
Wyatt Hepler
0a22358554 pw_kvs: Verify checksum on write
- Replace placeholder VerifyEntry function with the real verification
  function, VerifyChecksumInFlash.
- Have VerifyChecksumInFlash read everything from flash, not just the
  value.
- Fix missing bytes_to_read updates.

Change-Id: If856c60dee710bea128684fd1bb22d3e7fc62793
2020-02-05 06:35:08 +00:00
Wyatt Hepler
6e3a83b61f pw_kvs: Get checksums working; enable test
- Allow checksums to verify data larger than their internal state. This
  facilitates using a CRC16 in a uint32_t.
- Move checksum functions to the EntryHeader class, since it ultimately
  stores the checksums and is included with it.
- Enable one checksum test. Further tests are needed.
- Make some tweaks to the Get overload for objects.

Change-Id: I989b72905e140794f75c8f8619aaab1623f6f195
2020-02-04 16:35:40 -08:00
Keir Mierle
8c352dc5dd pw_kvs: Implement KVS load from flash
This starts the implementation of loading the KVS from flash. Much
remains to do before this is done. This patch also includes some
extensions to how the tests are handled, to make it easier to
instantiate multiple KVS and flash backends for testing.

Changes is this CL to potentially split out:
- KVS dump command to log contents
- Re-enabling function and file display in log (useful!)
- Hex dumping to log

Change-Id: Ib1b25a01aa29eec3d3acd09e40205c23ded7bf6a
2020-02-03 23:21:15 +00:00
Wyatt Hepler
4da1fcb4b2 pw_kvs: Initial commit of new KVS design
Builds, but lots more work needed.

Fun fact: this code was written collaboratively in a Google Doc.

Change-Id: I8a89c5d0fdc71ec28cf432350e65d17e24a6f25c
2020-01-31 14:38:37 -08:00