Thanks Jan.
Can you please explain the relation between the bar_mask bits and the interrupt
number?
The PCI interrupt for cell 1 is 140 and for cell 2 is 146. I tested both
individually and they work. However, when I have both cells running together,
the interrupts, as I said, are only sent to cell 1 (140). Below you can find
the bar_mark configs for both cells.
The bar_mask for cell 1 is:
.bar_mask = {
0xFFFBFF00, 0xFFFBFF00, 0x00000000,// set 1 << (146-128) to 0
0x00000000, 0x00000000, 0x00000000,
},
The bar_mask for cell 2 is:
.bar_mask = {
0xFFFF7F00, 0xFFFF7F00, 0x00000000, //set 1 << (140 - 128) to 0
0x00000000, 0x00000000, 0x00000000,
},
This config is not working, so probably is wrong.
I can see in the root-cell that when I write 1 to doorbell regs in both mapped
pci regions (0xfc100000 and 0xfc100100), the same irq_id is generated:
arch_ivshmem_trigger_interrupt(ive:0x0000ffffc02460a0), irq_id:140, current cpu
= 0
arch_ivshmem_trigger_interrupt(ive:0x0000ffffc02460a0), irq_id:140, current cpu
= 1
Thanks in advance.
Giovani
> > Maybe the problem is with the Linux side and/or UIO driver, because when I
> > start both cell, I can see that both send interrupts to Linux and they are
> > received. However, Linux can only send interrupts to cell 1.
>
> The UIO setup is not mature on ARM yet, that's why I was pointing to the
> ivshmem-net scenario. There might be issues remaining.
>
> >
> > I also did an user space program that maps the PCI regions using mmap and
> > sends interrupts through the mapped addresses. I can map region 1
> > (0xfc100000) with size 0x100 without program, but for region 2 (0xfc100100)
> > I can only map using size 4096. With size 0x100, I get an invalid mapping
> > from mmap (maybe some align problem?). Using 4096 in region 2, I can issue
> > an interrupt, but it is sent to cell 1, instead of cell 2.
>
> Memory mappings have to be page-aligned, /wrt the size and start
> address. In order to make Linux reserve a full page for an MMIO resource
> of some device (so that it can be handed out to userspace separately),
> tune the bar_mask for the respective region. 0xfffff000, 0xffffffff, ...
> should do the trick here.
>
> Jan
>
> --
> Siemens AG, Corporate Technology, CT RDA IOT 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.