alignment fault from mmaped memory (ARM A53)
by JasonKim from LinuxQuestions.org on (#6DXK2)
Code: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.
Currently the Linux generates the alignment fault when I use string libraries(i.e. memcpy)
And I suspect they are set to be the device memory region.
https://developer.arm.com/documentat...004708/latest/
https://developer.arm.com/documentat...and-endianness.
I don't understand why the reserved memory at DRAM requires the aligned access.
So I have 2 questions on it.
1. How can I check the MAIR register values on my mmaped memory from user-space? I think EL0 doesn't have right to access it.
2. Assuming it's "the device memory region", how I can set it to be "the normal memory region" on the user-space?
Thanks for reading!
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.
Currently the Linux generates the alignment fault when I use string libraries(i.e. memcpy)
And I suspect they are set to be the device memory region.
https://developer.arm.com/documentat...004708/latest/
https://developer.arm.com/documentat...and-endianness.
I don't understand why the reserved memory at DRAM requires the aligned access.
So I have 2 questions on it.
1. How can I check the MAIR register values on my mmaped memory from user-space? I think EL0 doesn't have right to access it.
2. Assuming it's "the device memory region", how I can set it to be "the normal memory region" on the user-space?
Thanks for reading!