-
Notifications
You must be signed in to change notification settings - Fork 3k
Use secure/non-secure rom for bl modes #10113
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
Conversation
To managed bootloader mode
@dannybenor You asked offline for this. Could you give feedback on if this works for you? |
3d8451b
to
e798276
Compare
Note for maintainers: the first commit cleans up all the lint warnings in the config system, so if you're only looking for the functionality change, look at the 3rd commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine.
@theotherjimmy, thank you for your changes. |
Waiting (making a note here) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for mending broken hearts 💔 ➡️ ❤️
I notice in this PR you've added the override behavior for just the ROM memories. Would it be appropriate to do add a similar override for RAM? Or is it not necessary in this case?
if hasattr(self.target, "mbed_rom_start"): | ||
mem_start = getattr(self.target, "mbed_rom_start") | ||
if hasattr(self.target, "mbed_rom_size"): | ||
mem_size = getattr(self.target, "mbed_rom_size") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this section be using the same config
object (the return value from get_config_data()
) as the PSA section below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked offline with @theotherjimmy : PSA target memory config (ex (non-)secure-rom-start
and (non-)secure-rom-size
) actually uses the config system, where normal targets use "target data", hence the different way to access the data.
PSA targets already get the RAM defines injected to the linker |
Bumping to RC3 since this is needed for another PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked offline with @theotherjimmy: Sounds like RAM is not needed immediately for bootloader mode, so it was limited to ROM. There's no reason why RAM can't follow this PR as well.
LGTM
if hasattr(self.target, "mbed_rom_start"): | ||
mem_start = getattr(self.target, "mbed_rom_start") | ||
if hasattr(self.target, "mbed_rom_size"): | ||
mem_size = getattr(self.target, "mbed_rom_size") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked offline with @theotherjimmy : PSA target memory config (ex (non-)secure-rom-start
and (non-)secure-rom-size
) actually uses the config system, where normal targets use "target data", hence the different way to access the data.
CI started |
Test run: SUCCESSSummary: 13 of 13 test jobs passed |
Description
Previously, a porter or application author could configure
secure or non-secure rom through the use of:
target.secure-rom-start
target.secure-rom-size
target.non-secure-rom-start
target.non-secure-rom-size
This allows them to configure this once, and have the same
values for both a secure build and a non-secure build.
This was not used by the bootloader modes and combining
these with either bootloader mode would lead to problems and
heartbreak.
This PR mends these broken hearts by heeding the secure and
non secure start and size in the bootloder modes.
Pull request type