On 06.11.18 08:16, jjzhu1...@gmail.com wrote:
Hi Jan,

Thank you for you help! the root cell finally booted up successfully!

jh_01 login: root
Password:
root@jh_01:~# start_getty 115200 ttyPS1 &
[1] 2045
root@jh_01:~# modprobe jailhouse
[   63.894446] jailhouse: loading out-of-tree module taints kernel.
root@jh_01:~# jailhouse enable zynqmp-zcu102.cell

Initializing Jailhouse hypervisor v0.10 on CPU 3
Code location: 0x0000ffffc0200800
Page pool usage after early setup: mem 39/996, remap 0/131072
Initializing processors:
  CPU 3... OK
  CPU 1... OK
  CPU 0... OK
  CPU 2... OK
Initializing unit: irqchip
Initializing unit: PCI
Adding virtual PCI device 00:00.0 to cell "ZynqMP-ZCU102"
Adding virtual PCI device 00:01.0 to cell "ZynqMP-ZCU102"
Page pool usage after late setup: mem 61/996, remap 5/131072
Activating hypervisor
[   67.785765] OF: PCI: host bridge //pci@0 ranges:
[   67.792657] OF: PCI:   MEM 0xfc100000..0xfc103fff -> 0xfc100000
[   67.800870] pci-host-generic fc000000.pci: ECAM at [mem 
0xfc000000-0xfc0fffff] for [bus 00]
[   67.811624] pci-host-generic fc000000.pci: PCI host bridge to bus 0000:00
[   67.820716] pci_bus 0000:00: root bus resource [bus 00]
[   67.828212] pci_bus 0000:00: root bus resource [mem 0xfc100000-0xfc103fff]
[   67.837843] pci 0000:00:00.0: BAR 0: assigned [mem 0xfc100000-0xfc1000ff 
64bit]
[   67.847427] pci 0000:00:01.0: BAR 0: assigned [mem 0xfc100100-0xfc1001ff 
64bit]
[   67.857009] The Jailhouse is opening.
root@jh_01:~# jailhouse cell create zynqmp-zcu102-gic-demo.cell
[   82.076593] CPU3: shutdown
[   82.081468] psci: CPU3 killed.
Created cell "gic-demo"
Page pool usage after cell creation: mem 75/996, remap 5/131072
[   82.116898] Created Jailhouse cell "gic-demo"
root@jh_01:~# jailhouse cell load
--name    1         gic-demo
root@jh_01:~# jailhouse cell load 1 gic-demo1.bin
Cell "gic-demo" can be loaded
root@jh_01:~# jailhouse cell  start
Usage: jailhouse { COMMAND | --help | --version }

Available commands:
    enable SYSCONFIG
    disable
    console [-f | --follow]
    cell create CELLCONFIG
    cell list
    cell load { ID | [--name] NAME } { IMAGE | { -s | --string } "STRING" }
              [-a | --address ADDRESS] ...
    cell start { ID | [--name] NAME }
    cell shutdown { ID | [--name] NAME }
    cell destroy { ID | [--name] NAME }
    cell linux CELLCONFIG KERNEL [-i | --initrd FILE]
               [-c | --cmdline "STRING"] [-w | --write-params FILE]
    cell stats { ID | [--name] NAME }
    config create [-h] [-g] [-r ROOT] [--mem-inmates MEM_INMATES]
                  [--mem-hv MEM_HV] FILE
    config collect FILE.TAR
    hardware check
root@jh_01:~# jailhouse cell start 1
Started cell "gic-demo"

The modification I did is as follow:
in zynqmp-zcu102.c

.header = {
                .signature = JAILHOUSE_SYSTEM_SIGNATURE,
                .revision = JAILHOUSE_CONFIG_REVISION,
                .flags = JAILHOUSE_SYS_VIRTUAL_DEBUG_CONSOLE,
                .hypervisor_memory = {
                        .phys_start = 0x40000000,
                        .size =       0x00400000,
                },

/* RAM */ {
                        .phys_start = 0x0,
                        .virt_start = 0x0,
                        .size = 0x40000000,
                        .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
                                JAILHOUSE_MEM_EXECUTE,
                },
                /* RAM */ {
                        .phys_start = 0x40600000,
                        .virt_start = 0x40600000,
                        .size = 0x3fa00000,
                        .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
                                JAILHOUSE_MEM_EXECUTE,
                },
                /* IVSHMEM shared memory region for 00:00.0 */ {
                        .phys_start = 0x40400000,
                        .virt_start = 0x40400000,
                        .size = 0x100000,
                        .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
                },
                /* IVSHMEM shared memory region for 00:01.0 */ {
                        .phys_start = 0x40500000,
                        .virt_start = 0x40500000,
                        .size = 0x100000,
                        .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
                },

I also have changed the zynqmp-zcu102-gic-demo.c

/* RAM */ {
                        .phys_start = 0x40600000,
                        .virt_start = 0,
                        .size = 0x00010000,
                        .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
                                JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_LOADABLE,
                },

But when I start the gic-demo cell, no print out information.

If you are using/deriving from configs/arm64/zynqmp-zcu102-gic-demo.c, you will see that this directs the output to the second UART. If you don't have that port, change it to be shared with the root cell's UART.

Jan

--
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 jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to