Skip to content

[rescue] Report errors for disallowed configurations #27682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: earlgrey_1.0.0
Choose a base branch
from

Conversation

cfrantz
Copy link
Contributor

@cfrantz cfrantz commented Jul 23, 2025

Rework the validate_mode function to set flags in the DFU context that represent whether a DFU DnLoad or UpLoad operation is allowed. Report an error in the download/upload handler when an unsupported operation is attempted.

@cfrantz cfrantz requested review from moidx and anthonychen1251 July 23, 2025 01:00
@cfrantz cfrantz requested a review from a team as a code owner July 23, 2025 01:00
@cfrantz cfrantz removed the request for review from a team July 23, 2025 01:00
anthonychen1251 added a commit to anthonychen1251/opentitan that referenced this pull request Jul 23, 2025
With lowRISC#27682, DFU rescue can now correctly report disallowed rescue
commands, removing the need for device log analysis to determine if a
command was rejected in the DFU variant.

Signed-off-by: Anthony Chen <antchen@google.com>
Copy link
Member

@anthonychen1251 anthonychen1251 left a comment

Choose a reason for hiding this comment

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

LGTM. Just two minor comments. I've also submitted a PR (#27686) updating the rescue disability test to remove the need for device log analysis to determine if a command was rejected in the DFU variant.

anthonychen1251 added a commit to anthonychen1251/opentitan that referenced this pull request Jul 23, 2025
With lowRISC#27682, DFU rescue can now correctly report disallowed rescue
commands, removing the need for device log analysis to determine if a
command was rejected in the DFU variant.

Signed-off-by: Anthony Chen <antchen@google.com>
Rework the `validate_mode` function to set flags in the DFU context that
represent whether a DFU `DnLoad` or `UpLoad` operation is allowed.
Report an error in the download/upload handler when an unsupported
operation is attempted.

Signed-off-by: Chris Frantz <cfrantz@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants