Hi Poppy,
For IPC Model, the initializations of Secure Partitions (entry_point) are also subject to scheduling.
In your example, when ps_init() calls crypto services it will be blocked and SPM emit a signal to Crypto and triggers scheduler (This is the same behavior as when a SP calls any service after initialization.)
Let’s assume the Crypto Partition has not been initialized.
Then when the Crypto Partition is scheduled to run (it is not guaranteed this happens right after ps_init() calls Crypto services), it will initialize first and then start to handle signals (see the entry_point function).
The request from ps_init() then will be handled.
For Library Model, I think initialization happens when the first time any service is called.
Best Regards,
Kevin
From: TF-M <tf-m-bounces@lists.trustedfirmware.org>
On Behalf Of Edward Yang via TF-M
Sent: Friday, July 30, 2021 11:43 AM
To: tf-m@lists.trustedfirmware.org
Subject: [TF-M] question about the init sequence of tf-m secure partitions
Hi experts,
I want to know how to define the init sequence of secure partitions in tf-m. For example, PS partition may have dependency on crypto service, if
PS_ENCRYPTION
defined ,ps_init() needs calling crypto services, so I think crypto_init()should be done before ps_init().
Best Regards,
Poppy Wu
Macronix Microelectronics (Suzhou) Co.,Ltd
http://www.mxic.com.cn
CONFIDENTIALITY NOTE:
This e-mail and any attachments may contain confidential information and/or personal data, which is protected by applicable laws. Please be reminded that duplication, disclosure, distribution, or use of this e-mail (and/or
its attachments) or any part thereof is prohibited. If you receive this e-mail in error, please notify us immediately and delete this mail as well as its attachment(s) from your system. In addition, please be informed that collection, processing, and/or use
of personal data is prohibited unless expressly permitted by personal data protection laws. Thank you for your attention and cooperation.
Macronix International Co., Ltd.
=====================================================================