9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] NVRAM
@ 2003-08-26 21:17 Kenji Arisawa
  2003-08-26 22:22 ` zfolkerts
  2003-08-26 22:49 ` ron minnich
  0 siblings, 2 replies; 36+ messages in thread
From: Kenji Arisawa @ 2003-08-26 21:17 UTC (permalink / raw)
  To: 9fans

Hello 9fans,

My CPU server equips a HDD for only 512B NVRAM.
I feel that is silly.
How are you doing?

Kenji Arisawa



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

* Re: [9fans] NVRAM
  2003-08-26 21:17 [9fans] NVRAM Kenji Arisawa
@ 2003-08-26 22:22 ` zfolkerts
  2003-08-26 22:37   ` Kenji Arisawa
  2003-08-26 22:49 ` ron minnich
  1 sibling, 1 reply; 36+ messages in thread
From: zfolkerts @ 2003-08-26 22:22 UTC (permalink / raw)
  To: 9fans

Hi,
I am booting my cpu servers using a floppy formatted like the following:
term% disk/format -db /386/pbs /dev/fd0disk /386/9load plan9.ini

with a plan9.ini that looks like:
ether0=type=elnk3
nvr=fd!0!plan9.nvr
bootfile=ether0!amaranth!/386/9pccpu
bootargs=tcp

In order to recieve an IP from DHCP (assuming that is what you are doing) you will need an entry in /lib/ndb/local containing the ethernet address, an IP address, and optionally some other info about the host. An example would be:

ip=172.16.1.20 sys=node0 ether=0060971baec1
	dom=node0.yourdom.dom

You obviously have to have an ethernet card supported by 9load for this to work.  The first boot you have to enter the authentication information (host owner, authdom, etc) as usual, but after that, the machine should just come up as a cpu server with no prompts.

I am curious however, as to how you would get a plan9.ini and plan9.nvr if you booted with 9pxeload. I have 3 machines with PXE cards that boot 9pxeload, but in order to have a plan9.ini or nvram, I am currently leaving a floppy in the drive and disabling boot from floppy. This works since 9load checks the floppy for a plan9.ini first, but I would like to eliminate the floppies on these machines if possible.

Zack Folkerts

On Wed, Aug 27, 2003 at 06:17:28AM +0900, Kenji Arisawa wrote:

> Hello 9fans,
>
> My CPU server equips a HDD for only 512B NVRAM.
> I feel that is silly.
> How are you doing?
>
> Kenji Arisawa


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

* Re: [9fans] NVRAM
  2003-08-26 22:22 ` zfolkerts
@ 2003-08-26 22:37   ` Kenji Arisawa
  0 siblings, 0 replies; 36+ messages in thread
From: Kenji Arisawa @ 2003-08-26 22:37 UTC (permalink / raw)
  To: 9fans

Thanks Zack Folkerts,

I didn't know plan9.nvr can live in fd of CPU server.
Manual says:
 >	nvr=value
 >	This is used by a file server kernel to locate a file holding
information to configure the file system.

I have a plenty of old FDDs. I would like to remove HDD from CPU server.

Kenji Arisawa



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

* Re: [9fans] NVRAM
  2003-08-26 21:17 [9fans] NVRAM Kenji Arisawa
  2003-08-26 22:22 ` zfolkerts
@ 2003-08-26 22:49 ` ron minnich
  2003-08-26 23:06   ` Kenji Arisawa
  1 sibling, 1 reply; 36+ messages in thread
From: ron minnich @ 2003-08-26 22:49 UTC (permalink / raw)
  To: 9fans

On Wed, 27 Aug 2003, Kenji Arisawa wrote:

> My CPU server equips a HDD for only 512B NVRAM.
> I feel that is silly.
> How are you doing?

I use CMOS for the NVRAM, and it works quite well. No need for a disk.

ron



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

* Re: [9fans] NVRAM
  2003-08-26 22:49 ` ron minnich
@ 2003-08-26 23:06   ` Kenji Arisawa
  0 siblings, 0 replies; 36+ messages in thread
From: Kenji Arisawa @ 2003-08-26 23:06 UTC (permalink / raw)
  To: 9fans

Hello,

 >I use CMOS for the NVRAM, and it works quite well. No need for a disk.

How to use?
Just copy half of /dev/sdXX/nvram to '#r/nvram' ?

Kenji Arisawa



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

* Re: [9fans] nvram
  2009-07-30 18:12           ` Steve Simon
@ 2009-07-30 18:45             ` erik quanstrom
  0 siblings, 0 replies; 36+ messages in thread
From: erik quanstrom @ 2009-07-30 18:45 UTC (permalink / raw)
  To: 9fans

On Thu Jul 30 14:13:18 EDT 2009, steve@quintile.net wrote:
> no it doesn't, I had this a few days ago, moving disks about so
> nvram couldn't be found. I could still boot the system but I had to enter
> the nvram info from the keyboard, it did then try to write the data back
> which (of course) fails - perhaps it was this write to a dead disk that
> caused the boot process to die.

i hate to disagree.  but i think you may have typed your
auth information incorrectly — that does cause a panic.  but not having
a plan9.nvr or nvram partition does not.  here's a demo i
just ran:

	baxley# 9fat:
	baxley# rm /n/9fat/plan9.nvr
	baxley# echo reboot>/dev/reboot
[...]
	2040M memory: 108M kernel data, 1931M user, 2556M swap
	sdE0: LBA 3,931,200 sectors
	  SATADOM H Type rs1.a000 20090504AA0000000013 [newdrive]
	readnvram: couldn't find nvram
	can't read nvram: unknown device in # filename
	authid: bootes
	authdom: plan9.quanstro.net
	secstore key:
	password:
	can't write key to nvram: unknown device in # filename
	version...time...
	nit: starting /bin/rc
	baxley#

now if i mistype my auth information, i get

	version...authpanic: boot process died: unknown
	entication failed (auth_proxy rpc write: : bad key), trying mount anyways
	boot: mount /: attach -- unknown user or failed authentication
	dumpstack

unfortunately, at this point i'm stuck in a reboot loop and
i can only disconnect the offending media.

- erik



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

* Re: [9fans] nvram
  2009-07-30 16:05         ` sqweek
  2009-07-30 16:08           ` erik quanstrom
@ 2009-07-30 18:12           ` Steve Simon
  2009-07-30 18:45             ` erik quanstrom
  1 sibling, 1 reply; 36+ messages in thread
From: Steve Simon @ 2009-07-30 18:12 UTC (permalink / raw)
  To: 9fans

no it doesn't, I had this a few days ago, moving disks about so
nvram couldn't be found. I could still boot the system but I had to enter
the nvram info from the keyboard, it did then try to write the data back
which (of course) fails - perhaps it was this write to a dead disk that
caused the boot process to die.

-Steve



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

* Re: [9fans] nvram
  2009-07-30 16:22             ` sqweek
@ 2009-07-30 17:58               ` erik quanstrom
  0 siblings, 0 replies; 36+ messages in thread
From: erik quanstrom @ 2009-07-30 17:58 UTC (permalink / raw)
  To: 9fans

> >
> > no.  it happens to me all the time.  (when there is no
> > place to write nvram, as when no disk is partitioned.)
>
>  OK, but you won't hit an error in that case either. I was wondering
> whether the i/o problem was tripping it up.
> -sqweek

factotum handles this case.

- erik



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

* Re: [9fans] nvram
  2009-07-30 16:08           ` erik quanstrom
@ 2009-07-30 16:22             ` sqweek
  2009-07-30 17:58               ` erik quanstrom
  0 siblings, 1 reply; 36+ messages in thread
From: sqweek @ 2009-07-30 16:22 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

2009/7/31 erik quanstrom <quanstro@quanstro.net>:
>>  Speaking of, I had a disk in my server die recently, and eventually
>> it affected the nvram partition. So of course, when I booted up it
>> couldn't read it and prompted me for the auth credentials, then tried
>> to write back to nvram, got an i/o error and rebooted.
>>  The reboot could have been caused by some other problem shortly after
>> (the motherboard seems to have given up on me also), but it raised the
>> question - does an unsuccesful write to nvram halt the boot process?
>
> no.  it happens to me all the time.  (when there is no
> place to write nvram, as when no disk is partitioned.)

 OK, but you won't hit an error in that case either. I was wondering
whether the i/o problem was tripping it up.
-sqweek



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

* Re: [9fans] nvram
  2009-07-30 16:05         ` sqweek
@ 2009-07-30 16:08           ` erik quanstrom
  2009-07-30 16:22             ` sqweek
  2009-07-30 18:12           ` Steve Simon
  1 sibling, 1 reply; 36+ messages in thread
From: erik quanstrom @ 2009-07-30 16:08 UTC (permalink / raw)
  To: 9fans

>  Speaking of, I had a disk in my server die recently, and eventually
> it affected the nvram partition. So of course, when I booted up it
> couldn't read it and prompted me for the auth credentials, then tried
> to write back to nvram, got an i/o error and rebooted.
>  The reboot could have been caused by some other problem shortly after
> (the motherboard seems to have given up on me also), but it raised the
> question - does an unsuccesful write to nvram halt the boot process?

no.  it happens to me all the time.  (when there is no
place to write nvram, as when no disk is partitioned.)

- erik



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

* Re: [9fans] nvram
  2009-07-29 13:48       ` erik quanstrom
@ 2009-07-30 16:05         ` sqweek
  2009-07-30 16:08           ` erik quanstrom
  2009-07-30 18:12           ` Steve Simon
  0 siblings, 2 replies; 36+ messages in thread
From: sqweek @ 2009-07-30 16:05 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

2009/7/29 erik quanstrom <quanstro@quanstro.net>:
>> Hmm.  A few years ago, I ran into a similar problem and added a
>> variable that could be set in plan9.ini to specify where the nvram
>> actually is.  It works reasonably well....
>
> difficult to maintain in a pretty active environment;
> one more reason for boot failure.

 Speaking of, I had a disk in my server die recently, and eventually
it affected the nvram partition. So of course, when I booted up it
couldn't read it and prompted me for the auth credentials, then tried
to write back to nvram, got an i/o error and rebooted.
 The reboot could have been caused by some other problem shortly after
(the motherboard seems to have given up on me also), but it raised the
question - does an unsuccesful write to nvram halt the boot process?
-sqweek



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

* Re: [9fans] nvram
  2009-07-29 13:43     ` Dan Cross
@ 2009-07-29 13:48       ` erik quanstrom
  2009-07-30 16:05         ` sqweek
  0 siblings, 1 reply; 36+ messages in thread
From: erik quanstrom @ 2009-07-29 13:48 UTC (permalink / raw)
  To: 9fans

> Hmm.  A few years ago, I ran into a similar problem and added a
> variable that could be set in plan9.ini to specify where the nvram
> actually is.  It works reasonably well....

difficult to maintain in a pretty active environment;
one more reason for boot failure.

- erik



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

* Re: [9fans] nvram
  2009-07-28 18:37   ` erik quanstrom
@ 2009-07-29 13:43     ` Dan Cross
  2009-07-29 13:48       ` erik quanstrom
  0 siblings, 1 reply; 36+ messages in thread
From: Dan Cross @ 2009-07-29 13:43 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Tue, Jul 28, 2009 at 2:37 PM, erik quanstrom<quanstro@quanstro.net> wrote:
> this change as worked well on my personal system and at coraid
> for the past 6 months.  it just works.  even on hitherto unknown
> controllers like the orion.

Hmm.  A few years ago, I ran into a similar problem and added a
variable that could be set in plan9.ini to specify where the nvram
actually is.  It works reasonably well....



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

* Re: [9fans] nvram
  2009-07-28 19:24   ` erik quanstrom
@ 2009-07-28 22:38     ` ron minnich
  0 siblings, 0 replies; 36+ messages in thread
From: ron minnich @ 2009-07-28 22:38 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Tue, Jul 28, 2009 at 12:24 PM, erik quanstrom<quanstro@coraid.com> wrote:

> i don't believe this is safe for an arbitrary (rtc device, bios vendor).
> i may have missed something, since some of the bios in question
> are obsolete.

Hard to say. newer rtc has a whopping doubled-size CMOS and the BIOS
vendors don't seem to have used it all yet.

I think it would be worth trying to use it, but, well it is a PC, hmm.

ron



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

* Re: [9fans] nvram
  2009-07-28 18:08 ` erik quanstrom
  2009-07-28 18:37   ` erik quanstrom
@ 2009-07-28 21:59   ` Adriano Verardo
  1 sibling, 0 replies; 36+ messages in thread
From: Adriano Verardo @ 2009-07-28 21:59 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hi, all

I boot diskless (very obsolete PC) embedding the nvram data in the kernel.
Basically I implemented a fake-nram driver and declare it in the plan9.ini
It's just a trick but works.

If such a solution could be useful for the community I would be happy
to deliver the source.

adriano




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

* Re: [9fans] nvram
  2009-07-28 18:09 ` ron minnich
@ 2009-07-28 19:24   ` erik quanstrom
  2009-07-28 22:38     ` ron minnich
  0 siblings, 1 reply; 36+ messages in thread
From: erik quanstrom @ 2009-07-28 19:24 UTC (permalink / raw)
  To: 9fans

> years back I modified the library so that it could use the cmos nvram.
> no more disk. We used this when Andrey
> put plan 9 in FLASH.
>
> It was nice to not have any spinning media for nvram.
>
> It gets a little tricky because cmos is not sane in where you can
> store bits, but it's doable.

i don't believe this is safe for an arbitrary (rtc device, bios vendor).
i may have missed something, since some of the bios in question
are obsolete.

http://bochs.sourceforge.net/techspec/CMOS-reference.txt

- erik



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

* Re: [9fans] nvram
  2009-07-28 18:08 ` erik quanstrom
@ 2009-07-28 18:37   ` erik quanstrom
  2009-07-29 13:43     ` Dan Cross
  2009-07-28 21:59   ` Adriano Verardo
  1 sibling, 1 reply; 36+ messages in thread
From: erik quanstrom @ 2009-07-28 18:37 UTC (permalink / raw)
  To: 9fans

> i guess i need to update this man page.  i didn't recall the
> search algorithm was documented.  thanks for pointing that out.

sorry for the obtuse reference.  now that i've made it on the list,
i'll just explain myself.  i made a local change to how
nvram is found because i kept needing to update the search to
add new drives.  sata has made it more difficult to just enumerate
the possibilities.  a vanilla machine can have 2 ahci controllers
and up to 32 drives per controller.  devsd supports up to 16 drives
per controller, which covers existing hardware.  that becomes annoying
to enumerate.  my test machine has 1 ahci, 2 ide, 1 mv50xx, 2 marvell orion
and 1 loopback controller. since the current approach requires 2 entries per
drive, i changed to this algorithm:

1.  read #S/sdctl.  gather a list of device ids.  example /dev/sdC, /dev/sdE.
2.  for each device, probe drives 0-f.  example /dev/sdE[0-f].  both
a partition named "nvram" and 9fat/plan9.nvr are probed.

note:
a.  probes on other devices are unchanged.
b.  i modified sd so that each sd device produces exactly 1 line in #S/sdctl.
the parallel scsi drivers had previously been missing.

bugs:
a.  non-sd disks like usb still can't be used with this scheme.
b.  probe order depends on the order of sd devices in your kernel
config.

one could argue that you should just plug your nvram drive into a
low-numbered port, but i kept running situations where i couldn't
use the ports i wanted due to chassis constraints.  ahci also provides
a mechanism for disabling ports, so it's anyone's guess what ports
are actually available.

this change as worked well on my personal system and at coraid
for the past 6 months.  it just works.  even on hitherto unknown
controllers like the orion.

- erik



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

* Re: [9fans] nvram
  2009-07-28 17:58 [9fans] nvram Lyndon Nerenberg
  2009-07-28 18:08 ` erik quanstrom
@ 2009-07-28 18:09 ` ron minnich
  2009-07-28 19:24   ` erik quanstrom
  1 sibling, 1 reply; 36+ messages in thread
From: ron minnich @ 2009-07-28 18:09 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Tue, Jul 28, 2009 at 10:58 AM, Lyndon Nerenberg<lyndon@orthanc.ca> wrote:
> Okay, it's authsrv(2) that describes the nvram search sequence. And for
> whatever reason I had it in my head that these days it was possible to grab
> the nvram across the wire, which in hindsight makes no sense whatsoever. And
> now that I think about it, my last (2ed) 'diskless' CPU server had a floppy
> drive in it for this very reason ...
>
> Doncha just love PC hardware?


years back I modified the library so that it could use the cmos nvram.
no more disk. We used this when Andrey
put plan 9 in FLASH.

It was nice to not have any spinning media for nvram.

It gets a little tricky because cmos is not sane in where you can
store bits, but it's doable.

ron

ron



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

* Re: [9fans] nvram
  2009-07-28 17:58 [9fans] nvram Lyndon Nerenberg
@ 2009-07-28 18:08 ` erik quanstrom
  2009-07-28 18:37   ` erik quanstrom
  2009-07-28 21:59   ` Adriano Verardo
  2009-07-28 18:09 ` ron minnich
  1 sibling, 2 replies; 36+ messages in thread
From: erik quanstrom @ 2009-07-28 18:08 UTC (permalink / raw)
  To: 9fans

On Tue Jul 28 14:00:22 EDT 2009, lyndon@orthanc.ca wrote:
> Okay, it's authsrv(2) that describes the nvram search sequence. And for
> whatever reason I had it in my head that these days it was possible to
> grab the nvram across the wire, which in hindsight makes no sense
> whatsoever. And now that I think about it, my last (2ed) 'diskless' CPU
> server had a floppy drive in it for this very reason ...
>
> Doncha just love PC hardware?

ya.  we use small flash drives from memorydepot.com for this.
but if price is really the limiter, not power or anything else,
you may prefer to use a regular hard drive.  or, i think you
could use sdloop to mount a usb key on boot and put your
nvram on that.  that might be complicated due to boot ordering
problems.

i guess i need to update this man page.  i didn't recall the
search algorithm was documented.  thanks for pointing that out.

- erik



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

* [9fans] nvram
@ 2009-07-28 17:58 Lyndon Nerenberg
  2009-07-28 18:08 ` erik quanstrom
  2009-07-28 18:09 ` ron minnich
  0 siblings, 2 replies; 36+ messages in thread
From: Lyndon Nerenberg @ 2009-07-28 17:58 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Okay, it's authsrv(2) that describes the nvram search sequence. And for
whatever reason I had it in my head that these days it was possible to
grab the nvram across the wire, which in hindsight makes no sense
whatsoever. And now that I think about it, my last (2ed) 'diskless' CPU
server had a floppy drive in it for this very reason ...

Doncha just love PC hardware?

--lyndon



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

* Re: [9fans] nvram
  2005-05-12 16:47   ` Skip Tavakkolian
@ 2005-05-12 23:52     ` Dan Cross
  0 siblings, 0 replies; 36+ messages in thread
From: Dan Cross @ 2005-05-12 23:52 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Thu, May 12, 2005 at 09:47:39AM -0700, Skip Tavakkolian wrote:
> > SMBUS is a 2-wire bus that is incredibly bad. 
> 
> a TukTuk?

Those have three wheels, anyway.

	- Dan C.



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

* Re: [9fans] nvram
  2005-05-12 15:10 ` Ronald G. Minnich
@ 2005-05-12 16:47   ` Skip Tavakkolian
  2005-05-12 23:52     ` Dan Cross
  0 siblings, 1 reply; 36+ messages in thread
From: Skip Tavakkolian @ 2005-05-12 16:47 UTC (permalink / raw)
  To: 9fans

> SMBUS is a 2-wire bus that is incredibly bad. 

a TukTuk?



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

* Re: [9fans] nvram
  2005-05-12 14:48 Sergey Reva
@ 2005-05-12 15:10 ` Ronald G. Minnich
  2005-05-12 16:47   ` Skip Tavakkolian
  0 siblings, 1 reply; 36+ messages in thread
From: Ronald G. Minnich @ 2005-05-12 15:10 UTC (permalink / raw)
  To: Sergey Reva, Fans of the OS Plan 9 from Bell Labs

piix4 is an old intel southbridge. 

I don't think you want to start using bits of SPD roms for ... what were 
you going to do again?

SMBUS is a 2-wire bus that is incredibly bad. 

ron



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

* [9fans] nvram
@ 2005-05-12 14:48 Sergey Reva
  2005-05-12 15:10 ` Ronald G. Minnich
  0 siblings, 1 reply; 36+ messages in thread
From: Sergey Reva @ 2005-05-12 14:48 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hello Fans,

Just now got interesting idea! Asked google about SPD, and...

> This is the html version of the file http://www.jedec.org/download/search/4_01_02_00R9.PDF.
> G o o g l e automatically generates html versions of documents as we crawl the web.
> To link to or bookmark this page, use the following url:
> http://www.google.com/search?q=cache:CLoDZ6X6gAIJ:www.jedec.org/download/search/4_01_02_00R9.PDF+SPD+memory+map&hl=en
> ...
> 5.10 Bytes 128-255: System Integrators specific information: The system integrator may
> choose to use the SPD ROM for various items. If so, then bytes 128-255 may be used.
> ...

Does 'Plan 9' have support for SMBus?
I found piix4smbus.c but what mean piix4?

-- 
http://rs-rlab.narod.ru                          mailto:rs_rlab@mail.ru



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

* Re: [9fans] nvram
  2005-04-03 15:07     ` Russ Cox
@ 2005-04-04 10:03       ` C H Forsyth
  0 siblings, 0 replies; 36+ messages in thread
From: C H Forsyth @ 2005-04-04 10:03 UTC (permalink / raw)
  To: russcox, 9fans

>>if you're going to be editing the code anyway,
>>you might as well have to read and understand it first.

careful: that might start a dangerous trend.


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

* Re: [9fans] nvram
  2005-04-03 14:44   ` Sergey Reva
  2005-04-03 15:07     ` Russ Cox
@ 2005-04-03 16:47     ` Sergey Reva
  1 sibling, 0 replies; 36+ messages in thread
From: Sergey Reva @ 2005-04-03 16:47 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hello Fans

If someone need this:
There is driver:
http://rs-rlab.narod.ru/files/devi2c.c
There is schematic:
http://rs-rlab.narod.ru/scr/i2c.gif
There is some notes:
http://rs-rlab.narod.ru/9nvram.html

-- 
http://rs-rlab.narod.ru                            mailto:rs_rlab@mail.ru



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

* Re: [9fans] nvram
  2005-04-03 14:44   ` Sergey Reva
@ 2005-04-03 15:07     ` Russ Cox
  2005-04-04 10:03       ` C H Forsyth
  2005-04-03 16:47     ` Sergey Reva
  1 sibling, 1 reply; 36+ messages in thread
From: Russ Cox @ 2005-04-03 15:07 UTC (permalink / raw)
  To: Sergey Reva; +Cc: Fans of the OS Plan 9 from Bell Labs

> RC> your settings of nvoff and nvlen seem fine.
> why this not documented? or it's special for 
> cause user to read code :)

we document how to use the library functions,
not how to write them.  you have to stop somewhere.
if you're going to be editing the code anyway,
you might as well have to read and understand it first.

russ


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

* Re: [9fans] nvram
  2005-04-03 13:39 ` Russ Cox
@ 2005-04-03 14:44   ` Sergey Reva
  2005-04-03 15:07     ` Russ Cox
  2005-04-03 16:47     ` Sergey Reva
  0 siblings, 2 replies; 36+ messages in thread
From: Sergey Reva @ 2005-04-03 14:44 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs, Russ Cox

Hello Russ

Sunday, April 3, 2005, 4:39:39 PM, you wrote:
RC> does echo hello world >'#2/i2c' also work?
    # echo test >'#2/i2c'
    # cat '#2/i2c'
all of that work fine

RC> your settings of nvoff and nvlen seem fine.
why this not documented? or it's special for cause user to read code :)

>> and it's work, but when i write this to nvram i fail with
>> ...file does not exist '''#2!/i2c'''....
RC> why are there so many quotes in that message?
RC> you only need quotes in the shell.
RC> maybe you left an extra set around the name in the c table?
yes, this problem with quotes... now fine

Thanks Russ! Also thanks to Inferno manual!

P.S.
Through minutes, sources and schematic should be appeared in my site
Does someone need that? How about legal driver name? Patch?

P.P.S.
Also I try 256 bytes EEPROM
24c02 and 24c256 are full work
Now all powered from LPT port
-- 
http://rs-rlab.narod.ru                            mailto:rs_rlab@mail.ru



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

* Re: [9fans] nvram
  2005-04-03 12:50 Sergey Reva
@ 2005-04-03 13:39 ` Russ Cox
  2005-04-03 14:44   ` Sergey Reva
  0 siblings, 1 reply; 36+ messages in thread
From: Russ Cox @ 2005-04-03 13:39 UTC (permalink / raw)
  To: Sergey Reva, Fans of the OS Plan 9 from Bell Labs

>   cat '#2!/i2c'

the ! is unnecessary.  #2/i2c should be fine.
does echo hello world >'#2/i2c' also work?

> and it's work, but when i write this to nvram i fail with
> ...file does not exist '''#2!/i2c'''....

your settings of nvoff and nvlen seem fine.

why are there so many quotes in that message?
you only need quotes in the shell.  maybe you
left an extra set around the name in the c table?

russ


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

* [9fans] nvram
@ 2005-04-03 12:50 Sergey Reva
  2005-04-03 13:39 ` Russ Cox
  0 siblings, 1 reply; 36+ messages in thread
From: Sergey Reva @ 2005-04-03 12:50 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hello Fans

At least in this weekend I got time to finish nvram emulation for x86.
It's 32k i2c EEPROM which concected to LPT port, of course others ic's supported too.
For now it powered from pc power supply, but i believe it can work
from LPT power too... checking now...

For testing device I read plan9.ini manual and set nvr=/dev/i2c
at this moment i can't find any way to access device driver instead of write
     char nvr[]="#2";
     bind(nvr,dev,MAFTER);
to port/initcode.c
in this case I fail with
.... can't write key to nvram: i/o error...

Then I try greping sources with 'write key to nvram', and find
/sys/src/libauthsrv/readnvram.c
after I walk though it i find many interesting, like this
nvram, nvroff, nvrlen. Then I put settings to plan9.ini
       nvram=/dev/i2c
       nvroff=0        #as i understand this is offset in file? right?
       nvrlen=512
after that all work fine

but, also I try
  cat '#2!/i2c'
and it's work, but when i write this to nvram i fail with
...file does not exist '''#2!/i2c'''....

Now I ask how use this device without changing initcode.c?
-- 
http://rs-rlab.narod.ru                          mailto:rs_rlab@mail.ru



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

* Re: [9fans] nvram
  2000-09-06 23:21 Russ Cox
@ 2000-09-06 23:33 ` Boyd Roberts
  0 siblings, 0 replies; 36+ messages in thread
From: Boyd Roberts @ 2000-09-06 23:33 UTC (permalink / raw)
  To: 9fans

From: Russ Cox <rsc@plan9.bell-labs.com>

> The nvram is necessary for the install because
> I had two choices that didn't involve changing
> the kernel boot process

as i thought.





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

* Re: [9fans] nvram
@ 2000-09-06 23:21 Russ Cox
  2000-09-06 23:33 ` Boyd Roberts
  0 siblings, 1 reply; 36+ messages in thread
From: Russ Cox @ 2000-09-06 23:21 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 565 bytes --]

The nvram is necessary for the install because
I had two choices that didn't involve changing
the kernel boot process: talk (human) installers
through typing a user name and password, or
provide an nvram file so that that particular
prompt goes away.

Since the disk is also being used to do things
like save the state of a partial install, squirrel
away VGA debugging information, and keep the vgadb
somewhere that is easily editable from a non-Plan 9
operating system, the nvram being on the floppy
is but the tip of this particular iceberg.

Russ

[-- Attachment #2: Type: message/rfc822, Size: 1729 bytes --]

From: "Boyd Roberts" <boyd@planete.net>
To: <9fans@cse.psu.edu>
Subject: [9fans] nvram
Date: Thu, 7 Sep 2000 00:47:35 +0200
Message-ID: <017c01c01854$7383a260$03c684c3@psychobasketcase.org>

why is the nvram necessary for the install?  given it's
an install there is no nvram, or if there is it contains
garbage.

i think i know why.



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

* Re: [9fans] nvram
  2000-09-06 23:00 jmk
@ 2000-09-06 23:05 ` Boyd Roberts
  0 siblings, 0 replies; 36+ messages in thread
From: Boyd Roberts @ 2000-09-06 23:05 UTC (permalink / raw)
  To: 9fans

From: <jmk@plan9.bell-labs.com>

> indeed, some of them do exactly that. the problem comes once you've
> used that facility to load something which can't do bios calls, it can
> no longer find the drive it was loaded from.

don't i know it, but the vaio is cool.  got a 5620 style keyboard
that i really like, except mine is azerty :-)





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

* Re: [9fans] nvram
@ 2000-09-06 23:00 jmk
  2000-09-06 23:05 ` Boyd Roberts
  0 siblings, 1 reply; 36+ messages in thread
From: jmk @ 2000-09-06 23:00 UTC (permalink / raw)
  To: 9fans

	i guess i should qualify that.  the real problem is that the
	bios should present (not that i'm a pc expert) a: as a: even if
	it's connected by two tin cans and a a piece of string.

indeed, some of them do exactly that. the problem comes once you've
used that facility to load something which can't do bios calls, it can
no longer find the drive it was loaded from.



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

* Re: [9fans] nvram
  2000-09-06 22:47 ` [9fans] nvram Boyd Roberts
@ 2000-09-06 22:52   ` Boyd Roberts
  0 siblings, 0 replies; 36+ messages in thread
From: Boyd Roberts @ 2000-09-06 22:52 UTC (permalink / raw)
  To: 9fans

From: Boyd Roberts <boyd@planete.net>
> why is the nvram necessary for the install?  given it's
> an install there is no nvram, or if there is it contains
> garbage.
> 
> i think i know why.

i guess i should qualify that.  the real problem is that the
bios should present (not that i'm a pc expert) a: as a: even if
it's connected by two tin cans and a a piece of string.





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

* [9fans] nvram
  2000-09-06 13:24 [9fans] Re: Kernighan interview (w/ Plan 9 mention) forsyth
@ 2000-09-06 22:47 ` Boyd Roberts
  2000-09-06 22:52   ` Boyd Roberts
  0 siblings, 1 reply; 36+ messages in thread
From: Boyd Roberts @ 2000-09-06 22:47 UTC (permalink / raw)
  To: 9fans

why is the nvram necessary for the install?  given it's
an install there is no nvram, or if there is it contains
garbage.

i think i know why.





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

end of thread, other threads:[~2009-07-30 18:45 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-26 21:17 [9fans] NVRAM Kenji Arisawa
2003-08-26 22:22 ` zfolkerts
2003-08-26 22:37   ` Kenji Arisawa
2003-08-26 22:49 ` ron minnich
2003-08-26 23:06   ` Kenji Arisawa
  -- strict thread matches above, loose matches on Subject: below --
2009-07-28 17:58 [9fans] nvram Lyndon Nerenberg
2009-07-28 18:08 ` erik quanstrom
2009-07-28 18:37   ` erik quanstrom
2009-07-29 13:43     ` Dan Cross
2009-07-29 13:48       ` erik quanstrom
2009-07-30 16:05         ` sqweek
2009-07-30 16:08           ` erik quanstrom
2009-07-30 16:22             ` sqweek
2009-07-30 17:58               ` erik quanstrom
2009-07-30 18:12           ` Steve Simon
2009-07-30 18:45             ` erik quanstrom
2009-07-28 21:59   ` Adriano Verardo
2009-07-28 18:09 ` ron minnich
2009-07-28 19:24   ` erik quanstrom
2009-07-28 22:38     ` ron minnich
2005-05-12 14:48 Sergey Reva
2005-05-12 15:10 ` Ronald G. Minnich
2005-05-12 16:47   ` Skip Tavakkolian
2005-05-12 23:52     ` Dan Cross
2005-04-03 12:50 Sergey Reva
2005-04-03 13:39 ` Russ Cox
2005-04-03 14:44   ` Sergey Reva
2005-04-03 15:07     ` Russ Cox
2005-04-04 10:03       ` C H Forsyth
2005-04-03 16:47     ` Sergey Reva
2000-09-06 23:21 Russ Cox
2000-09-06 23:33 ` Boyd Roberts
2000-09-06 23:00 jmk
2000-09-06 23:05 ` Boyd Roberts
2000-09-06 13:24 [9fans] Re: Kernighan interview (w/ Plan 9 mention) forsyth
2000-09-06 22:47 ` [9fans] nvram Boyd Roberts
2000-09-06 22:52   ` Boyd Roberts

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).