From owner-freebsd-ppc@FreeBSD.ORG Fri Oct 19 01:13:34 2012 Return-Path: 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 64F1EA59 for ; Fri, 19 Oct 2012 01:13:34 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 119268FC0C for ; Fri, 19 Oct 2012 01:13:32 +0000 (UTC) Received: by mail-vc0-f182.google.com with SMTP id fw7so13237297vcb.13 for ; Thu, 18 Oct 2012 18:13:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; bh=l1LeRHmmWjonEFpJMmsFgvLkPaysqS0K++KFUb2Q9kE=; b=gTKhJ2yGEubD5sZnCyETLzR/8+yXgD8v8d/9aSfxmLA7s8inSaaBcsEmUbyHaj8lak Wqi+Av1Eqf8nPpJTyflC00BcmSnpni6ejZ0cWmfuGNosHIlVB3Pcdn5ySqKgyKtcSFt0 TJlkFYTMobhp9ax21jvm8PUiRgVR8xKpkOmuujAMFmPW9h7kUzY/UkJmB3XITvyk1Ptg w513bA7mL1MsksviwSsHQFmMvGCxxzGycjlI9DND6XAjctAii29hM1wbv0b13FUVc8XZ leDtFvxFi4uWcnEzbB+DC2MibnK1Yne0wRtogrpy0cNNH2nVOZPh6AlE3EJHiokJt681 lRGg== Received: by 10.220.16.12 with SMTP id m12mr8266419vca.14.1350609212225; Thu, 18 Oct 2012 18:13:32 -0700 (PDT) Received: from narn.knownspace (pool-108-48-127-15.washdc.fios.verizon.net. [108.48.127.15]) by mx.google.com with ESMTPS id y15sm286418vdg.22.2012.10.18.18.13.31 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 18 Oct 2012 18:13:32 -0700 (PDT) Date: Thu, 18 Oct 2012 21:13:29 -0400 From: Justin Hibbits To: Rob Ballantyne Subject: Re: Open Firmware available after kernel is running? Message-ID: <20121018211329.6bf8f5df@narn.knownspace> In-Reply-To: References: X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; powerpc-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@freebsd.org X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2012 01:13:34 -0000 On Thu, 18 Oct 2012 12:27:51 -0700 Rob Ballantyne wrote: > Hi All, > > I was wondering if the Open Firmware client interface is available > after the kernel is booted. > > For example, could I write a kernel module that accessed Open > Firmware via the client interface? I'm supposing that there is likely > a static variable that points to the client interface that is stashed > there in early startup -- I understand open firmware passes it's own > address to the client program on the stack. However, I'm also > guessing that the kernel may have taken completely over the machine in > a way that doesn't permit access to the OF client interface. > > It appears that ~/sys/powerpc/aim/locore64.S stashes the entry point > for OF in openfirmware_entry - is this still usable after the system > is up and running? > > Thanks, > > Rob Hi Rob, Yes, Open Firmware is available after bootup. sys/dev/openfirm provides a device interface for Open Firmware that you can look at as a reference. I'm hoping to eventually be able to quiesce Open Firmware on PowerPC, as it may be necessary for certain features (speed change on PowerBooks and sleep) to work. This is still a ways off though. - Justin