Linux MIPS Architecture development
 help / color / mirror / Atom feed
* PROM variables
@ 2003-03-13 10:04 Vincent Stehlé
  2003-03-13 10:17 ` Juan Quintela
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Vincent Stehlé @ 2003-03-13 10:04 UTC (permalink / raw)
  To: linux-mips


Hi all,

Is there a way to get/set PROM variables under Linux ?

I have an indigo2 with no display, and setting the variables without 
reverting to the monitor through the serial line would be very handy.

As I doubt there is currently a solution, I was thinking about 
implementing this as a /proc subdir. What do you think ?

Regards,

-- 
  Vincent Stehlé

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PROM variables
  2003-03-13 10:04 PROM variables Vincent Stehlé
@ 2003-03-13 10:17 ` Juan Quintela
  2003-03-13 10:26 ` Guido Guenther
  2003-03-13 10:27 ` Ladislav Michl
  2 siblings, 0 replies; 8+ messages in thread
From: Juan Quintela @ 2003-03-13 10:17 UTC (permalink / raw)
  To: Vincent Stehlé; +Cc: linux-mips

>>>>> "vincent" == Vincent Stehlé <vincent.stehle@stepmind.com> writes:

vincent> Hi all,

vincent> Is there a way to get/set PROM variables under Linux ?

vincent> I have an indigo2 with no display, and setting the variables without
vincent> reverting to the monitor through the serial line would be very handy.

vincent> As I doubt there is currently a solution, I was thinking about
vincent> implementing this as a /proc subdir. What do you think ?

You can set them through the serial console in the same way that you
can set it in the monitor?

Are you sure that you have set the prom variables to use the serial
console?

Later, Juan.

-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PROM variables
  2003-03-13 10:04 PROM variables Vincent Stehlé
  2003-03-13 10:17 ` Juan Quintela
@ 2003-03-13 10:26 ` Guido Guenther
  2003-03-13 11:33   ` Ladislav Michl
  2003-03-13 16:08   ` Vincent Stehlé
  2003-03-13 10:27 ` Ladislav Michl
  2 siblings, 2 replies; 8+ messages in thread
From: Guido Guenther @ 2003-03-13 10:26 UTC (permalink / raw)
  To: Vincent Stehlé; +Cc: linux-mips

Hi Vincent,
On Thu, Mar 13, 2003 at 11:04:22AM +0100, Vincent Stehlé wrote:
> Is there a way to get/set PROM variables under Linux ?
Not for IP22.

> I have an indigo2 with no display, and setting the variables without 
> reverting to the monitor through the serial line would be very handy.
If you pull out the graphics board the machine will switch to the serial
line.

> As I doubt there is currently a solution, I was thinking about 
> implementing this as a /proc subdir. What do you think ?
What about multiple files in /proc/arcs which have the PROM variables as
name and its value as contents? 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.
Regards,
 -- Guido

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PROM variables
  2003-03-13 10:04 PROM variables Vincent Stehlé
  2003-03-13 10:17 ` Juan Quintela
  2003-03-13 10:26 ` Guido Guenther
@ 2003-03-13 10:27 ` Ladislav Michl
  2 siblings, 0 replies; 8+ messages in thread
From: Ladislav Michl @ 2003-03-13 10:27 UTC (permalink / raw)
  To: Vincent Stehlé; +Cc: linux-mips

On Thu, Mar 13, 2003 at 11:04:22AM +0100, Vincent Stehlé wrote:
> Hi all,
> 
> Is there a way to get/set PROM variables under Linux ?

no.

> I have an indigo2 with no display, and setting the variables without 
> reverting to the monitor through the serial line would be very handy.
> 
> As I doubt there is currently a solution, I was thinking about 
> implementing this as a /proc subdir. What do you think ?

we discussed this issue on #irc yesterday. it seems that conclusion was
implement it as ioctl on some /dev/prom (?).

	ladis

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PROM variables
  2003-03-13 10:26 ` Guido Guenther
@ 2003-03-13 11:33   ` Ladislav Michl
  2003-03-13 11:42     ` Juan Quintela
  2003-03-13 11:42     ` Juan Quintela
  2003-03-13 16:08   ` Vincent Stehlé
  1 sibling, 2 replies; 8+ messages in thread
From: Ladislav Michl @ 2003-03-13 11:33 UTC (permalink / raw)
  To: Guido Guenther, Vincent Stehlé, linux-mips

On Thu, Mar 13, 2003 at 11:26:01AM +0100, Guido Guenther wrote:
[snip]
> > As I doubt there is currently a solution, I was thinking about 
> > implementing this as a /proc subdir. What do you think ?
> What about multiple files in /proc/arcs which have the PROM variables as
> name and its value as contents? 

hmm, how would you add/remove variable?

> 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.
> Regards,
>  -- Guido

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PROM variables
  2003-03-13 11:33   ` Ladislav Michl
@ 2003-03-13 11:42     ` Juan Quintela
  2003-03-13 11:42     ` Juan Quintela
  1 sibling, 0 replies; 8+ messages in thread
From: Juan Quintela @ 2003-03-13 11:42 UTC (permalink / raw)
  To: Ladislav Michl; +Cc: Guido Guenther, Vincent Stehlé, linux-mips

>>>>> "ladislav" == Ladislav Michl <ladis@linux-mips.org> writes:

ladislav> On Thu, Mar 13, 2003 at 11:26:01AM +0100, Guido Guenther wrote:
ladislav> [snip]
>> > As I doubt there is currently a solution, I was thinking about 
>> > implementing this as a /proc subdir. What do you think ?
>> What about multiple files in /proc/arcs which have the PROM variables as
>> name and its value as contents? 

ladislav> hmm, how would you add/remove variable?

echo "value" > new_variable_name 

??

Later, Juan.


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PROM variables
  2003-03-13 11:33   ` Ladislav Michl
  2003-03-13 11:42     ` Juan Quintela
@ 2003-03-13 11:42     ` Juan Quintela
  1 sibling, 0 replies; 8+ messages in thread
From: Juan Quintela @ 2003-03-13 11:42 UTC (permalink / raw)
  To: Ladislav Michl; +Cc: Guido Guenther, Vincent Stehlé, linux-mips

>>>>> "ladislav" == Ladislav Michl <ladis@linux-mips.org> writes:

ladislav> On Thu, Mar 13, 2003 at 11:26:01AM +0100, Guido Guenther wrote:
ladislav> [snip]
>> > As I doubt there is currently a solution, I was thinking about 
>> > implementing this as a /proc subdir. What do you think ?
>> What about multiple files in /proc/arcs which have the PROM variables as
>> name and its value as contents? 

ladislav> hmm, how would you add/remove variable?

Forgot to tell how to remove the variable in previous mail :)

rm old_variable 

should do, no need at all of ioctl crap :)

Later, Juan.



-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PROM variables
  2003-03-13 10:26 ` Guido Guenther
  2003-03-13 11:33   ` Ladislav Michl
@ 2003-03-13 16:08   ` Vincent Stehlé
  1 sibling, 0 replies; 8+ messages in thread
From: Vincent Stehlé @ 2003-03-13 16:08 UTC (permalink / raw)
  To: linux-mips

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é

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-03-13 16:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-13 10:04 PROM variables Vincent Stehlé
2003-03-13 10:17 ` Juan Quintela
2003-03-13 10:26 ` Guido Guenther
2003-03-13 11:33   ` Ladislav Michl
2003-03-13 11:42     ` Juan Quintela
2003-03-13 11:42     ` Juan Quintela
2003-03-13 16:08   ` Vincent Stehlé
2003-03-13 10:27 ` Ladislav Michl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox