From owner-freebsd-sparc64@FreeBSD.ORG Mon Jul 7 14:34:01 2003 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 10BC437B401 for ; Mon, 7 Jul 2003 14:34:01 -0700 (PDT) Received: from mail.cyberonic.com (mail.cyberonic.com [4.17.179.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29E3843F93 for ; Mon, 7 Jul 2003 14:34:00 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (node-40244c0a.sfo.onnet.us.uu.net [64.36.76.10]) by mail.cyberonic.com (8.12.8/8.12.5) with ESMTP id h67LwsMa015930; Mon, 7 Jul 2003 17:58:55 -0400 Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.9/8.11.6) id h67LYGfl075050; Mon, 7 Jul 2003 14:34:16 -0700 (PDT) (envelope-from jmg) Date: Mon, 7 Jul 2003 14:34:16 -0700 From: John-Mark Gurney To: Marcel Moolenaar Message-ID: <20030707213416.GG44762@funkthat.com> Mail-Followup-To: Marcel Moolenaar , sparc64@freebsd.org References: <20030707210543.GA29440@ns1.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030707210543.GA29440@ns1.xcllnt.net> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: sparc64@freebsd.org Subject: Re: pre-newbus address decoding X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2003 21:34:01 -0000 Marcel Moolenaar wrote this message on Mon, Jul 07, 2003 at 14:05 -0700: > I have a current need and a possible future need to talk to hardware > before newbus has been initialized properly. Yes, we're talking low- > level console code (again :-), but also remote debugging for example. > > Using OFW it's easy enough to get the phandle of the the serial > console (if the console is serial) and read the "reg" property. > The address obtained that way is not (yet) suitable for actual > I/O, because we need to decode it (I expect you know this, but > it makes a nice introduction :-) What exactly are you trying to do with this? Why can't you interact with the OFW interface to the device instead of trying to twiddle the bits yourself? Why doesn't the OF_read, etc interfaces work for what you need? If you're so early that newbus hasn't been initalized then the fcode drivers should do all you need to do. Get a copy of P1275/D12 (P1275 draft 12) that is freely available. It will tell you ALL you need to know about it. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."