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

Use secure/non-secure rom for bl modes #10113

Merged
merged 3 commits into from Mar 15, 2019

Conversation

Projects
None yet
7 participants
@theotherjimmy
Copy link
Contributor

commented Mar 14, 2019

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

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change
@theotherjimmy

This comment has been minimized.

Copy link
Contributor Author

commented Mar 14, 2019

@dannybenor You asked offline for this. Could you give feedback on if this works for you?

@theotherjimmy theotherjimmy force-pushed the theotherjimmy:use-ns-rom-in-bl branch to e798276 Mar 14, 2019

@theotherjimmy

This comment has been minimized.

Copy link
Contributor Author

commented Mar 14, 2019

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.

@orenc17
Copy link
Contributor

left a comment

Looks fine.

@ciarmcom ciarmcom requested review from ARMmbed/mbed-os-maintainers Mar 14, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Mar 14, 2019

@theotherjimmy, thank you for your changes.
@ARMmbed/mbed-os-tools @ARMmbed/mbed-os-maintainers please review.

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Mar 15, 2019

@dannybenor You asked offline for this. Could you give feedback on if this works for you?

Waiting (making a note here)

@bridadan
Copy link
Contributor

left a comment

+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")

This comment has been minimized.

Copy link
@bridadan

bridadan Mar 15, 2019

Contributor

Should this section be using the same config object (the return value from get_config_data()) as the PSA section below?

This comment has been minimized.

Copy link
@bridadan

bridadan Mar 15, 2019

Contributor

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.

@orenc17

This comment has been minimized.

Copy link
Contributor

commented Mar 15, 2019

PSA targets already get the RAM defines injected to the linker

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Mar 15, 2019

Bumping to RC3 since this is needed for another PR.

@bridadan
Copy link
Contributor

left a comment

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")

This comment has been minimized.

Copy link
@bridadan

bridadan Mar 15, 2019

Contributor

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.

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Mar 15, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

commented Mar 15, 2019

Test run: SUCCESS

Summary: 13 of 13 test jobs passed
Build number : 1
Build artifacts

@0xc0170 0xc0170 merged commit 35e30e1 into ARMmbed:master Mar 15, 2019

28 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARMC5 Success
Details
jenkins-ci/build-ARMC6 Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR8 Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARMC5 Success
Details
jenkins-ci/mbed2-build-ARMC6 Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR8 Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Local astyle testing has passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/doxy-spellcheck Local doxy-spellcheck testing has passed
Details
travis-ci/events Passed, runtime is 9789 cycles (-576 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/include_check Local include_check testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B (+0.00%)
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details
travis-ci/tools-py3.5 Local tools-py3.5 testing has passed
Details
travis-ci/tools-py3.6 Local tools-py3.6 testing has passed
Details
travis-ci/tools-py3.7 Local tools-py3.7 testing has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.