Req review: OF_decode_addr()
jake at locore.ca
Tue Sep 2 07:21:53 PDT 2003
Apparently, On Mon, Sep 01, 2003 at 07:18:13PM -0700,
Marcel Moolenaar said words to the effect of;
> 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
> 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.
More information about the freebsd-sparc64