Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jul 2003 14:34:16 -0700
From:      John-Mark Gurney <gurney_j@efn.org>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        sparc64@freebsd.org
Subject:   Re: pre-newbus address decoding
Message-ID:  <20030707213416.GG44762@funkthat.com>
In-Reply-To: <20030707210543.GA29440@ns1.xcllnt.net>
References:  <20030707210543.GA29440@ns1.xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030707213416.GG44762>