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

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



Andrii,

Thank you for your previous mail.

I am sorry for taking so long to answer.

The rest of the mail is inline

2019年1月22日(火) 18:00 Andrii Anisov <andrii.anisov@xxxxxxxxx>:


On 22.01.19 12:45, LOPEZ, FUENTES NACARINO Jairo Eduardo wrote:
> Yes. Since you pointed out that the U-boot version was not what you expected, I downgraded to Yocto 3.9. I am able to boot Linux 4.14 but Xen, of any version continues to give me absolutely no output.
Ok, let you try to start with earlyprintk. Follow next steps
  - Go to <your Yocto dir>/build/tmp/work/aarch64-poky-linux/xen/<your version>/git/
  - Run `make distclean`
  - Go to <your Yocto dir>/build/tmp/work/aarch64-poky-linux/xen/<your version>/temp/
  - Edit a file hidden behind a symbolic link `run.do_compile`: find `oe_runmake_call()` function, to the line `make -j8 STDVGA....` add `CONFIG_EARLY_PRINTK=rcar3`, correct `debug=y`.
  - Run `./run.do_configure`
  - Run ./run.do_compile
  - Go to <your Yocto dir>/build/tmp/work/aarch64-poky-linux/xen/<your version>/git/xen/
  - Run `mkimage -A arm64 -C none -T kernel -a 0x78080000 -e 0x78080000 -n "XEN" -d xen xen.uImage`
  - Boot your board with just created xen.uImage.


I was able to compile the Xen image with earlyprintk without issue. It is comforting to get some sort of feedback from the device, even if it is failing.
 
But I'm 99 percents sure you will see memory initialization error from XEN, so you should merge your memory nodes.

>     Do not forget following:
>
>      >      >          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.
>
>
> Is this merge also required for Renesas' Yocto 3.9?
Yes, we escalated the problem and the solution to Renesas, but 3.9 still needs memory nodes merging.
They should have unset `CONFIG_ARCH_FIXUP_FDT` in a u-boot config. But Yocto 3.9 still have `CONFIG_ARCH_FIXUP_FDT=y` configured for u-boot.


I was also able to make a compilable DTB file by merging the memory ranges. I used the following configuration:

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

 
>      > That my M3 is old sounds unfortunate.
>      > What limitation for Xen would I have to live with, with a lack of a IPMMU?
>     I'm not 100% sure, but as long as it works, there should not be other issues.
>     You just will not be able to passthrough peripherals to guest domains (that is what IPMMU is needed for).
>
>
> Ah, it is a shame that I won't be able to passthrough peripherals to guest domains. Fortunately at this point in time I only need to benchmark the CPUs so this should not affect me.
It must be ok from the technical point of view.

--
Sincerely,
Andrii Anisov.


When attempting to boot the Xen image created I did get print messages but I get the following:

[    0.000191] NOTICE:  BL2: R-Car Gen3 Initial Program Loader(CA57) Rev.1.0.21
[    0.005753] NOTICE:  BL2: PRR is R-Car M3 Ver.1.0                        
[    0.010422] NOTICE:  BL2: Board is Starter Kit Rev.1.0                   
[    0.015534] NOTICE:  BL2: Boot device is HyperFlash(80MHz)               
[    0.020960] NOTICE:  BL2: LCM state is CM                                
[    0.025002] NOTICE:  BL2: AVS setting succeeded. DVFS_SetVID=0x53
[    0.030989] NOTICE:  BL2: DDR3200(rev.0.33)NOTICE:  [COLD_BOOT]NOTICE:  ..0
[    0.086118] NOTICE:  BL2: DRAM Split is 2ch
[    0.090003] NOTICE:  BL2: QoS is default setting(rev.0.19)
[    0.095507] NOTICE:  BL2: Lossy Decomp areas
[    0.099680] NOTICE:       Entry 0: DCMPAREACRAx:0x80000540 DCMPAREACRBx:0x570
[    0.106765] NOTICE:       Entry 1: DCMPAREACRAx:0x40000000 DCMPAREACRBx:0x0
[    0.113677] NOTICE:       Entry 2: DCMPAREACRAx:0x20000000 DCMPAREACRBx:0x0
[    0.120591] NOTICE:  BL2: v1.4(release):15dba6b
[    0.125081] NOTICE:  BL2: Built : 11:34:26, Jan 21 2019
[    0.130269] NOTICE:  BL2: Normal boot
[    0.133914] NOTICE:  BL2: dst=0xe6320d00 src="" len=512(0x200)
[    0.140297] NOTICE:  BL2: dst=0x43f00000 src="" len=6144(0x1800)
[    0.146918] NOTICE:  BL2: dst=0x44000000 src="" len=65536(0x10000)
[    0.154148] NOTICE:  BL2: dst=0x44100000 src="" len=1048576(0x100000)
[    0.168971] NOTICE:  BL2: dst=0x50000000 src="" len=1048576(0x100000)

</ redacted u-boot image load information>

U-Boot 2015.04 (Jan 21 2019 - 20:33:02)

CPU: Renesas Electronics R8A7796 rev 1.0
Board: M3ULCB
I2C:   ready
DRAM:  1.9 GiB
Bank #0: 0x048000000 - 0x07fffffff, 896 MiB
Bank #1: 0x600000000 - 0x63fffffff, 1 GiB

MMC:   sh-sdhi: 0, sh-sdhi: 1
In:    serial
Out:   serial
Err:   serial
Net:   ravb
Hit any key to stop autoboot:  0

=> bootm 0x48080000 - 0x48000000
## Booting kernel from Legacy Image at 48080000 ...
   Image Name:   XEN
   Image Type:   AArch64 Linux Kernel Image (uncompressed)
   Data Size:    886096 Bytes = 865.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 ...

- UART enabled -
- CPU 00000000 booting -
- Current EL 00000004 -
- Xen must be entered in NS EL2 mode -
- Please update the bootloader -
- Boot failed -

I thought that using the U-boot image from Yocto 3.9 would automatically let me avoid the issue with boot loader entering the wrong mode.

As I mentioned before I am using the rocko branches from meta-virtualization and meta-selinux as 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"
TUNE_FEATURES        = "aarch64 cortexa57-cortexa53"
TARGET_FPU           = ""
SOC_FAMILY           = "rcar-gen3:r8a7796"
meta                
meta-poky           
meta-yocto-bsp       = "tmp:342fbd6a3e57021c8e28b124b3adb241936f3d9d"
meta-rcar-gen3       = "tmp:fd078b6ece537d986852cb827bd21e022a797b2f"
meta-optee           = "tmp:75dfb67bbb14a70cd47afda9726e2e1c76731885"
meta-oe             
meta-python         
meta-networking      = "tmp:dacfa2b1920e285531bec55cd2f08743390aaf57"
meta-selinux         = "rocko:d855c624f32c5e599bf27e06cb8f5b25b3aae12d"
meta-virtualization  = "rocko:b704c689b67639214b9568a3d62e82df27e9434f"
meta-rcar-gen3-xen   = "lastest_xen:cc6e6e1c07197207769331b0532fc88a9165a855"

I have no idea if that affects the u-boot creation, but I thought I might as well mention that.

Once again thank you for all the help. If there is any other information I can give you, please let me know.

Best regards,

Jairo
_______________________________________________
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®.