Questions on imx6q sabresd board

104 views
Skip to first unread message

陈亦鹏

unread,
Nov 10, 2017, 11:26:16 PM11/10/17
to xvisor...@googlegroups.com
Hello, Xvisor Development Team.
I am currently doing some work with Xvisor, and I want to test Xvisor ( Xvisor on Sabre LITE (or Nitrogen6X) using SD Booting) on a imx6q sabresd board. 

I have two questions as below:

1.  I failed to creat guest0. Below is the log information. 

Xvisor v0.2.9 (Nov  6 2017 16:03:38)

init: host address space
init: heap management
init: exception table
init: device tree
init: discover secondary CPUs
cpu@0: unsupported enable-method property: smp-imx
cpu@1: unsupported enable-method property: smp-imx
cpu@2: unsupported enable-method property: smp-imx
cpu@3: unsupported enable-method property: smp-imx
init: per-CPU areas
init: host irq subsystem
init: CPU early
init: board early
soc_device_register not implemented yet
FIXME: GPC is the secondary interrupt controller behind GIC
init: early funtions
init: standard I/O
init: clocksource manager
init: clockchip manager
init: hypervisor timer
init: hypervisor soft delay
init: hypervisor shared memory
init: hypervisor manager
init: hypervisor scheduler
init: hypervisor threads
init: inter-processor interrupts
init: workqueue framework
init: wallclock subsystem
init: start secondary CPUs
init: command manager
init: device driver framework
init: device emulation framework
init: character device framework
init: iommu framework
init: hypervisor modules
init: block device framework
init: network switch framework
init: network port framework
initrd: RBD created at 0x30000040 - 0x32000040
init: CPU final
init: board final
sram@0x00900000: SRAM pool: 240 KiB @ 0xff280000
INFO: gpio@0209c000: gpio_mxc0 registered
INFO: gpio@020a0000: gpio_mxc1 registered
INFO: gpio@020a4000: gpio_mxc2 registered
INFO: iomuxc@020e0000: initialized IMX pinctrl driver
WARNING: spi0.0: found mr25h256, expected sst25vf016b
Found mr25h256 compatible flash device
INFO: spi0.0: mr25h256 (32 Kbytes)
INFO: spi0.0: mtd
  .name = spi0.0,
  .size = 0x8000 (0MiB)
  .erasesize = 0x00008000 (32KiB)
  .numeraseregions = 0
INFO: i2c-0: IMX I2C adapter registered
INFO: i2c-1: IMX I2C adapter registered
INFO: i2c-2: IMX I2C adapter registered
INFO: ipu@02400000: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
INFO: ipu@02800000: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
INFO: fb@0: register mxc display driver ldb
INFO: fb@1: register mxc display driver hdmi
ERROR: fb@1: NO mxc display driver found!
init: final functions
init: CPU0 online
init: brought-up 1 CPUs
init: freeing init memory 88K
init: change stdio device to uart1
Error: command fb failed (code -1)
Trying: ext4
Mounted initrd using ext4 at /
devemu_probe_edev: guest0/uart0 probe error -3
guest0: Failed to create
Error: command guest failed (code -1)
Failed to find guest guest0
Error: command vfs failed (code -3)

ooooooo  ooooo oooooo     oooo ooooo  .oooooo..o   .oooooo.   ooooooooo.  
 `8888    d8'   `888.     .8'  `888' d8P'    `Y8  d8P'  `Y8b  `888   `Y88.
   Y888..8P      `888.   .8'    888  Y88bo.      888      888  888   .d88'
    `8888'        `888. .8'     888    `Y8888o.  888      888  888ooo88P' 
   .8PY888.        `888.8'      888        `Y88b 888      888  888`88b.   
  d8'  `888b        `888'       888  oo     .d8P `88b    d88'  888  `88b. 
o888o  o88888o       `8'       o888o 8''88888P'   `Y8bood8P'  o888o  o888o


XVisor# 


I try to debug it and finally I find the problem is happened at xvisor\xvisor-next-master\emulators\serial\imx_serial.c line 592-594.

rc = vmm_devtree_read_u32_atindex(edev->node,
 VMM_DEVTREE_INTERRUPTS_ATTR_NAME,
 &s->txirq, 1);

When  I change 1 to 0, such as 
rc = vmm_devtree_read_u32_atindex(edev->node,
  VMM_DEVTREE_INTERRUPTS_ATTR_NAME,
  &s->txirq, 0);

The guest0 is created successfully. So is it the right repair method?


2. After that, the guest0 was successfully created, so I try to execution instruction such as guest kick guest0 and vserial bind guest0/uart0.
However, when i execution  guest kick guest0, a strange mistake happened. Below is the log information. 

Starting kernel ...
                   

Xvisor v0.2.9 (Nov  6 2017 16:03:38)

init: host address space
init: heap management
init: exception table
init: device tree
init: discover secondary CPUs
cpu@0: unsupported enable-method property: smp-imx
cpu@1: unsupported enable-method property: smp-imx
cpu@2: unsupported enable-method property: smp-imx
cpu@3: unsupported enable-method property: smp-imx
init: per-CPU areas
init: host irq subsystem
init: CPU early
init: board early
soc_device_register not implemented yet
FIXME: GPC is the secondary interrupt controller behind GIC
init: early funtions
init: standard I/O
init: clocksource manager
init: clockchip manager
init: hypervisor timer
init: hypervisor soft delay
init: hypervisor shared memory
init: hypervisor manager
init: hypervisor scheduler
init: hypervisor threads
init: inter-processor interrupts
init: workqueue framework
init: wallclock subsystem
init: start secondary CPUs
init: command manager
init: device driver framework
init: device emulation framework
init: character device framework
init: iommu framework
init: hypervisor modules
init: block device framework
init: network switch framework
init: network port framework
initrd: RBD created at 0x30000040 - 0x32000040
init: CPU final
init: board final
sram@0x00900000: SRAM pool: 240 KiB @ 0xff280000
INFO: gpio@0209c000: gpio_mxc0 registered
INFO: gpio@020a0000: gpio_mxc1 registered
INFO: gpio@020a4000: gpio_mxc2 registered
INFO: iomuxc@020e0000: initialized IMX pinctrl driver
WARNING: spi0.0: found mr25h256, expected sst25vf016b
Found mr25h256 compatible flash device
INFO: spi0.0: mr25h256 (32 Kbytes)
INFO: spi0.0: mtd
  .name = spi0.0,
  .size = 0x8000 (0MiB)
  .erasesize = 0x00008000 (32KiB)
  .numeraseregions = 0
INFO: i2c-0: IMX I2C adapter registered
INFO: i2c-1: IMX I2C adapter registered
INFO: i2c-2: IMX I2C adapter registered
INFO: ipu@02400000: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
INFO: ipu@02800000: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
INFO: fb@0: register mxc display driver ldb
INFO: fb@1: register mxc display driver hdmi
ERROR: fb@1: NO mxc display driver found!
init: final functions
init: CPU0 online
init: brought-up 1 CPUs
init: freeing init memory 88K
init: change stdio device to uart1
Error: command fb failed (code -1)
Trying: ext4
Mounted initrd using ext4 at /
i.MX CCM reset
i.MX ANATOP reset
i.MX ANATOP reset
i.MX CCM reset
guest0: Created
guest0: Loading 0x08000000 with file /images/arm32/sabrelite/firmware.bin
guest0: Loaded 0x08000000 with 96048 bytes
guest0: Loading 0x080FF000 with file /images/arm32/sabrelite/cmdlist
guest0: Loaded 0x080FF000 with 166 bytes
guest0: Loading 0x08100000 with file /images/arm32/sabrelite/Image
guest0: Loaded 0x08100000 with 9173408 bytes
guest0: Loading 0x08FF0000 with file /images/arm32/sabrelite/imx6q-nitrogen6x.dtb
guest0: Loaded 0x08FF0000 with 29134 bytes
guest0: Loading 0x09000000 with file /images/arm32/rootfs.img
guest0: Loaded 0x09000000 with 1312768 bytes

ooooooo  ooooo oooooo     oooo ooooo  .oooooo..o   .oooooo.   ooooooooo.  
 `8888    d8'   `888.     .8'  `888' d8P'    `Y8  d8P'  `Y8b  `888   `Y88.
   Y888..8P      `888.   .8'    888  Y88bo.      888      888  888   .d88'
    `8888'        `888. .8'     888    `Y8888o.  888      888  888ooo88P' 
   .8PY888.        `888.8'      888        `Y88b 888      888  888`88b.   
  d8'  `888b        `888'       888  oo     .d8P `88b    d88'  888  `88b. 
o888o  o88888o       `8'       o888o 8''88888P'   `Y8bood8P'  o888o  o888o


XVisor# guest kick guest0
guest0: Kicked
XVisor# Unprecidable Instruction 0xffedfeff
Reason: arm_instgrp_uncond

Core Registers
      SP=0x00000000      LR=0x00000000      PC=0x11000000
    CPSR=0x400001d3
General Purpose Registers
     R00=0x00000000     R01=0x00000000     R02=0x00000000
     R03=0x00000000     R04=0x00000000     R05=0x00000000
     R06=0x00000000     R07=0x00000000     R08=0x00000000
     R09=0x00000000     R10=0x00000000     R11=0x00000000
     R12=0x00000000
do_undef_inst: error -1


After that  I try to execution vserial bind guest0/uart0, but nothing happened.  Below is the log information. 

guest0: Created
guest0: Loading 0x08000000 with file /images/arm32/sabrelite/firmware.bin
guest0: Loaded 0x08000000 with 96048 bytes
guest0: Loading 0x080FF000 with file /images/arm32/sabrelite/cmdlist
guest0: Loaded 0x080FF000 with 166 bytes
guest0: Loading 0x08100000 with file /images/arm32/sabrelite/Image
guest0: Loaded 0x08100000 with 9173408 bytes
guest0: Loading 0x08FF0000 with file /images/arm32/sabrelite/imx6q-nitrogen6x.dtb
guest0: Loaded 0x08FF0000 with 29134 bytes
guest0: Loading 0x09000000 with file /images/arm32/rootfs.img
guest0: Loaded 0x09000000 with 1312768 bytes

ooooooo  ooooo oooooo     oooo ooooo  .oooooo..o   .oooooo.   ooooooooo.  
 `8888    d8'   `888.     .8'  `888' d8P'    `Y8  d8P'  `Y8b  `888   `Y88.
   Y888..8P      `888.   .8'    888  Y88bo.      888      888  888   .d88'
    `8888'        `888. .8'     888    `Y8888o.  888      888  888ooo88P' 
   .8PY888.        `888.8'      888        `Y88b 888      888  888`88b.   
  d8'  `888b        `888'       888  oo     .d8P `88b    d88'  888  `88b. 
o888o  o88888o       `8'       o888o 8''88888P'   `Y8bood8P'  o888o  o888o


XVisor# guest kick guest0
guest0: Kicked
XVisor# Unprecidable Instruction 0xffedfeff
Reason: arm_instgrp_uncond

Core Registers
      SP=0x00000000      LR=0x00000000      PC=0x11000000
    CPSR=0x400001d3
General Purpose Registers
     R00=0x00000000     R01=0x00000000     R02=0x00000000
     R03=0x00000000     R04=0x00000000     R05=0x00000000
     R06=0x00000000     R07=0x00000000     R08=0x00000000
     R09=0x00000000     R10=0x00000000     R11=0x00000000
     R12=0x00000000
do_undef_inst: error -1
vserial bind guest0/uart0
[guest0/uart0] 

I don't know the reason. Can you help me? Thank you.




 

陈亦鹏

unread,
Nov 10, 2017, 11:26:16 PM11/10/17
to Anup Patel, xvisor-devel, 陈亦鹏

Anup Patel

unread,
Nov 22, 2017, 10:53:07 AM11/22/17
to Xvisor Devel
Hi,

I totally missed this email because last week was busy with v0.2.10 release.


Here are my views about the issues you pointed:
1. Regarding point1, correct fix would be to do
s->txirq = s->rxirq if reading txirq fails. (I will fix this)

2. Regarding point2, there is some issue with instruction
patching of Guest Linux kernel for Saberlite Guest.
Example of instruction patching steps are
step11 & step12 in tests/arm32/vexpress-a9/linux/README

Regards,
Anup
Reply all
Reply to author
Forward
0 new messages