On 2018-08-26 10:50, Nir Geller wrote:

Hi there,

I recently started developing a system on a Sitara am5728 by TI.
This cpu has 2 arm7 A15 cores.

I aim to run Linux on the root cell and RTOS on the inmate cell.

At the moment I'm using an evaluation board from TI.
This board has 1 PCIe slot, on which a realtek ethernet adapter is installed.

When I startup Linux without jailhouse I'm able to modprobe the r8169 driver 
and use the ethernet adapter without any problem.
In my system RTOS has no need to use the PCIe.

The problem:

After I modprobe jailhouse.ko and create the root cell, I attempt to modprobe 
r8169 and I get this:

root@am57xx-evm:~# modprobe jailhouse
root@am57xx-evm:~# jailhouse enable 
/usr/share/jailhouse/examples/am57xx-evm.cell

Initializing Jailhouse hypervisor v0.7 (220-g2ad429b) on CPU 0
Code location: 0xf0000040
Page pool usage after early setup: mem 30/4072, remap 32/131072
Initializing processors:
  CPU 0... OK
  CPU 1... OK
Page pool usage after late setup: mem 40/4072, remap 38/131072
Activating hypervisor
[   55.866355] The Jailhouse is opening.
root@am57xx-evm:~#
root@am57xx-evm:~#
root@am57xx-evm:~# modprobe r8169
Unhandled data read at 0x2000103d(1)
FATAL: unhandled trap (exception class 0x24)
pc=0xc05554b8 cpsr=0x60010093 hsr=0x93010005
r0=0xe108f03d r1=0x00000001 r2=0xd29bfc4c r3=0x00000000
r4=0xd393e628 r5=0xe108f000 r6=0x01000000 r7=0x0000003d
r8=0x00000001 r9=0xd393e610 r10=0x00000000 r11=0xd29bfbec
r12=0xd29bfbf0 r13=0xd29bfbe0 r14=0xc0556254
Parking CPU 0 (Cell: "AM57XX-EVM")

So if I understand correctly, jailhouse forbids Linux from reading address 
0x2000103d and stops core 0.

/proc/iomem and /proc/ioports show that PCI address space is indeed mapped to 
the 0x20000000 region.


root@am57xx-evm:~# dmesg | grep -i pci
...
[    0.762245] OF: PCI: host bridge /ocp/axi@0/pcie@51000000 ranges:
[    0.762280] OF: PCI:    IO 0x20003000..0x20012fff -> 0x00000000
[    0.762306] OF: PCI:   MEM 0x20013000..0x2fffffff -> 0x20013000
...

By looking at am57xx-evm.c I don't see where this address space is handled. I 
tried adding it to .mem_regions but I got a similar result:

That addition is not reflected in the config you attached, is it? But that is the way to go. Maybe you only made some mistake. Basically, this plus an increase of the mem_regions array by 1 should do it:

{
        .phys_start = 0x20013000,
        .virt_start = 0x20013000,
        .size = 0xffed000,
        .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
                JAILHOUSE_MEM_IO,
},

Vitaly, left out the PCI region intentionally?

Jan

--
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