RDC Permissions

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RDC Permissions

1,910 Views
imanolallende
Contributor III

I am using the i.MX6 SoloX SABRE-SD platform with Linux on the A9 and FreeRTOS on the M4. The "imx6sx-sdb-m4.dtb" has a shared memory region for both cores:

   fsl,shared-mem-addr = <0x91F000>;
   fsl,shared-mem-size = <0x1000>;

Nevertheless, I not interesting in sharing memory. I want to partition the memory as in the table:

A9

0x900000 - 0x90FFFF

M4

0x910000 - 0x91FFFF

If I delete the shared-mem-addr it only appears the partition of the A9:

&ocram {
    reg = <0x00901000 0xf000>;
};

Besides, I want to give only M4 permissions to the second partition with the RDC. I suppose I have to use the following function:

      RDC_SetMrAccess(RDC, rdcMrOcram, 0x910000, 0x91FFFF, 0x0C /*R/W permission for M4*/, true, false);

However, I get a Linux kernel panic while I am booting. Changing the RDC permissions to 0xFF works. Nevertheless, I want to give only permission to the M4. What I am doing wrong?

Labels (2)
3 Replies

1,424 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi,

You could refer to application note AN51278, especially on section 3 “How to Define the Memory Layout”; this document is available on the following link:

http://www.nxp.com/assets/documents/data/en/application-notes/AN5127.pdf

You could also use the following Community document as reference:

https://community.nxp.com/docs/DOC-333803

Additionally, have you considered that FreeRTOS BSP doesn’t consider running together with Linux at the same time? It is mentioned on Chapter 1 of the “FreeRTOS BSP for i.MX 6SoloX Demo User’s Guide” document.


Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,424 Views
imanolallende
Contributor III

Hi Carlos,

Thank you for your reply. If I am not wrong, it is possible to run FreeRTOS with Linux. In the Demo Guide they provide the RPMSG example with Linux and FreeRTOS.

Apart from that, I do not want to allocate neither the Linux image nor the FreeRTOS in the OCRAM. I want to write data in the OCRAM memory but having different partitions. I think I have found the problem why it is not possible to give only read/write permissions to the M4 in the OCRAM. When I was reviewing the FreeRTOS examples I found this comment:

/* Grant all domains read/write access because in DSM mode Linux need to save/restore OCRAM content */

RDC_SetMrAccess(RDC, rdcMrOcram, start, end, 0xFF, true, false);

Do someone knows why the DSM mode needs all the OCRAM? Is it possible to change this feature? I suppose that Linux use it to recover the data to the memories that were low powered, but why the whole OCRAM?

Thank you,

Imanol

0 Kudos
Reply

1,424 Views
rewers
Contributor II

Do someone knows why the DSM mode needs all the OCRAM? Is it possible to change this feature? I suppose that Linux use it to recover the data to the memories that were low powered, but why the whole OCRAM?

Refering to application note AN5127 section 3.2 only the first 0x1000 byte of the OCRAM are reserved for frequency scaling used for support low power mode for DDR.

0 Kudos
Reply