From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sun, 3 Apr 2005 15:50:00 +0300 From: Sergey Reva Message-ID: <1381791421.20050403155000@mail.ru> To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: [9fans] nvram Topicbox-Message-UUID: 31ddda74-ead0-11e9-9d60-3106f5b1d025 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