Accessing raw memory addresses on i.MX6 SoloX while running Linus on A9-core

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Accessing raw memory addresses on i.MX6 SoloX while running Linus on A9-core

跳至解决方案
1,421 次查看
andrewwayner
Contributor I

I am new to both Linux and to the i.MX6 SoloX. I am able to generate executables that run on Linux on the A9-core of the i.MX6 SoloX SABRE-SD. However, I seem to be having trouble trying to accesses memory directly (via pointers) per the System Memory Map specified in Table 2-1 of the reference manual. Is Linux using a virtual memory map? Can you please provide a procedure to be able to read/write to raw memory?

With this procedure I would like to be able to access the OCRAM, M4 TCM, and memory mapped CPU registers so that my program running on the Linux A9 core can interact/control the M4 core.

标签 (1)
0 项奖励
1 解答
865 次查看
Yuri
NXP Employee
NXP Employee

  For direct memory access Linux provides special node /dev/mem, which is used

by such tools as devmem. Really in our BSP there is the similar utility memtool

in /unit_tests directory. Basically You may look at memtool sources. Note, accesses

to non-supported address regions (hardcoded in /dev/mem driver) may cause system

issues.

  Supported registers may be shown using the next command

$ /unit_tests/memtool .

or

$ /unit_tests/memtool *

For help

$ /unit_tests/memtool


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
1 回复
866 次查看
Yuri
NXP Employee
NXP Employee

  For direct memory access Linux provides special node /dev/mem, which is used

by such tools as devmem. Really in our BSP there is the similar utility memtool

in /unit_tests directory. Basically You may look at memtool sources. Note, accesses

to non-supported address regions (hardcoded in /dev/mem driver) may cause system

issues.

  Supported registers may be shown using the next command

$ /unit_tests/memtool .

or

$ /unit_tests/memtool *

For help

$ /unit_tests/memtool


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励