i.MX93 Linux OCRAM as shared memory

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

i.MX93 Linux OCRAM as shared memory

Jump to solution
1,490 Views
chrishoen
Contributor I

Hello

I'm working with an imx93, non-secure.

Here's my problem: I want to use ocram as shared memory between the linux a55 and the m33.

I have a linux user space test program and an m33 test program that can both access the ocram, but only the first 96KB (20480000 - 20497fff). Can I get more of it? The full 640KB?

The linux test program uses mmap at 0x20480000. It gives a bus error if it goes at or above 0x20498000.

Note: I won't be using the ethosu or rpmsg at all.

How does linux use ocram? Can I increase the 96KB to 640KB?

Thanks
Chris

0 Kudos
Reply
1 Solution
1,454 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

You can try to modify ocram permission settings in ATF:plat/imx/imx93/trdc_config.h

Add more memory blocks in trdc_n_mbc, 0-5 means six memory blocks(6*16KB=96KB), you need add more.

Zhiming_Liu_0-1725004694351.png


Best Regards
Zhiming

View solution in original post

0 Kudos
Reply
1 Reply
1,455 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

You can try to modify ocram permission settings in ATF:plat/imx/imx93/trdc_config.h

Add more memory blocks in trdc_n_mbc, 0-5 means six memory blocks(6*16KB=96KB), you need add more.

Zhiming_Liu_0-1725004694351.png


Best Regards
Zhiming

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1942812%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ei.MX93%20Linux%20OCRAM%20as%20shared%20memory%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1942812%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%3C%2FP%3E%3CP%3EI'm%20working%20with%20an%20imx93%2C%20non-secure.%3C%2FP%3E%3CP%3EHere's%20my%20problem%3A%20I%20want%20to%20use%20ocram%20as%20shared%20memory%20between%20the%20linux%20a55%20and%20the%20m33.%3C%2FP%3E%3CP%3EI%20have%20a%20linux%20user%20space%20test%20program%20and%20an%20m33%20test%20program%20that%20can%20both%20access%20the%20ocram%2C%20but%20only%20the%20first%2096KB%20(20480000%20-%2020497fff).%20Can%20I%20get%20more%20of%20it%3F%20The%20full%20640KB%3F%3C%2FP%3E%3CP%3EThe%20linux%20test%20program%20uses%20mmap%20at%200x20480000.%20It%20gives%20a%20bus%20error%20if%20it%20goes%20at%20or%20above%200x20498000.%3C%2FP%3E%3CP%3ENote%3A%20I%20won't%20be%20using%20the%20ethosu%20or%20rpmsg%20at%20all.%3C%2FP%3E%3CP%3EHow%20does%20linux%20use%20ocram%3F%20Can%20I%20increase%20the%2096KB%20to%20640KB%3F%3C%2FP%3E%3CP%3EThanks%3CBR%20%2F%3EChris%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1944283%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20i.MX93%20Linux%20OCRAM%20as%20shared%20memory%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1944283%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20%3C%2FP%3E%0A%3CP%3EYou%20can%20try%20to%20modify%20ocram%20permission%20settings%20in%20ATF%3Aplat%2Fimx%2Fimx93%2Ftrdc_config.h%3C%2FP%3E%0A%3CP%3EAdd%20more%20memory%20blocks%20in%26nbsp%3B%3CSPAN%3Etrdc_n_mbc%2C%200-5%20means%20six%20memory%20blocks(6*16KB%3D96KB)%2C%20you%20need%20add%20more.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Zhiming_Liu_0-1725004694351.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Zhiming_Liu_0-1725004694351.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F296261iCBA8A590A6CA32B9%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Zhiming_Liu_0-1725004694351.png%22%20alt%3D%22Zhiming_Liu_0-1725004694351.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EBest%20Regards%3CBR%20%2F%3EZhiming%3C%2FP%3E%3C%2FLINGO-BODY%3E