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

Tfm clean up kconfig #30321

Merged
merged 3 commits into from Dec 1, 2020
Merged

Conversation

ioannisg
Copy link
Member

@ioannisg ioannisg commented Nov 30, 2020

  • Cleanup the BUILD_WITH_TFM option definition in Kconfig.tfm removing redundant options
  • Remove the overriding of NUM_PRIORITIES which is not needed.
  • Add proper dependencies and imply statements on BUILD_WITH_TFM
  • Code Owners for Kconfig.tfm (module)

@@ -20,12 +20,6 @@ config TFM_BOARD

menuconfig BUILD_WITH_TFM
bool "Build with TF-M as the Secure Execution Environment"
select CMSIS_RTOS_V2
Copy link
Collaborator

Choose a reason for hiding this comment

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

If it's truly not needed, you can remove the NUM_PREEMPT_PRIORITIES below as well.

Copy link
Member

Choose a reason for hiding this comment

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

Has this been tested with the two TF-M samples? I'll do so myself later today, but wanted to check if someone has already verified this isn't required any longer since it previously was for IPC support (circa TFM 1.1).

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeap, I did that for mps2 an521.

When we select BUILD_WITH_TFM we do not
really need to enable by default the
options THREAD_NAME, THREAD_STACK_INFO,
INIT_STACKS and THREAD_MONITOR, so we can
clean them up. We also remove CMSIS_RTOS_V2
for the same reason.

We also cleanup the default value for
NUM_PREEMPT_PRIORITIES, which does not
seem to be needed.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
BUILD_WITH_TFM needs to depend on
ARM_TRUSTZONE_M, which is selected
by the SoC or Board definition. In
addition to that we add an imply
statement for INIT_ARCH_HW_AT_BOOT
because Zephyr will be chain-loaded
by TF-M, and needs to cleanup its
core ARCH registers that might be
left in non-reset state.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Add the TFM Module maintainers as
code owners for Kconfig.tfm.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Copy link
Member

@microbuilder microbuilder left a comment

Choose a reason for hiding this comment

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

Tested on LPC55S69.

@ioannisg ioannisg self-assigned this Nov 30, 2020
@ioannisg ioannisg added the area: Trusted Execution Trusted Execution label Nov 30, 2020
@@ -45,10 +41,6 @@ menuconfig BUILD_WITH_TFM

if BUILD_WITH_TFM

config NUM_PREEMPT_PRIORITIES
Copy link
Member Author

Choose a reason for hiding this comment

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

Does not seem to be needed @oyvindronningstad so I removed that as well.

@ioannisg ioannisg merged commit a953ac8 into zephyrproject-rtos:master Dec 1, 2020
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.

None yet

4 participants