linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Accessing nvram rom the linux users space
@ 2002-11-12 18:29 Mike Moleschi
  0 siblings, 0 replies; 5+ messages in thread
From: Mike Moleschi @ 2002-11-12 18:29 UTC (permalink / raw)
  To: linuxppc-embedded


I am using a PPC board running a version of Hard Hat linux, and
currently using version of the 2.4.20 kernel.  On the board there
are several places for storage: 32MB of SRAM, 4MB of flash-EPROM,
32kB of NVRAM, and 16k-bit serial EEPROM. The SRAM, flash and NVRAM
are memory mapped.  The NVRAM is actually battery backed up RAM
that includes a RTC in the last 8 bytes of addressed memory. Right
now there is nothing stored in the NVRAM (PPC Boot is stored in
part of the flash, and the PPC environment variable are in the
serial EEPROM.)  NVRAM is mapped from 0xF0200000 to 0xF0207FFF.

I would like to be able to uses the NVRAM from the linux users
space.  Ideally it would just be an extention of my filesystem,
where I could place one or two small files on it.  This would
let me store information that needs to be kept through a loss of
power.

So basically I think what I am trying to figure out, is how do I
mount the NVRAM as a disk.




--


Mike Moleschi
moleschi@rmsweldingsystems.com
RMS Welding Systems
1409 - 4th Street, Nisku, Alberta CANADA	T9E 7M9
Tel: (780)955-3907	Fax: (780)955-3996


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* RE: Accessing nvram rom the linux users space
@ 2002-11-12 18:39 Wright, David
  2002-11-12 19:52 ` Mike Moleschi
  0 siblings, 1 reply; 5+ messages in thread
From: Wright, David @ 2002-11-12 18:39 UTC (permalink / raw)
  To: moleschi, linuxppc-embedded


Does it have to be a disk?  The Walnut has a similar setup to
what you are describing and allows you to define a device,
/dev/nvram, that functions as a disk-like object (you can
open it, seek it, read and write it).

  -- David Wright, InfiniSwitch Corp.


> -----Original Message-----
> From: Mike Moleschi [mailto:moleschi@rmsweldingsystems.com]
> Sent: Tuesday, November 12, 2002 1:29 PM
> To: linuxppc-embedded@lists.linuxppc.org
> Subject: Accessing nvram rom the linux users space
>
>
>
> I am using a PPC board running a version of Hard Hat linux, and
> currently using version of the 2.4.20 kernel.  On the board there
> are several places for storage: 32MB of SRAM, 4MB of flash-EPROM,
> 32kB of NVRAM, and 16k-bit serial EEPROM. The SRAM, flash and NVRAM
> are memory mapped.  The NVRAM is actually battery backed up RAM
> that includes a RTC in the last 8 bytes of addressed memory. Right
> now there is nothing stored in the NVRAM (PPC Boot is stored in
> part of the flash, and the PPC environment variable are in the
> serial EEPROM.)  NVRAM is mapped from 0xF0200000 to 0xF0207FFF.
>
> I would like to be able to uses the NVRAM from the linux users
> space.  Ideally it would just be an extention of my filesystem,
> where I could place one or two small files on it.  This would
> let me store information that needs to be kept through a loss of
> power.
>
> So basically I think what I am trying to figure out, is how do I
> mount the NVRAM as a disk.
>
>
>
>
> --
>
>
> Mike Moleschi
> moleschi@rmsweldingsystems.com
> RMS Welding Systems
> 1409 - 4th Street, Nisku, Alberta CANADA	T9E 7M9
> Tel: (780)955-3907	Fax: (780)955-3996
>
>


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: Accessing nvram rom the linux users space
  2002-11-12 18:39 Accessing nvram rom the linux users space Wright, David
@ 2002-11-12 19:52 ` Mike Moleschi
  2002-11-12 20:21   ` Kenneth Johansson
  2002-11-13  9:53   ` Matthias Fuchs
  0 siblings, 2 replies; 5+ messages in thread
From: Mike Moleschi @ 2002-11-12 19:52 UTC (permalink / raw)
  To: Wright, David, linuxppc-embedded


I guess it has to be a disk in that I would like to have a file
system on it and move files around on it -- basically I want to
be able to treat it like a disk from a command line perspective.

I can access the nvram through a C program using open() and mmap(),
but I would like to be level higher then that.



Mike



Wright, David wrote:
> Does it have to be a disk?  The Walnut has a similar setup to
> what you are describing and allows you to define a device,
> /dev/nvram, that functions as a disk-like object (you can
> open it, seek it, read and write it).
>
>   -- David Wright, InfiniSwitch Corp.
>
>
>
>>-----Original Message-----
>>From: Mike Moleschi [mailto:moleschi@rmsweldingsystems.com]
>>Sent: Tuesday, November 12, 2002 1:29 PM
>>To: linuxppc-embedded@lists.linuxppc.org
>>Subject: Accessing nvram rom the linux users space
>>
>>
>>
>>I am using a PPC board running a version of Hard Hat linux, and
>>currently using version of the 2.4.20 kernel.  On the board there
>>are several places for storage: 32MB of SRAM, 4MB of flash-EPROM,
>>32kB of NVRAM, and 16k-bit serial EEPROM. The SRAM, flash and NVRAM
>>are memory mapped.  The NVRAM is actually battery backed up RAM
>>that includes a RTC in the last 8 bytes of addressed memory. Right
>>now there is nothing stored in the NVRAM (PPC Boot is stored in
>>part of the flash, and the PPC environment variable are in the
>>serial EEPROM.)  NVRAM is mapped from 0xF0200000 to 0xF0207FFF.
>>
>>I would like to be able to uses the NVRAM from the linux users
>>space.  Ideally it would just be an extention of my filesystem,
>>where I could place one or two small files on it.  This would
>>let me store information that needs to be kept through a loss of
>>power.
>>
>>So basically I think what I am trying to figure out, is how do I
>>mount the NVRAM as a disk.
>>
>>
>>
>>
>>--
>>
>>
>>Mike Moleschi
>>moleschi@rmsweldingsystems.com
>>RMS Welding Systems
>>1409 - 4th Street, Nisku, Alberta CANADA	T9E 7M9
>>Tel: (780)955-3907	Fax: (780)955-3996
>>
>>
>
>
>
>


--


Mike Moleschi
moleschi@rmsweldingsystems.com
RMS Welding Systems
1409 - 4th Street
Nisku, Alberta   CANADA
T9E 7M9
Tel: (780)955-3907
Fax: (780)955-3996


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: Accessing nvram rom the linux users space
  2002-11-12 19:52 ` Mike Moleschi
@ 2002-11-12 20:21   ` Kenneth Johansson
  2002-11-13  9:53   ` Matthias Fuchs
  1 sibling, 0 replies; 5+ messages in thread
From: Kenneth Johansson @ 2002-11-12 20:21 UTC (permalink / raw)
  To: moleschi; +Cc: Wright, David, Linuxppc embedded


On Tue, 2002-11-12 at 20:52, Mike Moleschi wrote:
>
> I guess it has to be a disk in that I would like to have a file
> system on it and move files around on it -- basically I want to
> be able to treat it like a disk from a command line perspective.

Good luck finding any filesystem that works on 32kB.

--
Kenneth Johansson
Ericsson AB                       Tel: +46 8 404 71 83
Borgafjordsgatan 9                Fax: +46 8 404 72 72
164 80 Stockholm                  kenneth.johansson@etx.ericsson.se


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: Accessing nvram rom the linux users space
  2002-11-12 19:52 ` Mike Moleschi
  2002-11-12 20:21   ` Kenneth Johansson
@ 2002-11-13  9:53   ` Matthias Fuchs
  1 sibling, 0 replies; 5+ messages in thread
From: Matthias Fuchs @ 2002-11-13  9:53 UTC (permalink / raw)
  To: linuxppc-embedded


Hi Mike,

you probably can check out if the "MTD Test driver using RAM" might
help you. This MTD driver uses memory mapped SRAM (or in your case NVRAM).

But all filesystem bring a huge overhead. With 32K of NVRAM you will not
have much usable place for you data in the files left.

You should consider using part of your flash for storing data in
MTD block devices with filesystems (e.g. JFFS2).

I think the mmap example for the NVRAM that I send to you is a good and efficent
solution for the NVRAM.


Matthias


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2002-11-13  9:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-12 18:39 Accessing nvram rom the linux users space Wright, David
2002-11-12 19:52 ` Mike Moleschi
2002-11-12 20:21   ` Kenneth Johansson
2002-11-13  9:53   ` Matthias Fuchs
  -- strict thread matches above, loose matches on Subject: below --
2002-11-12 18:29 Mike Moleschi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).