[bazel, qemu] Implement QEMU Rescue 1.0 (Serial Break) & RESET strapping #28449
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.
See the commit messages for more details - these PRs introduce the relevant opentitantool support for the
RESET
strapping used by tests (which already existed but just was not defined in the JSON file), and more importantly implements UART RX break for QEMU via the QEMU monitor to allow use of Rescue 1.0 (Serial Break) flows. This is particularly important for e.g. emulating ownership transfer flows via UART.Note that the implementation of break goes through the QEMU Monitor and not the UART due to QEMU's lack of break support on different CharDev types. Also note that we use a custom implementation on top of these break events to support the toggling of RX break so that we can hold it down like a strap, as the ROM_EXT rescue protocol relies on reading the UART oversampling register to be able to detect serial breaks as rescue like a strap. See more relevant discussion here: lowRISC/qemu#212
To test that this works, this PR implements QEMU environments for all E2E boot service tests (not including ownership transfer, which is separate), except for the
boot_service_wakeup
test which is not expected to pass because of lacking low power entry/exitpwrmgr
emulation in QEMU.