This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Unaligned access failed when SCTLR.A is 0 on Cortex-A53

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.