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

[rom] fix ROM_EXT immutable section to work with address translation #24415

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

timothytrippel
Copy link
Contributor

The original ROM_EXT immutable section configuration did not account for the address translation adjustments to the immutable section entry point. This meant that if address translation was enabled, the immutable section entry point would never get moved to the virtual address space, which gets marked RX. The physical address space of the current slot would only be marked R, and when jumping to the entry point an exception would occur. This slipped through b/c our tooling always calculated the correct offset to the immutable section base on symbols in the ELF, but meant that the same offset could not be used across different ROM_EXT slot locations (which is important since the immutable section offset is stored in fuses). This fixes that error and enhances the tests to ensure the same ROM_EXT mutable section offset can be used across tests that load a ROM_EXT in different slots (A, B, or Virtual slots).

@timothytrippel
Copy link
Contributor Author

Fixes #24416.

@timothytrippel
Copy link
Contributor Author

CHANGE AUTHORIZED: sw/device/silicon_creator/rom/e2e/release/rom_e2e_self_hash_test.c

The original ROM_EXT immutable section configuration did not account for
the translation addjustments to the immutable section entry point. This
fixes that error and enhances the tests to ensure the same ROM_EXT
mutable section offset can be used across tests that load a ROM_EXT in
different slots (A, B, or Virtual slots).

Signed-off-by: Tim Trippel <[email protected]>
@moidx
Copy link
Contributor

moidx commented Aug 27, 2024

CHANGE AUTHORIZED: sw/device/silicon_creator/rom/e2e/release/rom_e2e_self_hash_test.c

@timothytrippel timothytrippel merged commit 738cbab into lowRISC:master Aug 27, 2024
36 checks passed
@timothytrippel timothytrippel deleted the fix-immutable branch August 27, 2024 20:15
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.

3 participants