Fiasco.oc & trustzone
Nikolay Golikov
decaprox at gmail.com
Thu Sep 20 18:25:32 CEST 2012
2012/9/20 Nikolay Golikov <decaprox at gmail.com>:
> 2012/9/20 Adam Lackorzynski <adam at os.inf.tu-dresden.de>:
>> On Thu Sep 20, 2012 at 15:25:54 +0400, Nikolay Golikov wrote:
>>> 2012/9/20 Adam Lackorzynski <adam at os.inf.tu-dresden.de>:
>>> > On Wed Sep 19, 2012 at 17:41:01 +0400, Nikolay Golikov wrote:
>>> >> Now I have another problem: I map aipstz-1 registers with
>>> >> l4io_request_iomem(base, AISPTZ_SIZE, L4IO_MEM_NONCACHED, &_vbase);
>>> >> (base = 0x53F00000, AISPTZ_SIZE = 0x4000)
>>> >> It return 0.
>>> >>
>>> >> But when I try to write to mapped registers my program stopping:
>>> >> *((volatile l4_umword_t *)(_vbase + reg)) = val
>>> >> (reg = 0x0, val = 0x77777777)
>>> >
>>> > Could you check whether it page-faults permanently? (Enable page-fault
>>> > logging in jdb: P*, let it go, then check trace-buffer via shift-T.)
>>> > Also try using l4_mem_write as it could be that writing from userspace
>>> > does not work.
>>>
>>> Yes, It's page-faults permanently. In tracebuffer I see:
>>>
>>> pf: 0044 pfa=00003000 ip=01000294 (Wp) spc=0xf12e4690 79598
>>> pf: 0044 pfa=00003000 ip=01000294 (Wp) spc=0xf12e4690 79597
>>> pf: 0044 pfa=00003000 ip=01000294 (Wp) spc=0xf12e4690 79596
>>>
>>> why it happening?
>>
>> Device may only be written/read from secure privileged mode, this is one
>> of them (I think). Please try writing/reading via l4_mem_write and
>> l4_mem_read.
>>
>>
>>
>> Adam
>> --
>> Adam adam at os.inf.tu-dresden.de
>> Lackorzynski http://os.inf.tu-dresden.de/~adam/
>
> I tried use l4_mem_write for write 0x77777777, it looks ok. But, when
> I tried l4_mem_read for read from same register it returns 0x0.
> But similar code injected to bootstrap startup function works fine.
I tried use l4_mem_write for write 0x77777777, it looks ok. But, when
I tried l4_mem_read for read from same register it returns 0x0.
But similar code injected to bootstrap startup function works fine.
More information about the l4-hackers
mailing list