<?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>TF-M Isolation Level is 1 with Profile Large</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109625/tf-m-isolation-level-is-1-with-profile-large</link><description>Dear all 
 Is CONFIG_TFM_ISOLATION_LEVEL = 2 in general supported by Nordic SDK v2.6.0 on a nRF9160? 
 If set CONFIG_TFM_ISOLATION_LEVEL = 2 in prj.conf, it&amp;#39;s always overwritten to 1 by the default value in /nrf/modules/trusted-firmware-m/Kconfig Related</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 04 Apr 2024 18:38:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109625/tf-m-isolation-level-is-1-with-profile-large" /><item><title>RE: TF-M Isolation Level is 1 with Profile Large</title><link>https://devzone.nordicsemi.com/thread/477200?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2024 18:38:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abc3a129-a98b-40ed-b806-df4bf25b16d3</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There is no public &lt;span&gt;repository&amp;nbsp;&lt;/span&gt;for sdk-modules to pull requests, so I will forward it to the team. Thanks for the nice sharing.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TF-M Isolation Level is 1 with Profile Large</title><link>https://devzone.nordicsemi.com/thread/476997?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2024 03:50:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce6eef3a-fe97-4d39-b769-53747dbfc3e5</guid><dc:creator>jeremyherbert</dc:creator><description>&lt;p&gt;I was trying to do the same thing but accessing OTP in NS, and I ended up implementing it this way. Here is my patch (for ncs v2.5.2)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="diff"&gt;diff --git a/modules/tfm/tfm/boards/services/include/tfm_read_ranges.h b/modules/tfm/tfm/boards/services/include/tfm_read_ranges.h
index 2f95b4eb7..56b366211 100644
--- a/modules/tfm/tfm/boards/services/include/tfm_read_ranges.h
+++ b/modules/tfm/tfm/boards/services/include/tfm_read_ranges.h
@@ -41,6 +41,15 @@
 
 #endif /* NRF_FICR_S_BASE */
 
+#ifdef NRF_UICR_S_BASE
+
+#define UICR_BASE              NRF_UICR_S_BASE
+
+#define UICR_OTP_ADDR          (UICR_BASE + offsetof(NRF_UICR_Type, OTP))
+#define UICR_OTP_SIZE          (sizeof(((NRF_UICR_Type *)0)-&amp;gt;OTP))
+
+#endif /* NRF_UICR_S_BASE */
+
 static const struct tfm_read_service_range ranges[] = {
 #ifdef PM_MCUBOOT_ADDRESS
        /* Allow reads of mcuboot metadata */
@@ -61,6 +70,9 @@ static const struct tfm_read_service_range ranges[] = {
 #if defined(FICR_SIPINFO_ADDR)
        { .start = FICR_SIPINFO_ADDR, .size = FICR_SIPINFO_SIZE },
 #endif
+#if defined(UICR_OTP_ADDR)
+       { .start = UICR_OTP_ADDR, .size = UICR_OTP_SIZE },
+#endif
 };
 
 #endif /* TFM_READ_RANGES_H__ */&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I have no idea if Nordic will support this in their SDK (perhaps hidden behind a Kconfig option?). And I&amp;#39;m not sure if they will accept a PR from a non-employee.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TF-M Isolation Level is 1 with Profile Large</title><link>https://devzone.nordicsemi.com/thread/476649?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2024 14:39:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd5d75b7-fea8-4566-bf24-007d9ea62060</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Hi,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;You need a custom memory read service implemented in Platform Root of Trust to read UICR in Isolation 2 (and non-supported level 3). ARoTs don&amp;#39;t have access to UICRs. Level 1 isolation makes every service look like it is in Platform RoT as there is no distinction.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;We have made such a Platform RoT service, so you should be able to create a custom ARoT-service that can read out UICR using the same methodology as NS world would use.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;You&amp;nbsp;will have to read the memory using the tfm_platform_mem_read functions:&lt;/p&gt;
&lt;p&gt;&lt;a title="https://github.com/nrfconnect/sdk-trusted-firmware-m/blob/5454e8edfcb240e564405cc92708716e5846770c/platform/ext/target/nordic_nrf/common/core/services/include/tfm_ioctl_core_api.h#l88" href="https://github.com/nrfconnect/sdk-trusted-firmware-m/blob/5454e8edfcb240e564405cc92708716e5846770c/platform/ext/target/nordic_nrf/common/core/services/include/tfm_ioctl_core_api.h#L88" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-trusted-firmware-m/blob/5454e8edfcb240e564405cc92708716e5846770c/platform/ext/target/nordic_nrf/common/core/services/include/tfm_ioctl_core_api.h#L88&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But before you do that, you will have to add all the addresses that you want to be able to read in the memory range header file:&lt;/p&gt;
&lt;p&gt;&lt;a title="https://github.com/nrfconnect/sdk-nrf/blob/main/modules/trusted-firmware-m/tfm_boards/services/include/tfm_read_ranges.h" href="https://github.com/nrfconnect/sdk-nrf/blob/main/modules/trusted-firmware-m/tfm_boards/services/include/tfm_read_ranges.h" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-nrf/blob/main/modules/trusted-firmware-m/tfm_boards/services/include/tfm_read_ranges.h&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Note that the tfm_platform_mem_read service doesn&amp;#39;t differentiate between NS or S service calls. If you add it in the tfm_read_ranges.h, then the NS-world would be able to request the same information&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;-Amanda H.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TF-M Isolation Level is 1 with Profile Large</title><link>https://devzone.nordicsemi.com/thread/475980?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 14:53:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dec97541-539b-40db-a09a-a39eb75cfa61</guid><dc:creator>Maweb</dc:creator><description>&lt;p&gt;Dear &lt;a href="https://devzone.nordicsemi.com/members/amanda"&gt;Amanda Hsieh&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I could find out what causes the issue.&lt;/p&gt;
&lt;p&gt;Within our custom secure service we access the UICR register to read the status of APPROTECT, ERASEPROTECT and SECUREAPPROTECT. This leads to the MemManage fault isses (if I comment it out, it works as expected).&lt;/p&gt;
&lt;p&gt;Previously with Isolation Level 1 it worked with the code below within the secure service.&amp;nbsp;How can we read the UICR from non-secure part without violating the memory access rules?&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Manuel&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    EN_protection protection = PROTECTION_NONE;
    uint32_t *APPROTECT = (uint32_t *)(0x00FF8000);
    uint32_t *ERASEPROTECT = (uint32_t *)(0x00FF8030);
    uint32_t *SECUREAPPROTECT = (uint32_t *)(0x00FF802C);
    if (*APPROTECT != 0xFFFFFFFF) {
        protection |= PROTECTION_ACCESS_PORT;
    }
    if (*ERASEPROTECT != 0xFFFFFFFF) {
        protection |= PROTECTION_ERASE_PROTECTION;
    }
    if (*SECUREAPPROTECT != 0xFFFFFFFF) {
        protection |= PROTECTION_SECURE_ACCESS_PORT;
    }&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TF-M Isolation Level is 1 with Profile Large</title><link>https://devzone.nordicsemi.com/thread/475976?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 14:45:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7695a0a-ea2d-4d68-bfbd-b70ee5949db8</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What is the application? Are you using the sample or developing your application?&lt;/p&gt;
&lt;p&gt;Could you provide the prj.conf and .conf under build/zephyr?&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TF-M Isolation Level is 1 with Profile Large</title><link>https://devzone.nordicsemi.com/thread/475828?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 08:30:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98e59d94-22d4-49bd-9afb-6296c350c396</guid><dc:creator>Maweb</dc:creator><description>&lt;p&gt;Thanks &lt;a href="https://devzone.nordicsemi.com/members/amanda"&gt;Amanda Hsieh&lt;/a&gt;&amp;nbsp;for looking at it. I really appreciate.&lt;/p&gt;
&lt;p&gt;In the meanwhile I also tried to remove `CONFIG_TFM_PROFILE_TYPE_LARGE=y` and I added `CONFIG_TFM_IPC=y` and `CONFIG_TFM_ISOLATION_LEVEL=2`.&lt;/p&gt;
&lt;p&gt;Isolation Level is now logged at `2`. However, I run now into a MemManage fault.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/2024_2D00_03_2D00_26_5F00_09_2D00_27_2D00_20.jpg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TF-M Isolation Level is 1 with Profile Large</title><link>https://devzone.nordicsemi.com/thread/475746?ContentTypeID=1</link><pubDate>Mon, 25 Mar 2024 18:27:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4ade475-2980-47e6-a0e7-45c148bbd795</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;(updated)&lt;/p&gt;
[quote user=""]Is &lt;code&gt;CONFIG_TFM_ISOLATION_LEVEL = 2&lt;/code&gt; in general supported by Nordic SDK v2.6.0 on a nRF9160?[/quote]
&lt;p&gt;Yes, see&amp;nbsp;&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.6.0/samples/tfm/tfm_psa_template/prj.conf#L66"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v2.6.0/samples/tfm/tfm_psa_template/prj.conf#L66&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Our TF-M implementation officially supports either&amp;nbsp;&lt;/span&gt;&lt;a title="(in Kconfig reference v&amp;amp;nbsp;)" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_TFM_PROFILE_TYPE_NOT_SET"&gt;&lt;code&gt;&lt;span&gt;CONFIG_TFM_PROFILE_TYPE_NOT_SET&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;&lt;span&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;a title="(in Kconfig reference v&amp;amp;nbsp;)" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_TFM_PROFILE_TYPE_MINIMAL"&gt;&lt;code&gt;&lt;span&gt;CONFIG_TFM_PROFILE_TYPE_MINIMAL&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;&lt;span&gt;&amp;nbsp;. See&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/security/tfm.html#minimal-build"&gt;Running applications with Trusted Firmware-M&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Removing&amp;nbsp;CONFIG_TFM_PROFILE_TYPE_LARGE=y is supposed to make it work. (Remind:&amp;nbsp;&lt;span&gt;CONFIG_TFM_IPC should get y.&lt;/span&gt;) You can test with&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/v2.6.0/samples/tfm/tfm_psa_template"&gt;https://github.com/nrfconnect/sdk-nrf/tree/v2.6.0/samples/tfm/tfm_psa_template&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I can reproduce the issue. Let me check with the team and then get back to you.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;em&gt;Due to the Easter holidays in Norway, we are less staffed than usual. During this time, you may receive late responses. After next Monday, staff will return to normal. Sorry for the inconvenience and thanks for your patience.&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>