linux-mips
[Top] [All Lists]

Re: PROM variables

To: linux-mips@linux-mips.org
Subject: Re: PROM variables
From: Vincent Stehlé <vincent.stehle@stepmind.com>
Date: Thu, 13 Mar 2003 17:08:00 +0100
In-reply-to: <20030313102601.GD24866@bogon.ms20.nix>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <3E7057A6.60007@stepmind.com> <20030313102601.GD24866@bogon.ms20.nix>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4a) Gecko/20030302
Guido Guenther wrote:
[..]
When doing this I'd write into the NVRAM
directly instead of using the Arcs functions, I think the necessary info
is in the IRIX headers.

I had a look at the ARC spec. (ARC/riscspec.pdf), and I am affraid the only (documented) way to access PROM env. variables are the two get/set functions.

In that case, the /proc approach makes sense IMHO.

Looking at hpc3 spec. and ip22-sc.c, I understand that PROM data are stored in the EEPROM behind the hpc3.

Maybe a reasonable approach is:

o write a new char device driver (as pc's /dev/nvram for example)
o move eeprom read/write routines from ip22-sc.c somewhere else,
  and use those routines both in ip22-sc.c and the char driver
o guess the format/offsets of the info. stored in nvram
o then write some user space app. to do the env. variable
  specific part.

In that latter case, the /proc approach makes less sense IMHO.

What do you think ? Am I missing some documentation ? Is there more in the IRIX headers ? (can't check right now, but I have them at home)

Regards,

--
 Vincent Stehlé


<Prev in Thread] Current Thread [Next in Thread>