[Differential] [Changed Subscribers] D2017: Allow to disable alignment faults in the kernel configuration file

meloun-miracle-cz (Michal Meloun) phabric-noreply at FreeBSD.org
Mon Mar 9 13:05:21 UTC 2015


meloun-miracle-cz added a subscriber: meloun-miracle-cz.
meloun-miracle-cz added a comment.

I don't think it's that simple.
The "unaligned access" term on ARM consist of two things. First is "A" bit in SCTRL and second is option for compiler "-mno-unaligned-access / -munaligned-access". Unfortunately, because CPU allows unaligned accesses only for some instruction, the compiler must still know if accesses aligned or unaligned data.

Therefore, properly written code compiled **cannot cause** unaligned abort if is compiled with with -mno-unaligned-access and runs on CPU that have CTRL.A bit set.
And in opposite, bad code **can cause** unaligned abort even if is complied with  -munaligned-access and runs on CPU that have CTRL.A bit cleared.

Please see ARM ARM, section "A3.2.1 Unaligned data access" for details.

REVISION DETAIL
  https://reviews.freebsd.org/D2017

To: zbb, ian, andrew, imp
Cc: meloun-miracle-cz, freebsd-arm


More information about the freebsd-arm mailing list