We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi all,
I expect to disable alignment check on Cortex-A53 processor but a misaligned access to normal memory by STR instruction still causes an alignment fault data abort exception.
The processor runs an OS in EL1 that is using non-secure AArch32 and SCTLR.A has been set to 0 already but it didn't work.
According to Arm Architecture Reference Manual for A-Profile architecture E2.6.2 Unaligned Data access, an unaligned access by LDR/STR instruction seems to be permitted.
My test code looks like the following:
uint8_t *buf = malloc(5); // buf is word aligned buf++; // make buf unaligned *(uint32_t *)buf = 0; // alignment fault. Assembler code is like STR R3, [R4,#1]
What could be the possible reason of this alignment fault?
Thanks for all replies.
The problem is solved when MMU is enable.