Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Sep 2003 10:22:37 -0400
From:      Jake Burkholder <jake@locore.ca>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        sparc64@FreeBSD.org
Subject:   Re: Req review: OF_decode_addr()
Message-ID:  <20030902142236.GA76041@locore.ca>
In-Reply-To: <20030902021813.GA2300@dhcp01.pn.xcllnt.net>
References:  <20030902021813.GA2300@dhcp01.pn.xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Apparently, On Mon, Sep 01, 2003 at 07:18:13PM -0700,
	Marcel Moolenaar said words to the effect of;

> Gang,
> 
> Attached a patch to add function OF_decode_addr(). The function
> takes a package handle (phandle_t) and returns the physical
> (decoded) address at which it resides as well as it space.
> This function is needed by uart(4) to for low-level console
> access.
> 
> There's one thing I'm not happy about and that's the call to
> ofw_isa_map_iorange(). It makes it impossible to create a kernel
> without isa. It makes sense to move the bulk of the code in
> OF_decode_addr() to the respective bus drivers and have some
> linker set to tie bus name to function pointer. I'm not sure
> it's important to have that right away or if we can commit this
> and deal with that later?

I'm biased because I want uart to go in so keyboards work :), but
I think this can be dealt with later.  What you suggest is a good
idea, I'm just hesitant to put too much effort into infrastructure
for supporting early device access because its a specialized thing
and hopefully will only be used for this class of devices.  I like
that its all contained in one function that just does its job and
doesn't really affect anything else.

You could use #ifdef DEV_ISA, DEV_EBUS etc around the bus specific
parts.  Note that syscons depends on isa anyway, and this is unlikely
to change very soon, so I think we're kind of stuck with it.  Such is
life in FreeBSD.

I say commit it.

Jake



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