Date: Mon, 9 Mar 2015 13:05:20 +0000 From: "meloun-miracle-cz (Michal Meloun)" <phabric-noreply@FreeBSD.org> To: freebsd-arm@freebsd.org Subject: [Differential] [Changed Subscribers] D2017: Allow to disable alignment faults in the kernel configuration file Message-ID: <5b814859c841d006aa8bfa8da5e67ed5@localhost.localdomain> In-Reply-To: <differential-rev-PHID-DREV-phrk75eo7uo5meyd5xay-req@FreeBSD.org> References: <differential-rev-PHID-DREV-phrk75eo7uo5meyd5xay-req@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5b814859c841d006aa8bfa8da5e67ed5>