[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Unaligned access in kernel on ARMv6+ (Re: CVS commit: src/sys/dev/usb)
On 06/01/2019 08:46, Rin Okuyama wrote:
(CC added to port-arm%NetBSD.org@localhost)
Let me summarize the problem briefly. In axe(4), there is a code where
memcpy() is carried out from 2-byte aligned buffer to 4-byte structure:
This results in kernel panic due to alignment fault on earmvhf:
In short, this is because -munaligned-access is enabled on ARMv6+ by
default for GCC. As the unaligned memory access is forbidden in the
supervisor mode unlike in the user mode, we need to explicitly specify
-mno-unaligned-access for kernel on ARMv6+.
I'm pretty sure this is the same as http://gnats.netbsd.org/50038
Maybe I should be brave enough to stop using PMAP_NOCACHE in bus_dma.c
for armv6+ and fix any missing bus_dmamap_sync calls.
Main Index |
Thread Index |