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

[util,test] fix bug in flash scrambling script and add flash scrambling smoketest #17575

Merged

Conversation

timothytrippel
Copy link
Contributor

@timothytrippel timothytrippel commented Mar 16, 2023

This PR:

  1. fixes a bug in the flash scrambling script that resulted in an incorrect computation of the XEX scrambling mask,
  2. enables flash scrambling and ECC in the power virus test,
  3. consolidates all flash_ctrl configurations in the test ROM (made debugging easier and better aligns with ROM),
  4. adds a simple flash scrambling smoke test as a presubmit check in private-CI

This completes all tasks, and fixes #9322.

This also partially addresses #14814.

@timothytrippel timothytrippel self-assigned this Mar 16, 2023
@timothytrippel timothytrippel requested review from a team as code owners March 16, 2023 00:27
@timothytrippel timothytrippel requested review from weicaiyang, engdoreis, cfrantz, a team, jdonjdon and jadephilipoom and removed request for a team, weicaiyang and engdoreis March 16, 2023 00:27
@timothytrippel timothytrippel linked an issue Mar 16, 2023 that may be closed by this pull request
Copy link
Contributor

@jdonjdon jdonjdon left a comment

Choose a reason for hiding this comment

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

LGTM with some nits.

sw/device/lib/testing/test_rom/test_rom.c Show resolved Hide resolved
sw/device/tests/BUILD Outdated Show resolved Hide resolved
The address used to compute the XEX scrambling mask was incorrect, as
the VMEM file contains multiple flash word addresses in a line.

Signed-off-by: Timothy Trippel <[email protected]>
This consolidates all flash_ctrl configurations to a single section in
the test ROM to better mirror the actual ROM.

Signed-off-by: Timothy Trippel <[email protected]>
This partially addresses lowRISC#14814.

Signed-off-by: Timothy Trippel <[email protected]>
This adds a simple flash scrambling/ECC smoketest to DV to test the
`gen-flash-img.py` can properly prepare a flash image for backdoor
loading in flash in DV. This test is also added to the list of tests run
in pre-submit CI.

Signed-off-by: Timothy Trippel <[email protected]>
Copy link
Contributor

@engdoreis engdoreis left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @timothytrippel

@timothytrippel timothytrippel merged commit 00c72bc into lowRISC:master Mar 16, 2023
@timothytrippel timothytrippel deleted the add-flash-scrambling-smoketest branch March 16, 2023 16:56
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.

[flash_ctrl] Backdoor loading enhancements
3 participants