Xvisor on Freescale i.MX6 Nitrogen6x

147 views
Skip to first unread message

Joao Pedro Silva

unread,
Jul 30, 2016, 8:39:29 AM7/30/16
to xvisor...@googlegroups.com
Hello Everyone,

I have been studying and working with Xvisor already some months ago, starting with Xvisor in the virtual platforms.
After the virtual platforms I decided to try Xvisor in the board, for that I have a Freescale i.MX6 nitrogen6x. After following the README file e got stuck in the uboot commands, do you know what can possibly be?

=> setenv board nitrogen
=> for disk in 0 1 ; do mmc dev ${disk} ; for fs in fat ext2 ; do if ${fs}load mmc ${disk}:1 10008000 /6x_bootscript; then source 10008000; fi ; done ; done
switch to partitions #0, OK
mmc0 is current device
reading /6x_bootscript
1071 bytes read in 15 ms (69.3 KiB/s)
## Executing script at 10008000
Load from SD/MMC
reading /uvmm.bin
1424364 bytes read in 82 ms (16.6 MiB/s)
reading /vmm-imx6q-nitrogen.dtb
16589 bytes read in 21 ms (770.5 KiB/s)
## Booting kernel from Legacy Image at 10800000 ...
   Image Name:   Xvisor
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1424300 Bytes = 1.4 MiB
   Load Address: 17800000
   Entry Point:  17800000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 12000000
   Booting using the fdt blob at 0x12000000
   Loading Kernel Image ... OK
   reserving fdt memory region: addr=10000000 size=1000
   Using Device Tree in place at 12000000, end 120070cc

Starting kernel ...

And i got stuck in here. Nothing else happens.

Regards,
João Silva

Anup Patel

unread,
Jul 30, 2016, 9:43:24 AM7/30/16
to Xvisor Devel
Hi Joao Silva,

I looked at email threads for all people who have tried iMX6
Nitrogen6x board till now.

There was one issue similar to yours reported by "Mahdi Aichouch
<foxm...@gmail.com>".

It seems there are variations among Nitrogen6x boards in-context of
default serial port.

Can you try changing "console = &SERIAL2;" to "console = &SERIAL1;" in
arch/arm/board/generic/dts/imx6/sabrelite-a9/one_guest_sabrelite-a9.dts
and arch/arm/board/generic/dts/imx6/sabrelite-a9/two_guest_sabrelite-a9.dts
?

Regards,
Anup
> --
> You received this message because you are subscribed to the Google Groups
> "Xvisor Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to xvisor-devel...@googlegroups.com.
> Visit this group at https://groups.google.com/group/xvisor-devel.
> For more options, visit https://groups.google.com/d/optout.

Anup Patel

unread,
Jul 30, 2016, 9:45:30 AM7/30/16
to Xvisor Devel, Jean Guyomarc'h
Hi Jean,

I think we need separate set of DTS files for Nitrogen6x board.

The Sabrelite board DTS files have different console.

What do you think ?

Regards,
Anup

Joao Pedro Silva

unread,
Jul 30, 2016, 11:33:47 AM7/30/16
to xvisor...@googlegroups.com
Hi, 

I have made those changes and it happens the same before. 

After the two u-boot comands that are in the readme file I get:

switch to partitions #0, OK
mmc0 is current device
reading /6x_bootscript
1071 bytes read in 14 ms (74.2 KiB/s)
## Executing script at 10008000
Load from SD/MMC
reading /uvmm.bin
1424364 bytes read in 81 ms (16.8 MiB/s)
reading /vmm-imx6q-nitrogen.dtb
16589 bytes read in 21 ms (770.5 KiB/s)
## Booting kernel from Legacy Image at 10800000 ...
   Image Name:   Xvisor
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1424300 Bytes = 1.4 MiB
   Load Address: 17800000
   Entry Point:  17800000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 12000000
   Booting using the fdt blob at 0x12000000
   Loading Kernel Image ... OK
   reserving fdt memory region: addr=10000000 size=1000
   Using Device Tree in place at 12000000, end 120070cc

Starting kernel ...

Any help would be great.

Regards,
João Silva

Jean Guyomarc'h

unread,
Aug 1, 2016, 4:17:19 AM8/1/16
to xvisor...@googlegroups.com
Hi Anup,

I only used the nitrogen6x, but I thought it was possible
to switch from the nitrogen6x to the sabrelite thanks to
a u-boot environnement variable?

Nonetheless, adding a separated DTS file would be something
we should do ultimately.

Best regards,
Jean

--

Anup Patel

unread,
Aug 2, 2016, 11:20:25 AM8/2/16
to Xvisor Devel
Hi Joao Silva,

Like you mentioned previously, you have Nitrogen6x_max board.

I really don't have any i.MX6 based board but I can provide few
pointers for debugging.

To start with you should try defterm early prints by enabling
following config options:
CONFIG_DEFTERM_EARLY_PRINT=y
CONFIG_DEFTERM_EARLY_IMX=y
CONFIG_DEFTERM_EARLY_BASE_PA=0x021e8000

You can also try CONFIG_DEFTERM_EARLY_BASE_PA=0x02020000

Regards,
Anup

On Sat, Jul 30, 2016 at 9:03 PM, Joao Pedro Silva

Jean Guyomarc'h

unread,
Aug 2, 2016, 11:34:17 AM8/2/16
to xvisor...@googlegroups.com
Hi,

nitrogen6_max is not supported by Xvisor. At some point I
started porting nitrogen6_max to Xvisor, but I didn't went
all the way through. If you really want to use the nitrogen6_max,
you may want to look at
https://github.com/IRT-SystemX/xvisor-next/commit/0444fd0c71f87443a55227eeb438e4a2e99e975f
This commit is a bit of a mess. The wboxtest files are rubbish
and should be ignored. I stopped, due to a lack of time, and now
that I don't have access to the hardware anymore I cannot continue
working on it.

With this patch, Xvisor could boot, but crashed (hanged) in the
one of the drivers initialization.

The big problem with this board (regarding Xvisor I mean) is, I think,
the size of the RAM, which seems to mess a bit with Xvisor's internals.
It seems that some memory calculations overflowed 32 bits, and
I had to use 64-bits integers to hold some calculations.

Best regards,
Jean

--

Anup Patel

unread,
Aug 2, 2016, 11:40:49 AM8/2/16
to Xvisor Devel
Hi Jean,

Many thanks for the info and patch.

Actually, following is virtual address and physical address
sizes for various ARM ports:
arm32
virtual address - 32bit
physical address - 32bit
arm32ve
virtual address - 32bit
physical address - 64bit
arm64
virtual address - 64bit
physical address - 64bit

For i.MX6 based boards we have to use arm32 port
which means we are limited to 32bit physical address.

@Joao Silva,
I would suggest you to try path pointed by Jean but
better you use SabreLITE board or regular Nitrogen6x
board if possible.

Regards,
Anup

Joao Pedro Silva

unread,
Aug 3, 2016, 6:36:02 AM8/3/16
to xvisor...@googlegroups.com
Hi, 

Thank you for the answers, initially I will use a Freescale i.MX6 Sabre Board, since Jean already started the porting for Nitrogen6_max and I have that board, maybe I will try to finish it. I am able to boot xvisor but most of the commands fail, unhappily.

This is what I get when Xvisor starts. Any thoughts?

=> for disk in 1 1 ; do mmc dev ${disk} ; for fs in fat ext2 ; do if ${fs}load mmc ${disk}:1 10008000 /6x_bootscript; then source 10008000; fi ; done ; done
switch to partitions #0, OK
mmc1 is current device
reading /6x_bootscript
1071 bytes read in 14 ms (74.2 KiB/s)
## Executing script at 10008000
Load from SD/MMC
reading /uvmm.bin
1424364 bytes read in 83 ms (16.4 MiB/s)
reading /vmm-imx6q-sabrelite.dtb
16589 bytes read in 21 ms (770.5 KiB/s)
## Booting kernel from Legacy Image at 10800000 ...
   Image Name:   Xvisor
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1424300 Bytes = 1.4 MiB
   Load Address: 17800000
   Entry Point:  17800000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 11000000
   Booting using the fdt blob at 0x11000000
   Loading Kernel Image ... OK
   reserving fdt memory region: addr=10000000 size=1000
   Using Device Tree in place at 11000000, end 110070cc

Starting kernel ...


Xvisor v0.2.8 (Aug  1 2016 15:19:36)

init: host address space
init: heap management
init: exception table
init: per-CPU areas
init: device tree
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: standard I/O
init: clocksource manager
init: clockchip manager
init: hypervisor timer
init: soft delay
init: hypervisor manager
init: hypervisor scheduler
init: hypervisor threads
init: inter-processor interrupts
init: workqueue framework
init: wallclock subsystem
init: 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: hypervisor load balancer
init: command manager
init: device driver framework
init: device emulation framework
init: character device framework
init: hypervisor modules
init: block device framework
init: network switch framework
init: network port framework
init: CPU final
init: board final
sram@0x00900000: SRAM pool: 240 KiB @ 0xff280000
INFO: gpio@0209c000: gpio_mxc0 registered
INFO: gpio@020a4000: gpio_mxc2 registered
INFO: gpio@020b4000: gpio_mxc6 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: mdio_bus: fec_enet_mii_bus: probed
WARNING: usdhc@02198000: Manual tuning not implemented yet
WARNING: usdhc@02198000: could not get ultra high speed state, work on normal mode
INFO: usdhc@02198000: desired SD clock: 223378, actual: 223160
sdhci_send_command: Status update timeout on CMD0, arg 0x00000000!
usdhc@02198000: SDHCI controller v3 at 0x2198000 irq 56 [DMA]
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
init: CPU0 online
init: brought-up 1 CPUs
init: freeing init memory 100K
init: change stdio device to uart1
Error: command fb failed (code -1)
Block device mmc0p0 not found
Error: command vfs failed (code -8)
Failed to open /images/arm32/sabrelite-a9.dtb
Error: command vfs failed (code -3)
Error: failed to find guest0 node under /guests
Error: command guest failed (code -1)
Failed to find guest guest0
Error: command vfs failed (code -3)
Failed to open /system/banner.txt
Error: command vfs failed (code -3)
Unmount failed
Error: command vfs failed (code -5)

XVisor#

Regards, 
João Silva
Reply all
Reply to author
Forward
0 new messages