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
Tfm clean up kconfig #30321
Conversation
ioannisg
commented
Nov 30, 2020
•
edited
edited
- 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 |
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.
If it's truly not needed, you can remove the NUM_PREEMPT_PRIORITIES below as well.
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.
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).
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.
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>
11124f2
to
d9bf718
Compare
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.
Tested on LPC55S69.
@@ -45,10 +41,6 @@ menuconfig BUILD_WITH_TFM | |||
|
|||
if BUILD_WITH_TFM | |||
|
|||
config NUM_PREEMPT_PRIORITIES |
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.
Does not seem to be needed @oyvindronningstad so I removed that as well.