Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Jun 2016 20:30:14 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        freebsd-arm <freebsd-arm@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>, kwhite@site.uottawa.ca
Subject:   RE: RPI-B 11.0-ALPHA3 r301815 panic ["when connecting via WiFi"]
Message-ID:  <5B47CB62-5BB6-41F3-82F9-507B42EF161B@dsl-only.net>

index | next in thread | raw e-mail

https://lists.freebsd.org/pipermail/freebsd-current/2016-June/061904.html reports an RPI-B alignment fault for -r301815 (the snapshot) "when connecting via WiFi".

-r301872 ( https://lists.freebsd.org/pipermail/svn-src-head/2016-June/088339.html ) has a fix for networking vs. alignment handling for armv6 contexts that might be needed. Quoting:

> Author: ian
> Date: Mon Jun 13 16:48:27 2016
> New Revision: 301872
> URL: 
> https://svnweb.freebsd.org/changeset/base/301872
> 
> 
> Log:
>   Do not define __NO_STRICT_ALIGNMENT for armv6.  While the requirements
>   are no longer natural-alignment strict, there are still some restrictions.
>   
>   FreeBSD network code assumes data is naturally-aligned or is running
>   on a platform with no restrictions; pointers are not annotated to
>   indicate the data pointed to may be packed or unaligned.  The clang
>   optimizer can sometimes combine the load or store of a pair of adjacent
>   32-bit values into a single doubleword load/store, and that operation
>   requires at least 4-byte alignment.  __NO_STRICT_ALIGNMENT can lead
>   to tcp headers being only 2-byte aligned.
>   
>   Note that alignment faults remain disabled on armv6, this change reverts
>   only the defining of the symbol which leads to some overly-agressive code
>   shortcuts when building common/shared drivers and network code for arm.
>   
>   Approved by:	re(kib)
> 
> Modified:
>   head/sys/arm/include/_types.h
> 
> Modified: head/sys/arm/include/_types.h
> ==============================================================================
> --- head/sys/arm/include/_types.h	Mon Jun 13 11:19:06 2016	(r301871)
> +++ head/sys/arm/include/_types.h	Mon Jun 13 16:48:27 2016	(r301872)
> @@ -43,10 +43,6 @@
>  #error this file needs sys/cdefs.h as a prerequisite
>  #endif
>  
> -#if __ARM_ARCH >= 6
> -#define __NO_STRICT_ALIGNMENT
> -#endif
> -
>  /*
>   * Basic types upon which most other types are built.
>   */



===
Mark Millard
markmi at dsl-only.net



help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5B47CB62-5BB6-41F3-82F9-507B42EF161B>