Skip to content
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

[Sival, rstmgr] Fix rstmgr_alert_info_test on ROM_EXT #22795

Merged
merged 4 commits into from
May 2, 2024

Conversation

engdoreis
Copy link
Contributor

@engdoreis engdoreis commented Apr 24, 2024

Fixes #20589

The Root cause was that the ROM_EXT locks up the OTP registers with the ePMP, any attempt to write to them would generate an exception.
Therefore, we can't test the OTP alert when the test runs after the ROM_EXT.

@engdoreis engdoreis force-pushed the sival_rstmgr_fix branch 3 times, most recently from d164d14 to 3ec76bf Compare April 24, 2024 14:55
@engdoreis engdoreis changed the title Sival rstmgr fix [Sival, rstmgr] Fix rstmgr_alert_info_test on ROM_EXT Apr 24, 2024
@engdoreis engdoreis marked this pull request as ready for review April 24, 2024 14:58
@engdoreis engdoreis requested a review from a team as a code owner April 24, 2024 14:58
@engdoreis engdoreis requested review from moidx, matutem and a-will and removed request for a team April 24, 2024 14:58
@engdoreis engdoreis force-pushed the sival_rstmgr_fix branch 2 times, most recently from 14eeaba to 426df7e Compare April 24, 2024 15:06
@@ -701,6 +701,12 @@ static void init_expected_cause(void) {
.alert_info.alert_cause[kTopEarlgreyAlertIdI2c0FatalFault] = 1;
kExpectedInfo[kRound3]
.alert_info.alert_cause[kTopEarlgreyAlertIdSpiHost0FatalFault] = 1;

if (kBootStage == kBootStageOwner &&
Copy link
Contributor Author

@engdoreis engdoreis Apr 24, 2024

Choose a reason for hiding this comment

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

On Round 3 all the alerts are enabled, after the reset is caused by the alert handler escalation, a kTopEarlgreyAlertIdFlashCtrlFatalErr happens during the boot, only with FGPA + ROM_EXT.
This doesn't happen on Silicon, probably because the Creator and Owner secrets are there, but I'm not sure why it happens on the FPGA.
@cfrantz Could you please check that this is not a bug with ROM_EXT?

CHECK_DIF_OK(dif_alert_handler_irq_set_enabled(
&alert_handler, kDifAlertHandlerIrqClassb, kDifToggleEnabled));
} else {
LOG_INFO("Skipping OTP test due to ROM_EXT");
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Skipping OTP test due to ROM_EXT ePMP configuration

Signed-off-by: Douglas Reis <[email protected]>
@engdoreis engdoreis force-pushed the sival_rstmgr_fix branch from 3779600 to 32d2c5c Compare May 2, 2024 08:46
@engdoreis engdoreis requested a review from a team as a code owner May 2, 2024 10:19
engdoreis added 3 commits May 2, 2024 14:10
The ROM_EXT locks up the OTP registers with the ePMP, any write attempt
to them would generate an exception. Therefore we can't test OTP alerts
when the test runs after the ROM_EXT.

Signed-off-by: Douglas Reis <[email protected]>
The test generates a kTopEarlgreyAlertIdFlashCtrlFatalErr
alert only on the FPGA and with ROM_EXT. It doesn't happens on
Silicon probrably because it has the seeds.

Signed-off-by: Douglas Reis <[email protected]>
@engdoreis engdoreis force-pushed the sival_rstmgr_fix branch from 2123499 to 00a19c9 Compare May 2, 2024 13:10
@engdoreis engdoreis merged commit 7d9902c into lowRISC:earlgrey_es_sival May 2, 2024
29 checks passed
@engdoreis engdoreis added the CherryPick:master This PR should be cherry-picked to master label May 2, 2024
Copy link

github-actions bot commented May 2, 2024

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-22795-to-master origin/master
cd .worktree/backport-22795-to-master
git switch --create backport-22795-to-master
git cherry-pick -x 9836ff68262144b4289a03dfcd7962ed80367056 6e21981a7430f057070e788a5d9ebcb74c83bd09 7be7335ffbd1d5097c8c141718fce8c4a58dee20 00a19c96a6d233bb48dd423b29f61a0e0bb5bd7e

@jwnrt jwnrt added the CherryPick:earlgrey_1.0.0 This PR should be cherry-picked to earlgrey_1.0.0 label Oct 30, 2024
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-22795-to-master origin/master
cd .worktree/backport-22795-to-master
git switch --create backport-22795-to-master
git cherry-pick -x 9836ff68262144b4289a03dfcd7962ed80367056 6e21981a7430f057070e788a5d9ebcb74c83bd09 7be7335ffbd1d5097c8c141718fce8c4a58dee20 00a19c96a6d233bb48dd423b29f61a0e0bb5bd7e

Copy link

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

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

git fetch origin earlgrey_1.0.0
git worktree add -d .worktree/backport-22795-to-earlgrey_1.0.0 origin/earlgrey_1.0.0
cd .worktree/backport-22795-to-earlgrey_1.0.0
git switch --create backport-22795-to-earlgrey_1.0.0
git cherry-pick -x 9836ff68262144b4289a03dfcd7962ed80367056 6e21981a7430f057070e788a5d9ebcb74c83bd09 7be7335ffbd1d5097c8c141718fce8c4a58dee20 00a19c96a6d233bb48dd423b29f61a0e0bb5bd7e

@jwnrt jwnrt added the Manually CherryPick This PR should be manually cherry picked. label Oct 30, 2024
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-22795-to-master origin/master
cd .worktree/backport-22795-to-master
git switch --create backport-22795-to-master
git cherry-pick -x 9836ff68262144b4289a03dfcd7962ed80367056 6e21981a7430f057070e788a5d9ebcb74c83bd09 7be7335ffbd1d5097c8c141718fce8c4a58dee20 00a19c96a6d233bb48dd423b29f61a0e0bb5bd7e

Copy link

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

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

git fetch origin earlgrey_1.0.0
git worktree add -d .worktree/backport-22795-to-earlgrey_1.0.0 origin/earlgrey_1.0.0
cd .worktree/backport-22795-to-earlgrey_1.0.0
git switch --create backport-22795-to-earlgrey_1.0.0
git cherry-pick -x 9836ff68262144b4289a03dfcd7962ed80367056 6e21981a7430f057070e788a5d9ebcb74c83bd09 7be7335ffbd1d5097c8c141718fce8c4a58dee20 00a19c96a6d233bb48dd423b29f61a0e0bb5bd7e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPick:earlgrey_1.0.0 This PR should be cherry-picked to earlgrey_1.0.0 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