[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [linux] [OT] CLEAR Cmos : solution soft



salut à tous,


je n'ai fait que survoler ce thread, de plus normalement je n'ai pas le temps mais... ;)  ça m'a titillé car je pensais avoir lu un truc sur le sujet dans le noyau, et en fait oui, on peut acceder au cmos depuis linux, il faut juste savoir que ça s'appelle aussi nvram : 

-depuis le noyau même avec les fonction CMOS_WRITE() et CMOS_READ() 

-en tant qu'utilisateur, il faut compiler le noyau avec le flag CONFIG_NVRAM et créer le device. 


CONFIG_NVRAM:

If you say Y here and create a character special file /dev/nvram
with major number 10 and minor number 144 using mknod ("man mknod"),
you get read and write access to the 50 bytes of non-volatile memory
in the real time clock (RTC), which is contained in every PC and
most Ataris. 

This memory is conventionally called "CMOS RAM" on PCs and "NVRAM"
on Ataris. /dev/nvram may be used to view settings there, or to
change them (with some utility). It could also be used to frequently
save a few bits of very important data that may not be lost over
power-off and for which writing to disk is too insecure. Note
however that most NVRAM space in a PC belongs to the BIOS and you
should NEVER idly tamper with it. See Ralf Brown's interrupt list
for a guide to the use of CMOS bytes by your BIOS.

On Atari machines, /dev/nvram is always configured and does not need
to be selected.


[root@tektem:/home/rno] modprobe nvram
[root@tektem:/home/rno] mknod /dev/nvram c 10 144
[root@tektem:/home/rno] suspend
[rno@tektem:/home/rno] cat < /dev/nvram > cmos.dmp
[rno@tektem:/home/rno] hexeditor cmos.dmp

00000000  00 00 50 E4  FF FF 0F 80   02 C0 FF 2F  2F F0 FF FF
00000010  37 4D 10 FF  FF 36 4D 3F   FF 3F 10 FF  FF FE 3F 3F
00000020  10 EA C0 FF  20 80 FF FF   FF FF 80 FF  FF DF B0 D1
00000030  68 11 


ç'est plus cool qu'utiliser debug non ? 

:)


a+
-- 
rno 
    
  

[ Soyez précis dans vos sujets svp afin de déterminer directement  ]
[ le type de demande...                                            ]
[ Pour vous (dés)inscrire, aller sur http://linuxbe.org/ml.php     ]
[ http://LinuxBe.org              Contact: listmaster@linuxbe.org  ]