On 2017-05-17 13:54, jonas wrote:
>>>>> You do not need to know the number, the uio-driver knows it. And
>>>>> the bare metal inmate does not need to know it since it is just
>>>>> writing to a register to trigger it.
>>>>> It looks like it is working. After loading the driver you should
>>>>> see a new entry in /proc/interrupts. And when the inmate runs you
>>>>> should see the counter going up.    
>>>>
>>>> Unfortunately not (just yet...). I've commented out the part where
>>>> the bare-metal ivshmem-demo inmate writes to the IO-mapped ivshmem
>>>> register of the virtual PCI device. The last thing I see in the
>>>> inmate terminal window (after adding the printout prior to writing
>>>> to the ivshmem register area) is: IVSHMEM: 00:00.0 sending IRQ (by
>>>> writing to 0x7c00000c)
>>>>
>>>> In the terminal window of the Linux root-cell I see:
>>>> FATAL: Invalid ivshmem register read, number 04
>>>> FATAL: forbidden access (exception class 0x24)
>>>> pc=0xbf00b018 cpsr=0x600c0193 hsr=0x93800006
>>>> r0=0x0000007c r1=0xdd4f3600 r2=0x00010001 r3=0xdf948000
>>>> r4=0xc08d0000 r5=0xdd144290 r6=0xc0959325 r7=0x0000007c
>>>> r8=0x0000007c r9=0xc08a3a40 r10=0x00000000 r11=0xc08d1e0c
>>>> r12=0xc08d1e10 r13=0xc08d1e00
>>>> r14=0xc03d4dfc Parking CPU 0 (Cell: "Banana-Pi")  
>>>
>>> Seems like the Intx path was never really tested with the uio driver.
>>> I think the problem is caused be the interrupt handler
>>> ivshmem_handler in uio_ivshmem.c
>>> It is trying to read the IntrStatus register which jailhouse does not
>>> implement. Just make the function a pure "return IRQ_HANDLED;" and you
>>> should get further. Actually you error indicates that the interrupt
>>> was received because Linux ran the basic uio handler.
>>
> 
> Yes, that does do the trick!
> Before starting the ivshmem-demo bare-metal inmate the interrupt count for 
> ivshmem as reported by /proc/interrupts is zero. After having started the 
> inmate it is one (I just write once to the LSTATE register from the inmate).
> 
>> I do not remember why the Status register is not implemented by
>> jailhouse, maybe Jan does. Or i would have to read up in the archive
>> and see whether it was ever part of the patchsets that introduced
>> ivshmem.
>>
> 
> Hehe - That was my next question...

The interrupt sources are of edge nature + the event reasons are usually
stored in the data structures inside the shared memory. So there is no
point in implementing a sticky and costly (performance- and
implementation-wise) status bit.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to