Accessing NVRAM on the Maple board

brian jewell brian.jewell at themis.com
Thu Dec 29 11:59:28 EST 2005


Ben,

<What kernel are you using ?>

I am not "bleeding edge"; I'm using 2.6.14.4.

Is there any configuration required for using nvram.c (nvram_64.c)? I see
the function names in the kernel map file. But when I do an "open" on
/dev/nvram, I get "No such device", even though the /dev/nvram device file
is there, and I have set the permissions to "666".

Do I need to include anything in my .config? I am basically building my
kernel with the Maple default configuration file.

Any help is appreciated.

regards,

--Brian


-----Original Message-----
From: Benjamin Herrenschmidt [mailto:benh at kernel.crashing.org]
Sent: Tuesday, December 27, 2005 3:22 PM
To: brian jewell
Cc: Dave Willoughby; linuxppc64-dev at ozlabs.org
Subject: Re: Accessing NVRAM on the Maple board


On Tue, 2005-12-27 at 14:38 -0800, brian jewell wrote:
> Benjamin,
>
> I think I need to reword my question...
>
> The company I work for is building a small footprint PPC970 board, based
on
> the Maple reference design, that uses a proprietary service processor. I
> need to be able to read NVRAM from Linux on our PPC970 board.
>
> There is a driver in <linux>/arch/ppc64/kernel called "nvram.c" that looks
> like it would provide the capability of reading NVRAM. I was wondering if
> anyone knew anything about this driver, such as if there is any
> documentation on how to use it?

What kernel are you using ? arch/ppc64 is gone on recent kernels... The
powerpc architecture provides indeed a generic nvram access driver
(nowadays, it's in arch/powerpc/kernel/nvram_64.c), which is just a
read/write interface via /dev/nvram that also implements open firmware
partitions. If you don't want to use that format, you may need to modify
the driver slightly to get you raw access.

The driver itself doesn't have any code for the nvram access itself, it
goes through a pair of platform callbacks that your platform code will
have to provide for doing the actual reads & writes to the nvram.

Ben.





More information about the Linuxppc64-dev mailing list