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

Cherry-pick to master: [rom_ext] Ownership transfer manual cherry-picks from earlgrey_es_sival #25888

Merged
merged 4 commits into from
Jan 23, 2025

Conversation

cfrantz
Copy link
Contributor

@cfrantz cfrantz commented Jan 15, 2025

Contains manual cherry-picks for commits included in the following PRs:

These changes are being merged into master.

@cfrantz cfrantz requested a review from moidx January 15, 2025 17:59
@cfrantz cfrantz requested review from a team as code owners January 15, 2025 17:59
@cfrantz cfrantz requested review from timothytrippel and removed request for a team January 15, 2025 17:59
@cfrantz cfrantz force-pushed the master-port-24939 branch 2 times, most recently from e95e890 to 7fabbb1 Compare January 22, 2025 22:05
Test the configuration options of the rescue protocol.

The `transfer_lib` is enhanced to allow for pre-set variations of the
ownership config through the `OwnerConfigKind` enum.  The rust-based
test harnesses are near-clones of the `transfer_test` harness, however,
they allow for certain expected errors during the transfer process
(such as a `Cancel` during the rescue upload) and test for specific
conditions after owner activation.

`rescue_limit_test`: Fixes lowRISC#24474.
`rescue_permission_test`: Fixes lowRISC#24475.

Signed-off-by: Chris Frantz <[email protected]>
(cherry picked from commit f94ca18)
(cherry picked from commit 8ddcef5)
Initially we were considering the SPI bootstrap mechanism as the ROM_EXT
rescue mechanism, however, we ended up going a different direction.

1. Remove the ROM_EXT SPI bootstrap code.

Signed-off-by: Chris Frantz <[email protected]>
(cherry picked from commit bff38c1)
(cherry picked from commit 12c6a84)
1. Add the capability to perform lockdown of the MP region configuration
   via the REGION_CFG_REGWEN registers.
2. In `owner_block_flash_apply`, apply the PROTECT_WHEN_PRIMARY and LOCK
   properties only when lockdown is requested.
3. In the `{un,}locked_init` functions, do not perform lockdown:
   - We do not want regions locked for the `LockedOwner` state should
     the user request rescue mode.
   - We do not want regions locked in the ownership unlocked states.
4. Prior to execution handoff to owner code, engage the owner-configured
   locks.

Signed-off-by: Chris Frantz <[email protected]>
(cherry picked from commit de7df51)
(cherry picked from commit d3248be)
`flash_permission_test`: Fixes: lowRISC#24476
Adds a test harness that verifies the flash configuration state of data
regions.

Signed-off-by: Chris Frantz <[email protected]>
(cherry picked from commit 890e5bf)
(cherry picked from commit 173c8a2)
@cfrantz cfrantz merged commit 220025a into lowRISC:master Jan 23, 2025
38 checks passed
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