Subject: Re: Generic configuration requests outside of config files?
To: None <tech-kern@NetBSD.org>
From: Peter Seebach <seebs@plethora.net>
List: tech-kern
Date: 02/20/2006 05:20:44
In message <20060220092346.GB15888@drowsy.duskware.de>, Martin Husemann writes:
>On Sun, Feb 19, 2006 at 07:12:34PM -0600, Peter Seebach wrote:
>> 	if (board_info_get("%s-mac", sc->sc_dev->dv_xname)) {
>> 		...
>> 	}
>
>For another example of such a hack gid for prom_getether()
>
>> BTW, if the answer is "we already have this, why aren't you using it", I'd
>> love to hear it.  :)
>
>Well, on ports with sane firmware (where you can "setenv XXX yyy") we
>already have it, but there is no MI way to query it. A start for an API
>can be found in sys/dev/sparc/include/promlib.h.

There's also one in the PPC tree with board_info_init, board_info_set,
board_info_get, etcetera.

We have two implementations of essentially the same thing.  I think this calls
for a single API that would allow us to generalize, and maybe provide some
similar functionality on x86, which desperately needs it.

-s