Re: Fiasco.oc & trustzone

Nikolay Golikov <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <CALQLEJx7g=2=ZEsWox-yd8jrKMAQ=P3MZKWGwLaoxu8H2z5f+A@mail.gmail.com>
2012/9/20 Nikolay Golikov <[email protected]>:
> 2012/9/20 Adam Lackorzynski <[email protected]>:
>> On Thu Sep 20, 2012 at 15:25:54 +0400, Nikolay Golikov wrote:
>>> 2012/9/20 Adam Lackorzynski <[email protected]>:
>>> > 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                 [email protected]
>>   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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.