Skip to content

Conversation

@sasdf
Copy link
Contributor

@sasdf sasdf commented Aug 27, 2025

This change adds an end-to-end test for SRAM execution mode owner config switches.

The test verifies that the SRAM execution mode can be enabled, disabled, and disabled+locked.

@sasdf sasdf marked this pull request as ready for review August 27, 2025 15:57
@sasdf sasdf requested a review from a team as a code owner August 27, 2025 15:57
owner_keydata_t owner = OWNER_KEYDATA;
ownership_state_t state = bootdata->ownership_state;

#ifndef TEST_OWNER_FORCE_UPDATE
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need this and introducing an #ifdef around this policy logic scares me.

The way this is handled in other tests which require a particular owner configuration is to clear the bitstream before the test. We also clear it after the test (changes_otp=True) to ensure the owner config doesn't survive to cause problems in later tests.

You can see this in action in the rescue and ownership tests, for example:

test_cmd = """
                --exec="transport init"
                --exec="fpga clear-bitstream"
                --exec="fpga load-bitstream {bitstream}"
                --exec="bootstrap --clear-uart=true {firmware}"
                --exec="console --non-interactive --exit-success='{exit_success}' --exit-failure='{exit_failure}'"
                no-op
""",

As an aside, it might be better if we had a test parameter that indicated that we wanted to clear the bitstream before the test, but I don't think we should develop that in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changes applied. Thanks!

This change adds an end-to-end test for SRAM execution mode owner config
switches.

The test verifies that the SRAM execution mode can be enabled, disabled,
and disabled+locked.

Change-Id: I5a98e91586ae4be6a9362adaa9b1a983c1082bf9
Signed-off-by: Yi-Hsuan Deng <[email protected]>
sasdf added a commit to sasdf/opentitan that referenced this pull request Aug 28, 2025
Change-Id: I7d09a54a5278e923d5489a9d3acae078d6616037
Signed-off-by: Yi-Hsuan Deng <[email protected]>
sasdf added a commit to sasdf/opentitan that referenced this pull request Aug 28, 2025
Change-Id: I7d09a54a5278e923d5489a9d3acae078d6616037
Signed-off-by: Yi-Hsuan Deng <[email protected]>
@sasdf sasdf requested a review from cfrantz August 29, 2025 00:31
@cfrantz cfrantz merged commit 572f7cf into lowRISC:earlgrey_1.0.0 Aug 29, 2025
63 of 64 checks passed
@jwnrt jwnrt added the CherryPick:master This PR should be cherry-picked to master label Feb 6, 2026
@lowrisc-ci
Copy link

lowrisc-ci bot commented Feb 6, 2026

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-28057-to-master origin/master
cd .worktree/backport-28057-to-master
git switch --create backport-28057-to-master
git cherry-pick -x 634ffcb619997f0b58edf451acb0e4d6a9077ea2

@lowrisc-ci lowrisc-ci bot added the Manually CherryPick This PR should be manually cherry picked. label Feb 6, 2026
@lowrisc-ci
Copy link

lowrisc-ci bot commented Feb 6, 2026

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-28057-to-master origin/master
cd .worktree/backport-28057-to-master
git switch --create backport-28057-to-master
git cherry-pick -x 634ffcb619997f0b58edf451acb0e4d6a9077ea2

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