From owner-freebsd-arm@FreeBSD.ORG Mon May 6 11:47:13 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7D281E2C; Mon, 6 May 2013 11:47:13 +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 60792E87; Mon, 6 May 2013 11:47:12 +0000 (UTC) Received: from bender.lan (46-37-55-91.dsl.cnl.uk.net [46.37.55.91]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id 1F8385E1F5; Mon, 6 May 2013 11:47:11 +0000 (UTC) Date: Mon, 6 May 2013 12:47:11 +0100 From: Andrew Turner To: Tim Kientzle Subject: Re: Is this related to the general panic discussed in freebsd-current? Message-ID: <20130506124711.23978ec8@bender.lan> In-Reply-To: <724191A9-57F4-4D66-9E4A-EBBC13BDC0D1@freebsd.org> References: <51835891.4050409@thieprojects.ch> <03971BD1-4ADE-4435-BDD0-B94B62634F1D@bsdimp.com> <5183BF8C.4040406@thieprojects.ch> <6D0E82C9-79D1-4804-9B39-3440F99AA8FE@kientzle.com> <20130505140006.0d671ba5@bender> <20130505233729.63ac23bc@bender.lan> <724191A9-57F4-4D66-9E4A-EBBC13BDC0D1@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: freebsd-arm@freebsd.org 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: Mon, 06 May 2013 11:47:13 -0000 On Sun, 5 May 2013 22:39:56 -0700 Tim Kientzle wrote: > Here's a version of stack_capture that allows a Clang-built > OABI kernel with WITNESS enabled to boot: > > /* In sys/arm/arm/stack_machdep.c */ > static void > stack_capture(struct stack *st, u_int32_t *frame) > { > vm_offset_t callpc; > > stack_zero(st); > while (INKERNEL(frame)) { > callpc = frame[1]; > if (stack_put(st, callpc) == -1) > break; > frame = (u_int32_t *)(frame[0]); > } > } It looks like this should work in most cases where fp and lr are next to each other (ip and sp are between them but doesn't need to be saved). > > > From the above, it sounds like this should not be committed; > rather, we should fix Clang's OABI support to emit the right > frame layout. I've not yet started to look through Clang to > try to figure out how to do that…. Any pointers? ;-) Disable this stack unwind code? I'll fix the clang EABI issue and switch the ABI. Andrew