Skip to content

Conversation

@cfrantz
Copy link
Contributor

@cfrantz cfrantz commented Mar 25, 2025

Rescue mode should not automatically reboot the chip after processing a data transfer. Instead, the chip should wait for a subsequent command or a reboot request via the REBO command.

This mode of operation is more aligned with how alternate rescue protocols (like USB-DFU) work. Making this behavior consistent among the supported protocols allows for easier test automation and configuration flows.

Addresses: #26481

@cfrantz cfrantz requested review from jesultra and moidx March 25, 2025 18:39
@cfrantz cfrantz requested review from a team as code owners March 25, 2025 18:39
@cfrantz cfrantz requested review from jon-flatley and removed request for a team and jon-flatley March 25, 2025 18:39
self.uart.set_break(true)?;
}
EntryMode::None => {
self.uart.set_break(true)?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the ROM_EXT print its banner again, (and reset to initial mode), if it detects break condition? That makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Break, on its own, does not affect the rescue state. EntryMode::None is for test cases that may have some out-of-band mechanism of resetting the chip or triggering rescue mode.

We set break condition so that if the chip goes through reset, rescue will be triggered again.

@cfrantz
Copy link
Contributor Author

cfrantz commented Mar 26, 2025

I've also added a test to make sure opentitantool interacts correctly with rescue protocol version 0. The test case includes pre-compiled FPGA ROM_EXT binaries. We can remove the test case when we no longer care about supporting version 0. I expect that will be in about 3 to 6 months.

@cfrantz cfrantz force-pushed the rescue-no-reboot branch 3 times, most recently from db8fdca to 3637d99 Compare March 27, 2025 17:18
Rescue mode should not automatically reboot the chip after processing a
data transfer.  Instead, the chip should wait for a subsequent command
or a reboot request via the `REBO` command.

This mode of operation is more aligned with how alternate rescue
protocols (like USB-DFU) work.  Making this behavior consistent among
the supported protocols allows for easier test automation and
configuration flows.

Addresses: lowRISC#26481

Signed-off-by: Chris Frantz <cfrantz@google.com>
@cfrantz cfrantz merged commit 9264a7f into lowRISC:earlgrey_1.0.0 Mar 28, 2025
33 checks passed
@jesultra jesultra added the CherryPick:master This PR should be cherry-picked to master label Apr 29, 2025
@github-actions
Copy link

Backport failed for master, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin master
git worktree add -d .worktree/backport-26728-to-master origin/master
cd .worktree/backport-26728-to-master
git switch --create backport-26728-to-master
git cherry-pick -x 760db7b73efb7eed9a922147d187ecf72352b0d3

@github-actions github-actions bot added the Manually CherryPick This PR should be manually cherry picked. label Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CherryPick:master This PR should be cherry-picked to master Manually CherryPick This PR should be manually cherry picked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants