reserved-memory { reserved: reserved@0xfac00000 { no-map; reg = <0 0xfac00000 0 0x1000000>; /* 16MB */ };};
I have a reserved memory area in my dtsi file. And that area resides in DRAM.
It will be used for Inter Processor Communication between M7(32 bit) and A7(64 bit).
And the actual mmap happens in an application (user space).
Currently the Linux generates the alignment fault when I use string libraries(i.e. memcpy), because they are the device memory region.
I think I can set it to be the "shareable / non-cacheable / normal memory region" since it's actually at DRAM and it's for IPC.
But I still couldn't find the proper compatible option that I can set that area as I want, and I am also not sure if it will work along with the mmap calls in user space.
What would be the right way to achieve this?
Is it a right way to prohibit all unaligned accesses to the reserved memory area when it's actually at DRAM?
Please give me an advice how I should approach the problem.
Thanks for reading!
I am sorry that my question was too verbose, the point was I get the alignment fault from my user space application which mmap the reserved memory in device tree. The reserved memory is actually in DRAM, so I don't understand why I need to do the aligned access for it. I found some information from ARM reference manual here :https://developer.arm.com/documentation/ka004708/latest/https://developer.arm.com/documentation/102376/0100/Alignment-and-endianness.I don't know how I can check MAIR registers from user space, but I think this looks to my case. So I was curious how I can set it to "the normal memory region" rather than "device region". This might be ARM architecture specific, so I thought this community is suitable to ask a question. If I am right, your suggestion is based on the kernel space. Could you please give me an advice on user space?Thanks for your answer!