From owner-freebsd-ppc@FreeBSD.ORG Tue Feb 24 16:41:33 2009 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFA0410656C1 for ; Tue, 24 Feb 2009 16:41:33 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id AFABB8FC26 for ; Tue, 24 Feb 2009 16:41:33 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) id <0KFK00402X18YH00@smtpauth1.wiscmail.wisc.edu> for freebsd-ppc@freebsd.org; Tue, 24 Feb 2009 10:41:32 -0600 (CST) Received: from trantor.tachypleus.net (adsl-99-154-1-172.dsl.mdsnwi.sbcglobal.net [99.154.1.172]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0KFK0001MX10UY40@smtpauth1.wiscmail.wisc.edu>; Tue, 24 Feb 2009 10:41:25 -0600 (CST) Date: Tue, 24 Feb 2009 10:42:17 -0600 From: Nathan Whitehorn In-reply-to: To: Aleksey V Fedorov Message-id: <49A42369.600@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=99.154.1.172 X-Spam-PmxInfo: Server=avs-11, Version=5.5.1.360522, Antispam-Engine: 2.6.1.350677, Antispam-Data: 2009.2.24.161024, SenderIP=99.154.1.172 References: <49A2704F.4060703@semihalf.com> User-Agent: Thunderbird 2.0.0.19 (X11/20090126) Cc: freebsd-ppc@freebsd.org Subject: Re: boot process 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: Tue, 24 Feb 2009 16:41:34 -0000 Aleksey V Fedorov wrote: > > Hi! > > On Mon, 23 Feb 2009, Rafal Jaworowski wrote: > >> 2. Hack e500_init() routine in the kernel to hard code some config >> data it >> normally gets from loader, like physical RAM size, memory regions >> number etc., >> CCSR base address, CCB clock frequency, maybe something more, see >> e500_init() >> for details. > > What is regular method to allocate some piece of memory in e500_init() > for unflatten device tree structures? Board loader provide pointer to to > the device-tree block in r3(i.e. void *mdp argument of e500_init()). > I can parse them, but where to store tree at this point? FreeBSD currently does not support the flattened device trees used by Linux. Instead, it uses a hardcoded set of board information, which will do fine as a temporary solution. If you wish to add support, I would suggest looking at how the PowerPC AIM code uses Open Firmware to obtain boot parameters, and also at the Open Firmware interface layer (as implemented, for example, in sys/dev/ofw/ofw_standard.c). This is something I've been meaning to do for some time in order to facilitate a Cell port. -Nathan