Hi!

For the project I'm working on I would like to allow Jailhouse to use more
than 1 GiB memory on the Raspberry Pi 4. Following the memory map from
BCM2711 documentation (
https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711/rpi_DATA_2711_1p0.pdf
) and /proc/iomem, I added this section into rpi4.cell:

/* RAM (1024M-4032M) */ {
.phys_start = 0x40000000,
.virt_start = 0x40000000,
.size = 0xbc000000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE,
},

When I left mem=768M in the kernel command line, everything worked as
before. But I wanted to use more memory, so I made a reserved-memory
section in a device tree overlay. It reserves the range of 768M-1024M and
verified it's working as expected in /proc/iomem. However, when I try to
enable Jailhouse using the modified rpi4.cell, I get this error:

root@demo:~# jailhouse enable rpi4-4g.cell

Initializing Jailhouse hypervisor v0.12 (59-g4ce7658d) on CPU 3
Code location: 0x0000ffffc0200800
Page pool usage after early setup: mem 39/994, remap 0/131072
Initializing processors:
CPU 3... OK
CPU 0... OK
CPU 2... OK
CPU 1... OK
Initializing unit: irqchip
Initializing unit: ARM SMMU v3
Initializing unit: PVU IOMMU
Initializing unit: PCI
Adding virtual PCI device 00:00.0 to cell "Raspberry-Pi4 4G"
Adding virtual PCI device 00:01.0 to cell "Raspberry-Pi4 4G"
Page pool usage after late setup: mem 61/994, remap 5/131072
FATAL: instruction abort at 0xfbfff7c0

FATAL: forbidden access (exception class 0x20)
Cell state before exception:
pc: ffffffc0089fd7c0   lr: ffffffc0089fd7c0 spsr: 20000085     EL1
sp: ffffffc01000bef0  esr: 20 1 0000086
x0: 0000000000000000   x1: 0000000000000000   x2: 0000000000000000
x3: 0000000000000000   x4: 0000000000000000   x5: 0000000000000000
x6: 0000000000000000   x7: 0000000000000000   x8: 0000000000000000
x9: 0000000000000000  x10: 0000000000000000  x11: 0000000000000000
x12: 0000000000000000  x13: 0000000000000000  x14: 0000000000000000
x15: 0000000000000000  x16: 0000000000000000  x17: 0000000000000000
x18: 0000000000000000  x19: ffffffc008a04c28  x20: ffffffc014800000
x21: 0000000000000000  x22: 0000000000000001  x23: 0000000000000000
x24: 0000000000000001  x25: 0000000000000001  x26: ffffffc010fe3dc0
x27: 0000000000000000  x28: ffffff80f6da5940  x29: ffffffc01000bef0

Parking CPU 1 (Cell: "Raspberry-Pi4 4G")

The address 0xfbfff7c0 is in the range that is mentioned in the added RAM
section.

Any ideas or hints what else could be wrong?

Jakub

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/CAGdCPwvsiHYiCOVWr8s_Ey6knD2LiEo_SjP2tNWFLm0LzgWS7g%40mail.gmail.com.

Reply via email to