Hi Tom,

I can confirm the same effect my side. I also checked using the katcp
command

?wordwrite sys_scratchpad 0 0xffffffff

And this doesn't effect the filesize, however all the registers are open
file descriptors after the ?progdev.

strace'ing the echo -ne command seems to show a mmap of 4k then a write
then a close and an munmap
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x3001a000
write(1, "\377\0\377\0", 4)             = 4
close(1)
          = 0
munmap(0x3001a000, 4096)                = 0


while strace'ing tcpborphserver2 shows a seek then a write.
read(9, "?wordwrite sys_scratchpad 0 0xff"..., 512) = 39
lseek(35, 0, SEEK_SET)                  = 0
write(35, "\377\377\377\22", 4)         = 4


I suspect it has something to do with the inode for the register file not
being refreshed ??? i dug into linux/borph.c but can't seem to see anything
yet.

I will look into it more.


Regards

Adam


On Tue, Aug 28, 2012 at 10:06 PM, Tom Kuiper <[email protected]> wrote:

> **
> On 08/28/2012 10:53 AM, Adam Barta wrote:
>
> I think the quotes are important too " "
>
> There's still something funny going on.  Look at the file size for
> sys_scratchpad after writing.
>
> Tom
>
> root@roach1:/proc/1221/hw/ioreg# ls -l
> total 0
> -r--r--r-- 1 root root     4 Jul 28 02:13 acc_cnt
> ...
> -rw-rw-rw- 1 root root     4 Jul 28 02:13 sys_scratchpad
> -rw-rw-rw- 1 root root     4 Jul 28 02:13 trig_adc0
> root@roach1:/proc/1221/hw/ioreg# echo -en "\xFF\xFF\xFF\xFF" >
> sys_scratchpad
> root@roach1:/proc/1221/hw/ioreg# cat sys_scratchpad | hd
>
> 00000000  ff ff ff ff                                       |....|
> 00000004
> root@roach1:/proc/1221/hw/ioreg# ls -l
> total 0
> -r--r--r-- 1 root root     4 Jul 28 02:13 acc_cnt
> ...
> -rw-rw-rw- 1 root root     0 Jul 28 02:21 sys_scratchpad
> -rw-rw-rw- 1 root root     4 Jul 28 02:13 trig_adc0
>
>
>
> On Tue, Aug 28, 2012 at 7:48 PM, Tom Kuiper <[email protected]> wrote:
>
>>  On 08/28/2012 10:45 AM, Adam Barta wrote:
>>
>> Yes its the trailing newline i think so
>>
>> echo -en "\xFF"
>>
>> would work
>>
>>  Yes, thanks for the -n tip.  Here's what I get.
>>
>> root@roach1:/proc/1174/hw/ioreg# echo -en \x01\x00 > trig_adc0
>>
>> root@roach1:/proc/1174/hw/ioreg# cat trig_adc0 | hd
>> 00000000  78 30 31 78                                       |x01x|
>> 00000004
>>  root@roach1:/proc/1174/hw/ioreg# echo -en \xff\xff > trig_adc0
>>
>> root@roach1:/proc/1174/hw/ioreg# cat trig_adc0 | hd
>>  00000000  78 66 66 78                                       |xffx|
>> 00000004
>> root@roach1:/proc/1174/hw/ioreg# echo -en \xFF\xFF > trig_adc0
>>
>> root@roach1:/proc/1174/hw/ioreg# cat trig_adc0 | hd
>>  00000000  78 46 46 78                                       |xFFx|
>> 00000004
>>
>> Since this is on a ROACH-1 PPC we should be running the same OS, so I'm
>> puzzled.
>>
>> Tom
>>
>>
>
>
> --
> *Adam Barta*
> c: +27 72 105 8611
> e: [email protected]
> w: www.ska.ac.za
>
>
>
>
> --
> I or me? http://www.oxforddictionaries.com/page/145
>
>


-- 
*Adam Barta*
c: +27 72 105 8611
e: [email protected]
w: www.ska.ac.za

Reply via email to