<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nrf_cc3xx_platform_init() API crashes on call in different OS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90317/nrf_cc3xx_platform_init-api-crashes-on-call-in-different-os</link><description>Agenda : Use crypto features like AES-CBC, AES-CCM, RSA, ECC, etc. in secure environment (i.e. trustzone with SPM). Also, to use HUK, KMU for secure key generation and storage. 
 Working Environment : When used nrf-connect-sdk v1.9.1 with below configurations</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 03 Aug 2022 08:16:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90317/nrf_cc3xx_platform_init-api-crashes-on-call-in-different-os" /><item><title>RE: nrf_cc3xx_platform_init() API crashes on call in different OS</title><link>https://devzone.nordicsemi.com/thread/379818?ContentTypeID=1</link><pubDate>Wed, 03 Aug 2022 08:16:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34f4c8c1-050b-4460-a735-4483d9e5526f</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;From our expert:&lt;/p&gt;
&lt;p&gt;You might want to try incorporating the mutex file in a similar way as we do it for zephyr here: &lt;a title="https://github.com/nrfconnect/sdk-nrfxlib/blob/main/crypto/nrf_cc312_platform/src/nrf_cc3xx_platform_mutex_zephyr.c#l352" href="https://github.com/nrfconnect/sdk-nrfxlib/blob/main/crypto/nrf_cc312_platform/src/nrf_cc3xx_platform_mutex_zephyr.c#L352" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-nrfxlib/blob/main/crypto/nrf_cc312_platform/src/nrf_cc3xx_platform_mutex_zephyr.c#L352&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It will be a good try to define these platform mutexes I think.&lt;/p&gt;
&lt;p&gt;-Amanda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_cc3xx_platform_init() API crashes on call in different OS</title><link>https://devzone.nordicsemi.com/thread/379645?ContentTypeID=1</link><pubDate>Tue, 02 Aug 2022 08:17:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00bf1bd3-a4f7-46c3-ae80-031c8cb6d24e</guid><dc:creator>skirti</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thanks for the explanation provided.&lt;/p&gt;
&lt;p&gt;We got to know now, that we are able to call the nrf_cc3xx_platform_init API successfully from secure firmware. But, when called from non-secure callable function we see the crash with dump below:&lt;br /&gt;&lt;span&gt;#0&amp;nbsp; 0x00000452 in ?? ()&lt;/span&gt;&lt;br /&gt;&lt;span&gt;#1&amp;nbsp; &amp;lt;signal handler called&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;#2&amp;nbsp; 0x00000000 in ?? ()&lt;/span&gt;&lt;br /&gt;&lt;span&gt;#3&amp;nbsp; 0x00010dcc in CC_PalMutexCreate ()&lt;/span&gt;&lt;br /&gt;&lt;span&gt;#4&amp;nbsp; 0x00010bf8 in CC_PalInit ()&lt;/span&gt;&lt;br /&gt;&lt;span&gt;#5&amp;nbsp; 0x00010b4e in CC_LibInit ()&lt;/span&gt;&lt;br /&gt;&lt;span&gt;#6&amp;nbsp; 0x00010a5a in nrf_cc3xx_platform_init ()&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;We see&amp;nbsp;&lt;span&gt;CC_PalMutexCreate&amp;nbsp;symbol in nrf_cc312_platform library itself.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Also we made sure the below peripherals are present with&amp;nbsp;SPU_RAMREGION_PERM_SECATTR_Msk and locked the configurations too.&lt;br /&gt;1. KMU - peripheral_id(57)&lt;br /&gt;2. MUTEX - peripheral_id(48)&lt;br /&gt;3. CTRLAPPERI - peripheral_id(6)&lt;br /&gt;4. UARTE - peripheral_id(9)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Would you please share some information what could be possibly missed due to which it could crash.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_cc3xx_platform_init() API crashes on call in different OS</title><link>https://devzone.nordicsemi.com/thread/378700?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2022 11:43:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77124705-a7d1-4546-88e0-c8b7ab53be62</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As the documentation states here:&amp;nbsp;&lt;br /&gt;&lt;a title="https://developer.nordicsemi.com/nrf_connect_sdk/doc/latest/nrfxlib/crypto/doc/api.html#c.nrf_cc3xx_platform_init_hmac_drbg" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/crypto/doc/api.html#c.nrf_cc3xx_platform_init_hmac_drbg" rel="noopener noreferrer" target="_blank"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/crypto/doc/api.html#c.nrf_cc3xx_platform_init_hmac_drbg&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The platform init does initialize the RNG block of the CryptoCell. Now that doesn&amp;#39;t mean that it keeps it ON all the time though. Whenever entropy is asked through the entropy functions these functions will make sure to enable and disable the block as it requires.&lt;/p&gt;
&lt;p&gt;Regarding porting the platform library to another OS, not sure that we will be able to give any hints for this. The platform library is overall self-dependent and it does not even need nrfx in order to work.&lt;/p&gt;
&lt;p&gt;As for the crashing of the platform init, I would highly suggest connecting to a debugger and checking what fault is being raised by the CPU. Unfortunately, we cannot provide support for porting the platform library in a different OS.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_cc3xx_platform_init() API crashes on call in different OS</title><link>https://devzone.nordicsemi.com/thread/378537?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 12:24:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b86a7672-2f0c-4629-bc61-7c61b1a2c708</guid><dc:creator>skirti</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the reply.&lt;br /&gt;Yes, have followed this sample.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There are no crash logs or BT seen.&lt;/p&gt;
&lt;p&gt;As described we are integrating nrf_cc3xx_platform library to a different OS, would like to confirm if we need to port anything other than the library itself and nrfx drivers mentioned above.&lt;/p&gt;
&lt;p&gt;Does the nrf_cc3xx_platform_init() call initializes rng driver or it has to be done separately?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_cc3xx_platform_init() API crashes on call in different OS</title><link>https://devzone.nordicsemi.com/thread/378534?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 12:08:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cfc29df-ef5d-482a-a09b-8c39f47a845a</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What is the log when you see the crash?&lt;/p&gt;
&lt;p&gt;Have a look at this sample&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/v1.9.1/samples/keys/hw_unique_key"&gt;https://github.com/nrfconnect/sdk-nrf/tree/v1.9.1/samples/keys/hw_unique_key&lt;/a&gt;&amp;nbsp;which has the&amp;nbsp;&lt;span&gt;nrf_cc3xx_platform_init function.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;Amanda&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>