[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] RT Xen on ARM - R-Car series



Jairo,

On 11.01.19 22:12, LOPEZ, FUENTES NACARINO Jairo Eduardo wrote:
I followed your initial advice and updated my environment to a newer version, 
opting to stick to the rocko version for the m3ulcb.

I'm a bit confused are you using Renesas Yocto 3.9 or the latest 3.13?


The Yocto build configuration is shown below:

Build Configuration:
BB_VERSION           = "1.36.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal-4.9"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "m3ulcb"
DISTRO               = "poky"
DISTRO_VERSION       = "2.4.2"

Looks like 3.9, but why do you have u-boot 2018.09 below?

TUNE_FEATURES        = "aarch64 cortexa57-cortexa53"
TARGET_FPU           = ""
SOC_FAMILY           = "rcar-gen3:r8a7796"
meta
meta-poky
meta-yocto-bsp       = "HEAD:342fbd6a3e57021c8e28b124b3adb241936f3d9d"
meta-rcar-gen3       = "rocko:8af0b7d6e445b532088a068dc012757001be3a1f"
meta-optee           = "rocko:75dfb67bbb14a70cd47afda9726e2e1c76731885"
meta-oe
meta-python
meta-networking      = "rocko:eae996301d9c097bcbeb8046f08041dc82bb62f8"
meta-selinux         = "rocko:d855c624f32c5e599bf27e06cb8f5b25b3aae12d"
meta-virtualization  = "rocko:b704c689b67639214b9568a3d62e82df27e9434f"
meta-rcar-gen3-xen   = "master:60699c631d541aeeaebaeec9a087efed9385ee42"

I had to modify the dtb to the version shown below:

// SPDX-License-Identifier: GPL-2.0
/*
  * Device Tree Source for the M3ULCB (R-Car Starter Kit Pro) board
  *
  * Copyright (C) 2016-2018 Renesas Electronics Corp.
  * Copyright (C) 2016 Cogent Embedded, Inc.
  */

/dts-v1/;
#include "r8a7796.dtsi"
#include "ulcb.dtsi"

/ {
         model = "Renesas M3ULCB board based on r8a7796";
         compatible = "renesas,m3ulcb", "renesas,r8a7796";

         cpus {
                 idle-states {
                         /delete-node/ cpu-sleep-1;
                 };
         };

         memory@48000000 {
                 device_type = "memory";
                 /* first 128MB is reserved for secure area. */
                 reg = <0x0 0x48000000 0x0 0x38000000>;
         };

         memory@600000000 {
                 device_type = "memory";
                 reg = <0x6 0x00000000 0x0 0x40000000>;
         };
Merge memory nodes to be sure u-boot do not duplicate memory ranges.


         reserved-memory {
                 #address-cells = <2>;
                 #size-cells = <2>;
                 ranges;

                 /* device specific region for Lossy Decompression */
                 lossy_decompress: linux,lossy_decompress@54000000 {
                         no-map;
                         reg = <0x00000000 0x54000000 0x0 0x03000000>;
                 };

                 /* global autoconfigured region for contiguous allocations */
                 linux,cma@57000000 {
                         compatible = "shared-dma-pool";
                         reusable;
                         reg = <0x00000000 0x57000000 0x0 0x19000000>;
                         linux,cma-default;
                 };

                 /* device specific region for contiguous allocations */
                 mmp_reserved: linux,multimedia@70000000 {
                         compatible = "shared-dma-pool";
                         reusable;
                         reg = <0x00000000 0x70000000 0x0 0x10000000>;
                 };
         };

         chosen {
                 stdout-path = "serial0:115200n8";
                 xen,xen-bootargs = "dom0_mem=752M console=dtuart dtuart=serial0 
dom0_max_vcpus=4";
                 xen,dom0-bootargs = "console=hvc0 clk_ignore_unused 
root=/dev/mmcblk1p2 rw rootwait ignore_loglevel cma=128M";

                 #address-cells = <2>;
                 #size-cells = <2>;
                 modules {
                         module@0 {
                                 compatible = "xen,linux-zimage", 
"xen,multiboot-module";
                                 reg = <0x0 0x7a000000 0x0 0x02000000>;
                         };
                 };
         };

         mmngr {
                 compatible = "renesas,mmngr";
                 memory-region = <&mmp_reserved>, <&lossy_decompress>;
         };

         mmngrbuf {
                 compatible = "renesas,mmngrbuf";
         };

         vspm_if {
                 compatible = "renesas,vspm_if";
         };

         versaclock5_out3: versaclk-3 {
                 compatible = "fixed-clock";
                 #clock-cells = <0>;
                 /* Initial value of versaclock out3 */
                 clock-frequency = <33000000>;
         };
};

&a53_0 {
         /delete-property/ cpu-idle-states;
};

&a53_1 {
         /delete-property/ cpu-idle-states;
};

&a53_2 {
         /delete-property/ cpu-idle-states;
};

&a53_3 {
         /delete-property/ cpu-idle-states;
};

&du {
         clocks = <&cpg CPG_MOD 724>,
                  <&cpg CPG_MOD 723>,
                  <&cpg CPG_MOD 722>,
                  <&versaclock5 1>,
                  <&versaclock5_out3>,
                  <&versaclock5 2>;
         clock-names = "du.0", "du.1", "du.2",
                       "dclkin.0", "dclkin.1", "dclkin.2";
};

&vspb {
         status = "okay";
};

&vspi0 {
         status = "okay";
};


With the new information, I finally got some output for Xen, but was met with a 
completely different issue for which I can't find any information for the error 
I am receiving.

I realize that I may have an issue with the version of the board I am using, 
but a simple online search doesn't throw any red flags. The serial console 
output is below:

[    0.000177] NOTICE:  BL2: R-Car M3 Initial Program Loader(CA57)
[    0.004613] NOTICE:  BL2: Initial Program Loader(Rev.2.0.0)
[    0.010147] NOTICE:  BL2: PRR is R-Car M3 Ver.1.0

Your M3 revision is really old. We did not use something older than M3 1.1. But 
for the start it might be OK. You would not have IPMMU functional, though you 
do not need it now.

[    0.014815] NOTICE:  BL2: Board is Starter Kit Rev.1.0
[    0.019928] NOTICE:  BL2: Boot device is HyperFlash(80MHz)
[    0.025354] NOTICE:  BL2: LCM state is CM
[    0.029395] NOTICE:  BL2: AVS setting succeeded. DVFS_SetVID=0x53
[    0.035383] NOTICE:  BL2: DDR3200(rev.0.34)
[    0.046779] NOTICE:  BL2: [COLD_BOOT]
[    0.085117] NOTICE:  BL2: DRAM Split is 2ch
[    0.087812] NOTICE:  BL2: QoS is default setting(rev.0.19)
[    0.093315] NOTICE:  BL2: Lossy Decomp areas
[    0.097489] NOTICE:       Entry 0: DCMPAREACRAx:0x80000540 DCMPAREACRBx:0x570
[    0.104573] NOTICE:       Entry 1: DCMPAREACRAx:0x40000000 DCMPAREACRBx:0x0
[    0.111485] NOTICE:       Entry 2: DCMPAREACRAx:0x20000000 DCMPAREACRBx:0x0
[    0.118400] NOTICE:  BL2: v1.5(release):556a11e
[    0.122890] NOTICE:  BL2: Built : 18:03:48, Jan 11 2019
[    0.128077] NOTICE:  BL2: Normal boot
[    0.131718] NOTICE:  BL2: dst=0xe6321100 src=0x8180000 len=512(0x200)
[    0.138106] NOTICE:  BL2: dst=0x43f00000 src=0x8180400 len=6144(0x1800)
[    0.144726] NOTICE:  BL2: dst=0x44000000 src=0x81c0000 len=65536(0x10000)
[    0.151952] NOTICE:  BL2: dst=0x44100000 src=0x8200000 len=1048576(0x100000)
[    0.166777] NOTICE:  BL2: dst=0x50000000 src=0x8640000 len=1048576(0x100000)
[    0.180752] NOTICE:  BL2: Booting BL31


U-Boot 2018.09 (Jan 12 2019 - 03:03:43 +0900)
It is a u-boot from Renesas Yocto 3.13. I would not recommend you using it.
Seeing the problem below, it looks like u-boot messes with the device tree in a 
different way now.


CPU: Renesas Electronics R8A7796 rev 1.0
Model: Renesas M3ULCB board based on r8a7796
DRAM:  1.9 GiB
Bank #0: 0x048000000 - 0x07fffffff, 896 MiB
Bank #1: 0x600000000 - 0x63fffffff, 1 GiB

MMC:   sd@ee100000: 0, sd@ee140000: 1
Loading Environment from MMC... communication out of sync
communication out of sync
communication out of sync
communication out of sync
communication out of sync
communication out of sync
communication out of sync
communication out of sync
communication out of sync
communication out of sync
communication out of sync
communication out of sync
OK
In:    serial@e6e88000
Out:   serial@e6e88000
Err:   serial@e6e88000
Net:   eth0: ethernet@e6800000
Hit any key to stop autoboot:  0
ethernet@e6800000 Waiting for PHY auto negotiation to complete... done
Using ethernet@e6800000 device
TFTP from server 192.168.1.100; our IP address is 192.168.1.3
Filename 'Image'.
Load address: 0x48080000
Loading: #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          ############################################
          2.7 MiB/s
done
Bytes transferred = 15911424 (f2ca00 hex)
Using ethernet@e6800000 device
TFTP from server 192.168.1.100; our IP address is 192.168.1.3
Filename 'Image-r8a7796-m3ulcb.dtb'.
Load address: 0x48000000
Loading: *
TFTP error: 'File not found' (1)
Not retrying...
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
=> setenv bootargs
=> tftp 0x48080000 xen-m3ulcb.uImage
Using ethernet@e6800000 device
TFTP from server 192.168.1.100; our IP address is 192.168.1.3
Filename 'xen-m3ulcb.uImage'.
Load address: 0x48080000
Loading: ###############################################################
          28.3 MiB/s
done
Bytes transferred = 918928 (e0590 hex)
=> tftp 0x48000000 Image-r8a7796-m3ulcb-xen-local.dtb
Using ethernet@e6800000 device
TFTP from server 192.168.1.100; our IP address is 192.168.1.3
Filename 'Image-r8a7796-m3ulcb-xen-local.dtb'.
Load address: 0x48000000
Loading: #####
          21.8 MiB/s
done
Bytes transferred = 68545 (10bc1 hex)
=> tftp 0x7a000000 Image-m3ulcb.bin
Using ethernet@e6800000 device
TFTP from server 192.168.1.100; our IP address is 192.168.1.3
Filename 'Image-m3ulcb.bin'.
Load address: 0x7a000000
Loading: #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          ################################################################
          28.1 MiB/s
done
Bytes transferred = 19059200 (122d200 hex)
=> bootm 0x48080000 - 0x48000000
## Booting kernel from Legacy Image at 48080000 ...
    Image Name:   XEN
    Image Type:   AArch64 Linux Kernel Image (uncompressed)
    Data Size:    918864 Bytes = 897.3 KiB
    Load Address: 78080000
    Entry Point:  78080000
    Verifying Checksum ... OK
## Flattened Device Tree blob at 48000000
    Booting using the fdt blob at 0x48000000
    Loading Kernel Image ... OK
    Using Device Tree in place at 0000000048000000, end 0000000048013bc0

Starting kernel ...

  Xen 4.12-unstable
(XEN) Xen version 4.12-unstable (jelfn@xxxxxxxxx <mailto:jelfn@xxxxxxxxx>) 
(aarch64-poky-linux-gc9
(XEN) Latest ChangeSet: Mon Dec 17 09:22:59 2018 +0000 git:a5b0eb3-dirty
(XEN) Processor: 411fd073: "ARM Limited", variant: 0x1, part 0xd07, rev 0x3
(XEN) 64-bit Execution:
(XEN)   Processor Features: 0000000000002222 0000000000000000
(XEN)     Exception Levels: EL3:64+32 EL2:64+32 EL1:64+32 EL0:64+32
(XEN)     Extensions: FloatingPoint AdvancedSIMD
(XEN)   Debug Features: 0000000010305106 0000000000000000
(XEN)   Auxiliary Features: 0000000000000000 0000000000000000
(XEN)   Memory Model Features: 0000000000001124 0000000000000000
(XEN)   ISA Features:  0000000000011120 0000000000000000
(XEN) 32-bit Execution:
(XEN)   Processor Features: 00000131:00011011
(XEN)     Instruction Sets: AArch32 A32 Thumb Thumb-2 Jazelle
(XEN)     Extensions: GenericTimer Security
(XEN)   Debug Features: 03010066
(XEN)   Auxiliary Features: 00000000
(XEN)   Memory Model Features: 10201105 40000000 01260000 02102211
(XEN)  ISA Features: 02101110 13112111 21232042 01112131 00011142 00011121
(XEN) Using SMC Calling Convention v1.1
(XEN) Using PSCI v1.1
(XEN) SMP: Allowing 6 CPUs
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Timer: Unable to retrieve IRQ 0 from the device tree

XEN failed to find timer node in the device tree. r8a7796.dtsi has timer node 
described, so it must be u-boot changed dtb.
We have scheduled switching to Renesas Yocto 3.13 soon, so will coupe with the 
issue.
But for now I would recommend you using 3.9 at most.

--
Sincerely,
Andrii Anisov.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.