Subject: Re: setting SRM variables from NetBSD
To: Dieter <netbsd@sopwith.solgatos.com>
From: Michael Kukat <michael@unixiron.org>
List: port-alpha
Date: 04/15/2005 06:16:04
Hi,

On Thu, 14 Apr 2005, Dieter wrote:
> > I'm going to implement an accessing and setting SRM variables from NetBSD.
> > I know it can be accessed through /proc in Linux, but what about NetBSD?
> > Another problem is, whether functions providing this can be accessed from
> > user mode or it must be from kernel mode.
> > Does anyone have any clue I can concentrate on or
> > a way it should be realized (to be recognized as proper solution)?

How about about a tool, say /usr/sbin/eeprom or, because this might hit other
platforms also, /usr/sbin/srmenv. This combined with something like
/dev/srmnvram, if there isn't already something suitable, and you're done.
There has to be implemented a small driver for the NVRAM, which is capable to
do read/write/seek (think it doesn't need more), and a userland tool which
knows about the structures in this NVRAM to manipulate them via the device
driver.

I don't think mapping the NVRAM of SRM to a filesystem is a brilliant idea.
Access on /dev/srmnvram should be limited to uid 0 or at least gid 0 in kernel.
There is no reason for "normal" users to play around with boot devices or other
parameters.

...Michael

-- 
http://www.unixiron.org/    Home Powered by: (Net|Open|Free)BSD IRIX NonStop-UX
Solaris AIX HP-UX Tru64 MUNIX Ultrix VMS SINIX Dolphin_Unix OpenStep MacOS A/UX