From owner-freebsd-arm@FreeBSD.ORG Sat Aug 3 16:31:44 2013 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B89CBB26; Sat, 3 Aug 2013 16:31:44 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id 98108271A; Sat, 3 Aug 2013 16:31:44 +0000 (UTC) Received: from bender.Home (97e5e46b.skybroadband.com [151.229.228.107]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id B8BFB5E200; Sat, 3 Aug 2013 16:31:42 +0000 (UTC) Date: Sat, 3 Aug 2013 17:31:35 +0100 From: Andrew Turner To: Ian Lepore Subject: Re: Kernel Panic on DREAMPLUG: Alignment Fault 1 Message-ID: <20130803173135.76566eeb@bender.Home> In-Reply-To: <1375538681.45247.273.camel@revolution.hippie.lan> References: <51F92F79.9010809@gmail.com> <1375309907.45247.185.camel@revolution.hippie.lan> <51F9C81A.7000106@gmail.com> <1375358623.45247.189.camel@revolution.hippie.lan> <51FA1D2B.9090009@gmail.com> <1375363713.45247.193.camel@revolution.hippie.lan> <51FA8946.8030301@gmail.com> <1375374521.45247.211.camel@revolution.hippie.lan> <20130803083248.342108c2@bender.Home> <1375538681.45247.273.camel@revolution.hippie.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org, mattia.rossi.mate@gmail.com X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 16:31:44 -0000 On Sat, 03 Aug 2013 08:04:41 -0600 Ian Lepore wrote: > On Sat, 2013-08-03 at 08:32 +0100, Andrew Turner wrote: > > Can you try the patch at [1]. It should fix the stack alignment in > > exceptions. I suspect gcc is working in this case because it doesn't > > generate any instructions that rely on the stack alignment, where > > clang does. > > > > Andrew > > > > [1] http://people.freebsd.org/~andrew/trapframe_align2.diff > > It's actually not clang vs gcc, it's EABI vs OABI on armv5te. EABI > fails the same with clang and gcc. > > With your patch and gcc EABI I get: > > ... > da1: 40.000MB/s transfers > da1: 15193MB (31116288 512 byte sectors: 255H 63S/T 1936C) > da1: quirks=0x3 > Fatal kernel mode data abort: 'Alignment Fault 1' > trapframe: Fatal kernel mode data abort: 'Alignment Fault 1' > trapframe: Fatal kernel mode data abort: 'Alignment Fault 1' > trapframe: Fatal kernel mode data abort: 'Alignment Fault 1' > [lots more lines of that] > trapframe: Fatal kernel mode data abort: 'Alignment Fault 1' > trapframe: Fatal kernel mode data abort: 'Alignment Fault 1' > Fatal kernel mode prefetch abort at 0xFatal kernel mode data abort: > 'Alignment Fault 1' trapframe: Fatal kernel mode data abort: > 'Alignment Fault 1' trapframe: Fatal kernel mode data abort: > 'Alignment Fault 1' > > And it just continued like that for quite a while, mostly data abort > with the occasional prefetch abort thrown in. Eventually it locked > hard. It looks like I missed setting the alignment in one of the ARMv4/5 macros. I have an updated patch at [1]. [1] http://people.freebsd.org/~andrew/trapframe_align3.diff