Implement simple uart-based updater for the bootrom #2267
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In Keystone (https://github.com/keystone-enclave/keystone), we'd like to be able to run automated CI tests for all of our platforms to make sure that code changes don't break things, as much as possible. One difficulty is that many boards don't support updating firmware remotely. For CVA6 specifically, the firmware update process involves removing the microSD card, flashing a new image, and inserting it again. This does not work well for our remote tests.
This PR implements a simple UART-based updater in the bootrom. By hitting a key during boot, a user can then transfer an image of a specific size directly to memory and boot it. We plan to transfer a uboot image with TFTP capabilities, allowing us to then quickly flash the much bigger OS image as well.