driver: Advance the eRoT's own floor when the update agent asks

The counterpart to settle_self_update's hold: commit_self_svn_floor reads
the SVN the confirmed session recorded, advances the eRoT's floor, and
closes the session. The caller runs it when the FD reports
SvnCommitPending, and answers the update agent with what comes back: done
on Ok, refused on Err. The request's own SVN is not read; the session is
what says which SVN the floor may take.

Refused unless the session is confirmed and still open, so a request with
nothing behind it cannot move the floor: no image has proven itself at
that SVN.

Safe to repeat across the crash window between the advance and the close.
advance is a no-op at or below the floor, so a request repeated after a
crash finishes the close. A repeat after the session is closed is refused,
so an answer that never reached the update agent leaves its retry refused
with the floor already where it asked. A floor that cannot take the SVN
leaves the session open, so the update agent's next request tries again
instead of losing the advance.

Takes the session and the floor directly, as settle_self_update does.
Neither is board wiring yet.

Assisted-by: Claude
3 files changed
tree: b5456e5f2980a7d2b4a3228177d6d637ceaf7334
  1. .github/
  2. docs/
  3. drivers/
  4. hal/
  5. openprot/
  6. patches/
  7. platform/
  8. presubmit/
  9. services/
  10. target/
  11. third_party/
  12. tools/
  13. util/
  14. .bazelignore
  15. .bazelrc
  16. .bazelversion
  17. .clang-format
  18. .gitignore
  19. .semgrepignore
  20. BUILD.bazel
  21. CONTRIBUTING.md
  22. LICENSE
  23. MODULE.bazel
  24. MODULE.bazel.lock
  25. pw
  26. README.md
  27. rust-toolchain.toml
  28. workflows.json
README.md

OpenPRoT

Technical Charter

The OpenPRoT Technical Charter can be found at https://github.com/OpenPRoT/.github/blob/main/GOVERNANCE.md

Getting Started

NOTE: We are converting our build system to bazel. We recommend installing bazelisk to automatically manage bazel versions.

Available Tasks

You can run tasks using the Pigweed workflow launcher pw or bazel.

  • ./pw presubmit - Run presubmit checks: formatting, license checks, C/C++ header checks and clippy.
  • ./pw format - Run the code formatters.
  • bazel test //... - Run all tests.
  • bazel build //docs - Build documentation.

Development

The project is structured as a bazel module.

Requirements

  • Bazel. We recommend installing bazelisk to automatically manage bazel versions.

No additional tools are required - all dependencies are managed by bazel.