Hi,

Thanks for getting back to me!

Jan, of course you are right. I did not reserve the memory needed, but I now 
remember reading about it for other platforms. Do you have any idea how to do 
it for this particular board? Peng might know I guess.

The description, "Reservation via device tree: reg = <0x0 0xffaf0000 0x0 
0x510000>", doesn't get me all the way to understanding exactly how to do this. 
But I guess I will need to read up on the device tree and how to reserve memory 
regions, or can this be achieved using boot parameters?

Cheers,
Arvid


On 2019-02-02, 10:24, "Jan Kiszka" <[email protected]> wrote:

    On 01.02.19 23:58, Arvid Rosén wrote:
    > Hi!
    > 
    > I just found Jailhouse, and I think it is a very interesting project. I 
would 
    > like to try it on a NXP i.MX8 EVK, namely exactly this:
    > 
    > 
https://www.nxp.com/support/developer-resources/run-time-software/i.mx-developer-resources/evaluation-kit-for-the-i.mx-8m-applications-processor:MCIMX8M-EVK
    > 
    
    Peng can probably explain if that's the board that our in-tree config files 
were 
    designed for, but it looks to me like it is.
    
    > This is new stuff to me, but I managed to use Yocto to create an image 
that runs 
    > a Linux Kernel v4.14.78. I also manage to build jailhouse from git on the 
board.
    > 
    > Then, it start to get tricky.
    > 
    > I start by issuing the following command, which works
    > 
    > /usr/local/sbin/jailhouse enable ~/jailhouse/configs/arm64/imx8mq.cell
    > 
    > I can also run:
    > 
    > /usr/local/sbin/jailhouse cell create 
jailhouse/configs/imx8mq-gic-demo.cell
    > 
    > This gives me an, in dmesg:
    > 
    > [46672.927620] Created Jailhouse cell "gic-demo"
    > 
    > What then?
    > 
    > I have tried this:
    > 
    > /usr/local/sbin/jailhouse cell load gic-demo 
    > jailhouse/inmates/demos/arm64/gic-demo.bin
    > 
    > This gives me an instant crash, with the folloing output:
    > 
    
    Did you reserve memory for hypervisor and inmates as described in 
    configs/arm64/imx8mq.c ("Reservation via device tree: reg = <0x0 0xffaf0000 
0x0 
    0x510000>")?
    
    Jan
    
    > [44859.014164] The Jailhouse was closed.
    > 
    > [44936.688241] The Jailhouse is opening.
    > 
    > [44943.531522] CPU3: shutdown
    > 
    > [44943.534236] psci: CPU3 killed.
    > 
    > [44943.546785] Created Jailhouse cell "gic-demo"
    > 
    > [44951.801985] Bad mode in Error handler detected on CPU0, code 
0xbf000002 -- SError
    > 
    > [44951.809476] Internal error: Oops - bad mode: 0 [#6] PREEMPT SMP
    > 
    > [44951.815395] Modules linked in: jailhouse(O) 8021q garp stp mrp 
crc32_ce 
    > crct10dif_ce qca6174(O) galcore(O) [last unloaded: jailhouse]
    > 
    > [44951.827409] CPU: 0 PID: 13109 Comm: jailhouse Tainted: G      D    O   
 
    > 4.14.78-imx_4.14.78_1.0.0_ga+g66620c3d281c #1
    > 
    > [44951.838014] Hardware name: Freescale i.MX8MQ EVK (DT)
    > 
    > [44951.843063] task: ffff8000b8c65100 task.stack: ffff0000206d0000
    > 
    > [44951.848983] PC is at 0xffff856e491c
    > 
    > [44951.852469] LR is at 0x401b08
    > 
    > [44951.855434] pc : [<0000ffff856e491c>] lr : [<0000000000401b08>] 
pstate: 80000000
    > 
    > [44951.862826] sp : 0000fffffc21e010
    > 
    > [44951.866138] x29: 0000fffffc21e010 x28: 0000000000402000
    > 
    > [44951.871450] x27: 0000000000000005 x26: 0000000000000001
    > 
    > [44951.876761] x25: 000000000c24b2b0 x24: 0000fffffc21ee22
    > 
    > [44951.882072] x23: 0000fffffc21e318 x22: 0000000000000005
    > 
    > [44951.887384] x21: 0000000000000005 x20: 000000000c24b2b0
    > 
    > [44951.892694] x19: 0000000000000003 x18: 000000000000081c
    > 
    > [44951.898006] x17: 0000000000413108 x16: 0000ffff856e4910
    > 
    > [44951.903317] x15: 0000ffff85621de0 x14: 0000ffff8562f2c8
    > 
    > [44951.908629] x13: 000000000000270f x12: 0000000000000001
    > 
    > [44951.913940] x11: 0000000000000000 x10: 0101010101010101
    > 
    > [44951.919250] x9 : 0000ffff857ae270 x8 : 000000000000001d
    > 
    > [44951.924562] x7 : 0000000000000000 x6 : 0000000000000000
    > 
    > [44951.929873] x5 : 0000000000000077 x4 : 000000000c24b2c0
    > 
    > [44951.935184] x3 : 0000000000000000 x2 : 000000000c24b260
    > 
    > [44951.940495] x1 : 0000000040300003 x0 : 0000000000000000
    > 
    > [44951.945806] Process jailhouse (pid: 13109, stack limit = 
0xffff0000206d0000)
    > 
    > [44951.952853] ---[ end trace 528a201c8566b124 ]---
    > 
    > What do I need to do to run the gic-demo on my board? Am I doing anything 
wrong, 
    > and in what state is the NXP IMX support currently?
    > 
    > Thanks,
    > 
    > Arvid
    > 
    > -- 
    > 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] 
    > <mailto:[email protected]>.
    > For more options, visit https://groups.google.com/d/optout.
    
    -- 
    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.

Reply via email to