Accessing NVRAM on the Maple board

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Dec 28 10:21:47 EST 2005


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