From owner-freebsd-ppc@FreeBSD.ORG Wed Apr 4 00:16:40 2007 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2F8A316A403 for ; Wed, 4 Apr 2007 00:16:40 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.freebsd.org (Postfix) with ESMTP id B861D13C46E for ; Wed, 4 Apr 2007 00:16:39 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from [192.168.0.13] (dsl-63-249-90-35.cruzio.com [63.249.90.35]) by dommail.onthenet.com.au (MOS 3.7.5a-GA) with ESMTP id CRB17067 (AUTH peterg@ptree32.com.au); Wed, 4 Apr 2007 10:16:34 +1000 (EST) Message-ID: <4612EE60.8040103@freebsd.org> Date: Tue, 03 Apr 2007 17:16:32 -0700 From: Peter Grehan User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221) MIME-Version: 1.0 To: Andrew Turner References: <20070331141428.5f7cb6b4@hermies.int.fubar.geek.nz> <4612AA47.4060802@freebsd.org> <20070404081638.536ca636@hermies.int.fubar.geek.nz> In-Reply-To: <20070404081638.536ca636@hermies.int.fubar.geek.nz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@freebsd.org Subject: Re: Exception in openfirmware calling X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: grehan@freebsd.org List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Apr 2007 00:16:40 -0000 > I've used the ofw_stack code from NetBSD for now. It creates a new > stack with a real address. That will work, though I don't like the way it's implemented: the calls in all of the OFW routines is a little ugly. My plan was to have a call_onstack() routine that would allow a function to be executed on a specified stack. This can be used in other places too, such as when the initial thread has to switch over to it's allocated stack. > Unfortunately there is still an exception in an address that looks like > it is from openfirmware [1]. DAR 0xD575A998 That looks like a kernel virtual address: is it possible that a stack parameter is still getting through ? The BSD OFW routines try and allocate their parameters in bss (which should be 1:1 mapped), but sometimes a buffer will get passed through: e.g. a read/write. later, Peter.