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

plat-stm32: SCMI reset controllers on remoteproc are disabled on secure fmw loading #7106

Merged
merged 3 commits into from
Nov 6, 2024

Conversation

etienne-lms
Copy link
Contributor

Changes for STM32 remote proc driver and SCMI server to expose remoteproc reset controllers through SCMI only when the secure loading of remoteproc firmware is disabled. When so, remoteproc reset and power sequence shall go through OP-TEE remoteproc services, not SCMI platform services.

if (rd->reset_id == MCU_HOLD_BOOT_R)
return SCMI_NOT_SUPPORTED;
/* Remoteproc driver may handle all MCU reset controllers */
if (IS_ENABLED(CFG_STM32MP_REMOTEPROC) && rd->reset_id == MCU_R)
Copy link
Contributor

Choose a reason for hiding this comment

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

&& stm32_rproc_is_secure(xxx)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, thanks!

#ifdef CFG_STM32MP15
/* Remoteproc driver may handle all MCU reset controllers */
if (IS_ENABLED(CFG_STM32MP_REMOTEPROC) &
(rd->reset_id == MCU_R || rd->reset_id == MCU_HOLD_BOOT_R))
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@GseoC
Copy link
Contributor

GseoC commented Nov 6, 2024

Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com>

@arnopo , do you want to give your tag as well?

Copy link
Contributor

@arnopo arnopo left a comment

Choose a reason for hiding this comment

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

LGTM
Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>

@GseoC
Copy link
Contributor

GseoC commented Nov 6, 2024

@etienne-lms I'm just worried about stm32mp_nsec_can_access_reset() call above. Who registered the resource?

@etienne-lms
Copy link
Contributor Author

Removal of stm32mp_nsec_can_access_reset() and stm32mp_nsec_can_access_clock() are addressed in #7111.

Add stm32_remoteproc driver API function stm32_rproc_is_secure()
that return whether of not remote processor management shall be
handled through OP-TEE remoteproc secure services.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Forbid SCMI accesses to MCU reset controllers when remote processor
is to be managed through OP-TEE remoteproc services.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Remove useless assertion on reset controller handle value.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
@jforissier jforissier merged commit da41b14 into OP-TEE:master Nov 6, 2024
9 checks passed
@etienne-lms etienne-lms deleted the stm32-rproc-reset branch November 12, 2024 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants