从用户空间访问NOR内存 [英] Access NOR memory from userspace
问题描述
我和SRAM有类似的情况。我为 / dev / sram
写了一个块设备驱动程序。通过设备驱动程序访问会保留所有的Linux安全规则。
您没有提到如何访问该NOR内存。如果它在物理内存地址空间中,则驱动程序将执行 request_mem_region()
和 ioremap()
映射NOR内存进入虚拟内存空间。然后用户程序可以使用此块(或字符)设备上的标准文件I / O。
On my Compulab cm-x270 CoM Linux kernel placed in NOR. This kernel without MTD support, and after boot I can't access to NOR as MTD partition. My goal is update this kernel from userspace. Yes, update from bootloader by tftp most easier way, but I can't use it in this task. It is possible mapping NOR in /dev/mem or any another way?
I had a similar situation with SRAM. I wrote a block device driver for /dev/sram
. Access through a device driver preserves all of the Linux security rules.
You didn't mention how this NOR memory is accessed. If it's in the physical memory address space, then the driver would perform request_mem_region()
and ioremap()
to map the NOR memory into virtual kernel memory space. Then user programs can use standard file I/O on this block (or char) device.
这篇关于从用户空间访问NOR内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!