From owner-freebsd-ppc@FreeBSD.ORG Thu Apr 5 08:55:57 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 CB5BE16A407; Thu, 5 Apr 2007 08:55:57 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fep04.xtra.co.nz (fep04.xtra.co.nz [210.54.141.242]) by mx1.freebsd.org (Postfix) with ESMTP id 256D813C465; Thu, 5 Apr 2007 08:55:56 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from serv.int.fubar.geek.nz ([222.155.162.141]) by fep04.xtra.co.nz with ESMTP id <20070405085554.ZENC25916.fep04.xtra.co.nz@serv.int.fubar.geek.nz>; Thu, 5 Apr 2007 20:55:54 +1200 Date: Thu, 5 Apr 2007 20:55:53 +1200 From: Andrew Turner To: grehan@freebsd.org Message-ID: <20070405205553.4245f497@hermies.int.fubar.geek.nz> In-Reply-To: <4612EE60.8040103@freebsd.org> References: <20070331141428.5f7cb6b4@hermies.int.fubar.geek.nz> <4612AA47.4060802@freebsd.org> <20070404081638.536ca636@hermies.int.fubar.geek.nz> <4612EE60.8040103@freebsd.org> X-Mailer: Claws Mail 2.6.1 (GTK+ 2.10.11; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Apr 2007 08:55:57 -0000 On Tue, 03 Apr 2007 17:16:32 -0700 Peter Grehan wrote: > > 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. I've managed to use it to get to the point when FreeBSD complains there is no network devices to mount root from. The OF_read and OF_write calls need the ofw_stack. I also allocated a page of real memory that I copy the string to display to in OF_write and read the input data from in OF_read. It is not the best fix but it does allow me to work on other parts of the kernel. Andrew