Hi@all,
i try to get jailhouse running on a cubietruck (
http://linux-sunxi.org/Cubietech_Cubietruck) ... it's a similiar device like bananapi but with 2g instead of 1g ram ...
As distri i use debian-jessie with a mainline 3.19 kernel ...
I also use latest mainline uboot
-> U-Boot 2015.04-rc2-00067-g38dac81 (Feb 24 2015 - 19:30:59) Allwinner Technology)
and also the latest jailhouse
{
commit 0de30494b8967f8e24d012150ff0afa8fdede7c6
Author: Jan Kiszka <
jan.k...@siemens.com>
Date: Sun Feb 22 10:26:06 2015 +0100
}
My bood.cmd is
{
fatload mmc 0 0x46000000 uImage
fatload mmc 0 0x49000000 sun7i-a20-cubietruck.dtb
setenv bootargs console=ttyS0,115200 <earlyprintk> root=/dev/mmcblk0p2 mem=1984M vmalloc=512M rootwait panic=10
bootm 0x46000000 - 0x49000000
}
So far so good :-) ... it builds without problems (native on the device and via cross-gcc) ... and i can load jailhouse without any problems ...
cubietruck:/usr/src/jailhouse# lsmod
Module Size Used by
bnep 11573 2
bluetooth 364663 5 bnep
rfkill 21891 2 bluetooth
jailhouse 11527 0
uio_pdrv_genirq 3582 0
uio 10453 1 uio_pdrv_genirq
But if i enable the cell (cubietruck:/usr/src/jailhouse/configs# jailhouse enable cubietruck.cell) it completely crashes ... no more output ... but on the serial console i get the following output:
nitializing Jailhouse hypervisor v0.1 (328-g0de3049) on CPU 1
Code location: 0xf0000020
Page pool usage after early setup: mem 16/16368, remap 32/32768
Initializing processors:
CPU 1... OK
CPU 0... OK
Page pool usage after late setup: mem 21/16368, remap 32/32768
Unhandled data read at 0x1c6003c(4)
FATAL: unhandled trap (exception class 0x24)
pc=0xc052301c cpsr=0x60000193 esr=0x93800007
r0=0x0000002a r1=0x0000002a r2=0xc09b4780 r3=0xdf850000
r4=0xfc463282 r5=0x0000005c r6=0xe0acf029 r7=0x00000000
r8=0xc09b4780 r9=0xc09a2558 r10=0xc099be40 r11=0xc099bcec
r12=0xc099bcf0 r13=0xc099bcf0 r14=0xc099bcf0
Parking CPU 0 (Cell: "Cubietruck")
I have no idea where the problem is ... i reduced the config to an absolute minimum and checked the values ... but still no idea ...
Here my "calculations":
2048M - 64M = 1984M -> mem=1984M
0x80000000 - 0x4000000 = 0x7c000000 -> hypervisor_memory
The Cubietruck is also a A20 like bananapi so i have taken the same phys_start ... but i'm not shure if it's correct ... when i look at the a20 datasheet i read "DDR-II/DDR-III 0x4000 0000---0xBFFF FFFF 2G" ... but i also assume that the bananapi cell is correct and working ... so i took the them ...
Here's my cubietruck.c:
#include <linux/types.h>
#include <jailhouse/cell-config.h>
#define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])
struct {
struct jailhouse_system header;
__u64 cpus[1];
struct jailhouse_memory mem_regions[2];
struct jailhouse_irqchip irqchips[1];
} __attribute__((packed)) config = {
.header = {
.hypervisor_memory = {
.phys_start = 0x7c000000,
.size = 0x4000000,
},
.debug_uart = {
.phys_start = 0x01c28000,
.size = 0x1000,
.flags = JAILHOUSE_MEM_IO,
},
.root_cell = {
.name = "Cubietruck",
.cpu_set_size = sizeof(config.cpus),
.num_memory_regions = ARRAY_SIZE(config.mem_regions),
.num_irqchips = 1,
},
},
.cpus = {
0x3,
},
.mem_regions = {
/* RAM */ {
.phys_start = 0x40000000,
.virt_start = 0x40000000,
.size = 0x80000000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE,
},
},
.irqchips = {
/* GIC */ {
.address = 0x2f000000,
.pin_bitmap = 0xffffffffffffffff,
},
},
};
Cheers
Thorsten