Skip to content

Add a platform config to disable the MPU #9040

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

Merged
merged 2 commits into from
Dec 11, 2018

Conversation

c1728p9
Copy link
Contributor

@c1728p9 c1728p9 commented Dec 10, 2018

Description

Add the platform config DISABLE_MPU to allow the MPU to be disabled from an application.

This PR is identical to #9030 but has an additional commit to add this config.

Pull request type

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

@ciarmcom
Copy link
Member

@c1728p9, thank you for your changes.
@ARMmbed/mbed-os-hal @ARMmbed/mbed-os-core @ARMmbed/mbed-os-test @ARMmbed/mbed-os-maintainers please review.

@cmonr
Copy link
Contributor

cmonr commented Dec 11, 2018

CI started (in case it's decided to bring in as-is for RC3)

@@ -128,6 +128,10 @@
"fatal-error-auto-reboot-enabled": {
"help": "Setting this to true enables auto-reboot on a fatal error.",
"value": false
},
"disable-mpu": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Config options should be positive unless there's a good reason. This could be enable-mpu, or maybe use-mpu is more to the point.

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 11, 2018

This PR is identical to #9030 but has an additional commit to add this config.

This shall be rebased and some comments addressed above, marking it as "needs: work".

@kjbracey-arm Do you want to push an update for positive config value? This PR looks minimal and might be considered for rc3?

@kjbracey
Copy link
Contributor

kjbracey commented Dec 11, 2018

Going to rework a little more - as this is a platform option, it should only be affecting platform code. It shouldn't actually be creating dummy HAL calls (and hence requiring custom MPU HALs to follow the config option).

c1728p9 and others added 2 commits December 11, 2018 13:03
Add the platform config DISABLE_MPU to allow the MPU to be disabled
from an application.
Make the option positively named, and as it is a platform config
option make sure it only affects platform code.

HAL functions still remain available even if platform is told not
to use them.
@kjbracey
Copy link
Contributor

Reworked, and rebased to make the PR clearer. Naming the option "use-mpu" made it clearer how it should be implemented. (ie don't touch the HAL, just don't use it).

@0xc0170 0xc0170 requested a review from bulislaw December 11, 2018 11:09
@mbed-ci
Copy link

mbed-ci commented Dec 11, 2018

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_exporter

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 11, 2018

CI was aborted (timeout anyway) - for older commits, will restart now for the latest update

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 11, 2018

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 11, 2018

Test run: FAILED

Summary: 1 of 1 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_unittests

@adbridge
Copy link
Contributor

Looks like device out of space error!

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 11, 2018

CI should be fixed (other fixes ongoing)

@adbridge
Copy link
Contributor

CI should be fixed (other fixes ongoing)

Other fixes ?

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 11, 2018

CI team is checking what caused the space to run out (it was now cleaned)

CI restarted

@@ -35,6 +35,8 @@ extern "C" {

#define mbed_mpu_manager_init() mbed_mpu_init()

#define #define mbed_mpu_manager_deinit() mbed_mpu_free()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh-oh.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least is isn't #undefined behavior. Just kidding, I pushed a fix.

Copy link
Contributor

@kjbracey kjbracey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Russ's last commit looks good to me.

@mbed-ci
Copy link

mbed-ci commented Dec 11, 2018

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 3
Build artifacts

@cmonr cmonr merged commit 7546186 into ARMmbed:master Dec 11, 2018
@mbed-ci
Copy link

mbed-ci commented Dec 11, 2018

Test run: FAILED

Summary: 6 of 7 test jobs failed
Build number : 4
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_mbed2-build-IAR
  • jenkins-ci/mbed-os-ci_mbed2-build-ARM
  • jenkins-ci/mbed-os-ci_mbed2-build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-IAR
  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@cmonr
Copy link
Contributor

cmonr commented Dec 11, 2018

Ignore #9040 (comment)

I accidentally re-enqueued the PR a while back, and forgot to remove it (and force aborted the job above).

@deepikabhavnani
Copy link

@cmonr - I see Commits after the CI run was triggered, last force push 15 mins ago.

@cmonr
Copy link
Contributor

cmonr commented Dec 11, 2018

@cmonr - I see Commits after the CI run was triggered, last force push 15 mins ago.

@deepikabhavnani Correct. There was a third commit in this PR, but CI was started and passed when there were only two commits. We opted to remove the third commit to make this PR green to increase the chance of having RC3 generated before COB UK time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants