Jailhouse on Lx2160ardb

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Jailhouse on Lx2160ardb

Jump to solution
366 Views
lcothales
Contributor I

Hi,

I'm building a Jailhouse demo on LX2160ardb. I've booted a root cell (with
Linux 6.1.36) and a non-root cell (with Linux PREMPT-RT 6.1.36).
Now I'm trying to use the ivshmem mechanism. I've configured an uio_ivshmem and a
network_ivshmem. I see each device (eth0 and /dev/uio0) on each cell but when I
try to run the ivshmem-demo script, to test uio devices, on each cell, I get these traces :

*********************************
For root cell :

ID = 0
Maximum peers = 2
state[0] = 1
state[1] = 0
state[2] = 0
rw[0] = 0
rw[1] = 0
rw[2] = 0
in@0x0000 = 0
in@0x2000 = 0
in@0x4000 = 0

Sending interrupt 0 to peer 1

Sending interrupt 0 to peer 1

Interrupt #3
state[0] = 1
state[1] = 0
state[2] = 0
rw[0] = 3
rw[1] = 0
rw[2] = 0
in@0x0000 = 30
in@0x2000 = 0
in@0x4000 = 3

Sending interrupt 0 to peer 1
*********************************

*********************************
For non-root cell :

ID = 1
Maximum peers = 2
state[0] = 0
state[1] = 2
state[2] = 0
rw[0] = 0
rw[1] = 0
rw[2] = 0
in@0x0000 = 0
in@0x2000 = 0
in@0x4000 = 0

Sending interrupt 0 to peer 0

Sending interrupt 0 to peer 0

Sending interrupt 0 to peer 0
*********************************


Note that states are not shared and that non-root cell never receives an
interrupt from the root cell, while the root cell receives an interrupt from
the non-root cell.

Do you have an idea how to find the problem ?

Thanks in advance,

0 Kudos
Reply
1 Solution
249 Views
Oswalag
NXP TechSupport
NXP TechSupport

Hello, 

I've investigated but unfortunately we don't have a clear guide for layerscape devices, all the available information can be found in the links below:

  1. About Jailhouse, can refer to the following link:

https://github.com/siemens/jailhouse/tree/master/Documentation

  1. About real-time-edge, can refer to reference manual on nxp.com:

https://www.nxp.com.cn/docs/en/user-guide/RTEDGEYOCTOUG_REV2.2.pdf

https://www.nxp.com.cn/docs/en/user-guide/REALTIMEEDGEUG_REV2.2.pdf

I understand that GICv3 ITS can be only entirely in root cell or inmate cell, it can't be divided into two cell. this may cause the interrupts issue, I've also found this example of ping:Inter-VM Shared Memory (ivshmem) Ethernet , but Zephyr is open source project which is not owned by NXP. So for this further question , I suggest you query on Zephyr Github discussion forum:https://github.com/zephyrproject-rtos/zephyr 

View solution in original post

0 Kudos
Reply
3 Replies
280 Views
lcothales
Contributor I

Hi,

Thanks a lot, I had an issue in DTB of the inmate. I fixed it.
Now, my shared memory regions seem to be fine.
But, as you can see in traces, I have a problem with signals.
The root cell receives interrupts of the non-root cell but the non-root cell receives nothing.

*******************************
For root cell:

ID = 0
Maximum peers = 2
state[0] = 1
state[1] = 0
state[2] = -559038737
rw[0] = 0
rw[1] = -559038737
rw[2] = -559038737
in@0x0000 = 0
in@0x2000 = -559038737
in@0x4000 = 0

Sending interrupt 0 to peer 1

Sending interrupt 0 to peer 1

Interrupt #1
state[0] = 1
state[1] = 2
state[2] = -559038737
rw[0] = 1
rw[1] = 0
rw[2] = -559038737
in@0x0000 = 10
in@0x2000 = 0
in@0x4000 = 1

Sending interrupt 0 to peer 1

Interrupt #2
state[0] = 1
state[1] = 2
state[2] = -559038737
rw[0] = 2
rw[1] = 0
rw[2] = -559038737
in@0x0000 = 20
in@0x2000 = 0
in@0x4000 = 2

....

Interrupt #9
state[0] = 1
state[1] = 0
state[2] = -559038737
rw[0] = 9
rw[1] = 0
rw[2] = -559038737
in@0x0000 = 90
in@0x2000 = 0
in@0x4000 = 9

Sending interrupt 0 to peer 1

Sending interrupt 0 to peer 1
*******************************

*******************************
For non-root cell:

ID = 1
Maximum peers = 2
state[0] = 1
state[1] = 2
state[2] = -559038737
rw[0] = 1
rw[1] = 0
rw[2] = -559038737
in@0x0000 = 10
in@0x2000 = 0
in@0x4000 = 1

Sending interrupt 0 to peer 0

Sending interrupt 0 to peer 0

Sending interrupt 0 to peer 0

Sending interrupt 0 to peer 0
*******************************

In addition, ping between network interfaces (through ivshmem_network
mechanism) doesn't work.

Do you have an idea (again) to find this problem ?

Thanks in advance,

0 Kudos
Reply
250 Views
Oswalag
NXP TechSupport
NXP TechSupport

Hello, 

I've investigated but unfortunately we don't have a clear guide for layerscape devices, all the available information can be found in the links below:

  1. About Jailhouse, can refer to the following link:

https://github.com/siemens/jailhouse/tree/master/Documentation

  1. About real-time-edge, can refer to reference manual on nxp.com:

https://www.nxp.com.cn/docs/en/user-guide/RTEDGEYOCTOUG_REV2.2.pdf

https://www.nxp.com.cn/docs/en/user-guide/REALTIMEEDGEUG_REV2.2.pdf

I understand that GICv3 ITS can be only entirely in root cell or inmate cell, it can't be divided into two cell. this may cause the interrupts issue, I've also found this example of ping:Inter-VM Shared Memory (ivshmem) Ethernet , but Zephyr is open source project which is not owned by NXP. So for this further question , I suggest you query on Zephyr Github discussion forum:https://github.com/zephyrproject-rtos/zephyr 

0 Kudos
Reply
324 Views
Oswalag
NXP TechSupport
NXP TechSupport

Hello,

The IVSHMEM device is emulated in the hypervisor, and the shared memory regions are reserved in the DTB for cross-cell communication, based on your results you may have issues in the DTB of the inmate cell.

0 Kudos
Reply