Subject: Re: Nvram device on NetBSD-CURRENT
To: Cyrille Szymanski <cns@szym.org>
From: Martin Husemann <martin@duskware.de>
List: port-i386
Date: 02/16/2005 19:59:19
On Wed, Feb 16, 2005 at 07:11:26PM +0100, Cyrille Szymanski wrote:
> Oh, it's even worse than that: tpb is ThinkPad centric (it reads the 
> eprom to detect lcd panel brightness changes, special key presses etc.) 

That sounds like /dev/nvram is not realy a nice kernel interface for it.

> and nvram-wakeup only works on some modern mainborads.

My point is: if there are ways to tell a machine "shutdown now and power
up automatically at time X" we should have a kernel interface that just
does this. Other architectures might have the same operation, but implemented
completely different. A quick search seems to suggest that there is not
even a stanard way to store the alarm time in the rtc nvram on i386, but
that it is bios dependend.

> I believe that many other bios vendors store similar information in this 
> area and thus I see the nvram driver as a way to avoid writing specific 
> drivers each time.

Now here is an area where /dev/nvram makes sense just as much as /dev/eeprom
on sun machines - a generic way to access manufacturer specific informations
from userland. But this is a compleletly different usage, IMHO.

Martin