<?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>Question about NRF5340 SRAM execution permission</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81636/question-about-nrf5340-sram-execution-permission</link><description>HI Devzone 
 currently my customer would like to get SRAM execution permission in their porject. 
 we found a config marco to set the SRAM permission &amp;quot; CONFIG_SRAM _REGION_PERMISSIONS &amp;quot;, but looks like this marco doesn&amp;#39;t grant execution permission. 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 16 Nov 2021 08:42:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81636/question-about-nrf5340-sram-execution-permission" /><item><title>RE: Question about NRF5340 SRAM execution permission</title><link>https://devzone.nordicsemi.com/thread/339154?ContentTypeID=1</link><pubDate>Tue, 16 Nov 2021 08:42:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:194b5001-a79e-4616-bb3d-3c56a018fb19</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There is no standard method to enable EXEC on the whole SRAM because this is considered really &lt;strong&gt;really&lt;/strong&gt; bad from a security perspective. What you could do is to define a new contained region in the SRAM and add that region to the &lt;code&gt;mpu_config&lt;/code&gt;&amp;nbsp;structure with the proper attributes as done for example in &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/soc/arm/st_stm32/stm32h7/mpu_regions.c"&gt;soc/arm/st_stm32/stm32h7/mpu_regions.c&lt;/a&gt; (see the &lt;code&gt;SRAM3_ETH_BUF&lt;/code&gt; region)&lt;/p&gt;
&lt;p&gt;-Amanda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question about NRF5340 SRAM execution permission</title><link>https://devzone.nordicsemi.com/thread/338937?ContentTypeID=1</link><pubDate>Mon, 15 Nov 2021 08:56:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d600cd35-aa4c-4cea-8fdf-a3badf03971b</guid><dc:creator>David Duan</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Amanda&lt;/p&gt;
&lt;p&gt;Thanks for your suggestion&lt;/p&gt;
&lt;p&gt;we found that the RAM excution access is disabled on default setting.&lt;/p&gt;
&lt;p&gt;currently we use below two method to enable excution access.(NCS1.5.0)&lt;/p&gt;
&lt;p&gt;1. Remove &amp;quot;NOT_EXEC&amp;quot; on line 123 (&lt;strong&gt;zephyr\include\arch\arm\aarch32\cortex_m\mpu\arm_mpu_v8m.h&lt;/strong&gt;)&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp;use arm_core_mpu_disable&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636966632692v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;my question is do we have some standard method to enable the access ?&lt;/p&gt;
&lt;p&gt;for example some marco ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question about NRF5340 SRAM execution permission</title><link>https://devzone.nordicsemi.com/thread/338814?ContentTypeID=1</link><pubDate>Fri, 12 Nov 2021 13:47:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1222b565-a281-48b1-97b1-27853242e4f5</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Besides this is a really bad idea the customer probably wants to look at &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/soc/arm/common/cortex_m/arm_mpu_regions.c"&gt;soc/arm/common/cortex_m/arm_mpu_regions.c&lt;/a&gt;&amp;nbsp;and in particular to the &lt;code&gt;REGION_RAM_ATTR&lt;/code&gt; macro&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>