Skip to content

Conversation

@avolmat-st
Copy link

Currently the RIF configuration of the STM32N6 is performed in each related driver. This requires to add those dedicated call in each driver and moreover this might not always be needed.
Currently Zephyr is running in priviledge mode so is able to perform such configuration and needs to perform configuration this way but this is not always the case especially if Zephyr is not running in secure mode.
For this reason, move all those RIF configuration in a dedicated SOC specific function which is only called if Zephyr is "alone" running on the SOC.
In case of another entity has already run before (such as TF-M), this entity will have already set the RIF prior to reaching Zephyr and Zephyr will most probably not have enough right to set those, in such case the function will not be called.

erwango
erwango previously approved these changes Dec 9, 2025
mathieuchopstm
mathieuchopstm previously approved these changes Dec 9, 2025
Copy link
Contributor

@mathieuchopstm mathieuchopstm left a comment

Choose a reason for hiding this comment

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

LGTM w/ two minor nits

Alain Volmat added 2 commits December 9, 2025 11:26
Perform all the IPs RIF configuration at init time in case of this
isn't yet performed by an earlier entity during the boot sequence.
This configuration depends on TRUSTED_EXECUTION_SECURE which is
currently always enabled on STM32N6x but will be configurable in
future.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
RIF configuration is now done at soc init time in a centralized
way so it is no more necessary for drivers to perform this
configuration.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
@avolmat-st avolmat-st dismissed stale reviews from mathieuchopstm and erwango via b0ca186 December 9, 2025 10:28
@avolmat-st avolmat-st force-pushed the pr-stm32n6-rif-config branch from 1284297 to b0ca186 Compare December 9, 2025 10:28
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 9, 2025

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.

5 participants