On 12/22/06, <b class="gmail_sendername">Segher Boessenkool</b> <<a href="mailto:segher@kernel.crashing.org">segher@kernel.crashing.org</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> So this means that at offset 0x4000 at IO space should be the PM<br>> stuff that I could modify, but when I read space, I get all 0xFF's<br>> so that's not working :-(<br>><br>> # dd bs=1 skip=13500 if=/dev/port count=60 | od -t x1 -v
<br><br>13500 isn't anywhere near 0x4000.  Try writing skip=$((0x4000))<br>if you have problems with hexadecimal arithmetic -- computers<br>can do it fine ;-)</blockquote><div><br>Thanks a lot!<br><br>The problem was that I did 
<br><br> # echo "ibase=F;4000" | bc -lq<br>instead of<br># echo "ibase=16;5000" | bc -lq<br>bc can be nasty about this since format for ibase depends on what base you set before.<br><br>either way your trick is far better, and now I get meaningfull data: 
<br><br># dd bs=1 skip=$((0x4000)) if=/dev/port count=60 | od -t x1 -v<br>60+0 przeczytanych recordów<br>60+0 zapisanych recordów<br>skopiowane 60 bajtów (60 B), 0,00331573 sekund, 18,1 kB/s<br>0000000 11 00 20 04 01 00 00 00 03 fb 54 00 00 00 00 00
<br>0000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>0000040 40 00 10 40 00 00 00 00 81 00 50 00 15 00 00 58<br>0000060 ff 03 00 00 1e 00 00 00 01 00 00 00<br>0000074<br><br>Once again thanks :-)<br><br></div></div>
-- <br>Thanks!<br>Shaddam IV