-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
auxflash: make startup a lot faster.
The auxflash server was computing a SHA3 of every potentially occupied slot in the QSPI flash, only to compare it to _the stored SHA3_ and then compare it to _the expected SHA3_ and then throw it away. This has been causing Sidecar startup to be linear in the number of valid images that have ever been flashed to auxflash, up to 16. This change rearranges the logic, at least for startup. For each chunk, we now see if it even claims to have the right SHA. Only then do we compute the actual SHA to validate. This reduces an 11.6s delay observed on one Sidecar to just over 1s, and knocks 6s off the boot (something else is still delaying for 5s). I haven't changed the behavior of the externally exposed `read_slot_checksum` operation, because it has no documentation and I can't figure out what it's used for, so I'm not sure I would get the semantics right or know how to test it. Fixes #1955.
- Loading branch information
Showing
2 changed files
with
50 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters