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

M2354: Fix incorrectly resolved peripheral base with security #15029

Merged

Conversation

ccli8
Copy link
Contributor

@ccli8 ccli8 commented Aug 31, 2021

Summary of changes

This PR adds TF-M import mcu partition header partition_M2354.h (renamed to partition_M2354_im.h on Mbed) for resolving peripheral base with security. Though Mbed 6 is non-secure only and needn't secure peripheral base, some BSP driver code still rely on it.

For example, LCD will incorrectly resolve to LCD_S without SCU_INIT_PNSSET5_VAL define on Mbed:

#if defined (SCU_INIT_PNSSET5_VAL) && (SCU_INIT_PNSSET5_VAL & BIT27)
# define LCD LCD_NS
#else
# define LCD LCD_S
#endif

Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Aug 31, 2021
@ciarmcom ciarmcom requested a review from a team August 31, 2021 08:00
@ciarmcom
Copy link
Member

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

0xc0170
0xc0170 previously approved these changes Aug 31, 2021
@0xc0170
Copy link
Contributor

0xc0170 commented Aug 31, 2021

The failure in Basic Checks was not related to this PR, rather some python dependency. I restarted the job and if it fails, I'll create a separate testing PR to find out what is broken today.

@LDong-Arm LDong-Arm mentioned this pull request Aug 31, 2021
@ccli8 ccli8 force-pushed the nuvoton_m2354_tfm_import_mcu_partition branch from a075785 to c543f16 Compare September 1, 2021 02:05
@mergify mergify bot dismissed 0xc0170’s stale review September 1, 2021 02:06

Pull request has been modified.

Import mcu partition header (renamed to partition_M2354_im.h) for resolving peripheral base with security.
Though Mbed is non-secure only and needn't secure peripheral base, some BSP driver code still rely on it.
@ccli8 ccli8 force-pushed the nuvoton_m2354_tfm_import_mcu_partition branch from c543f16 to fc080f7 Compare September 2, 2021 01:16
Copy link
Contributor

@LDong-Arm LDong-Arm left a comment

Choose a reason for hiding this comment

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

LGTM

@mergify mergify bot added needs: CI and removed needs: review labels Sep 2, 2021
@ciarmcom ciarmcom added the stale Stale Pull Request label Sep 3, 2021
@ciarmcom
Copy link
Member

ciarmcom commented Sep 3, 2021

This pull request has automatically been marked as stale because it has had no recent activity. @ARMmbed/mbed-os-maintainers, please start CI to get the PR merged.

@LDong-Arm LDong-Arm requested a review from 0xc0170 September 3, 2021 12:05
@ciarmcom ciarmcom added stale Stale Pull Request and removed stale Stale Pull Request labels Sep 3, 2021
@LDong-Arm
Copy link
Contributor

@0xc0170 Can we run CI and merge it, before we can update TF-M?

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 8, 2021

Yes!

CI started

@0xc0170 0xc0170 removed the stale Stale Pull Request label Sep 8, 2021
@mbed-ci
Copy link

mbed-ci commented Sep 8, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

@0xc0170 0xc0170 merged commit 9eed427 into ARMmbed:master Sep 9, 2021
@mergify mergify bot removed the ready for merge label Sep 9, 2021
@ccli8 ccli8 deleted the nuvoton_m2354_tfm_import_mcu_partition branch September 9, 2021 07:45
@mbedmain mbedmain added release-version: 6.15.0 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Sep 16, 2021
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.

6 participants