[rom] fix ROM_EXT immutable section to work with address translation #24415
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).