UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Participant cb_cross
Participant
648 Views
Registered: ‎08-10-2018

new ZCU104 project fails to create /sys/class/remoteproc/remoteproc0 device

I have the 2018.2 version of all Xilinx tools.

The out-of-the-box ZCU104 HDF provided by Xilinx works for OpenAMP.

I created a new Vivado project using the ZCU104 Eval board as the project part, where the ZU+ MPSoC is the only block component (Incidentally, this is exactly the same as the Xilinx HDF for the ZCU102 Eval board.).  This HDF works great for creating a PetaLinux project which can boot and run on the Eval board, including full ethernet connectivity.

 

Following the same procedure which created working OpenAMP projects using the out-of-the-box ZCU104 HDF, I replicated the same steps with my new MPSoC only design.  Here's my project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi file:

/include/ "system-conf.dtsi"
/ {
  reserved-memory {
    #address-cells = <2>;
    #size-cells = <2>;
    ranges; 
    rproc_0_reserved: rproc@3ed000000 {
      no-map; 
      reg = <0x0 0x3ed00000 0x0 0x2000000>;
    };
  };
  power-domains {
    pd_r5_0: pd_r5_0 {
      #power-domain-cells = <0x0>;
      pd-id = <0x7>;
    };
    pd_tcm_0_a: pd_tcm_0_a {
      #power-domain-cells = <0x0>;
      pd-id = <0xf>;
    };
    pd_tcm_0_b: pd_tcm_0_b {
      #power-domain-cells = <0x0>;
      pd-id = <0x10>; 
    };
  };

  amba {  
    r5_0_tcm_a: tcm@ffe00000 {
      compatible = "mmio-sram";
      reg = <0x0 0xFFE00000 0x0 0x10000>;
      pd-handle = <&pd_tcm_0_a>;
    };
    r5_0_tcm_b: tcm@ffe20000 {
      compatible = "mmio-sram";
      reg = <0x0 0xFFE20000 0x0 0x10000>;
      pd-handle = <&pd_tcm_0_b>;
    };

    elf_ddr_0: ddr@3ed00000 {
      compatible = "mmio-sram";
      reg = <0x0 0x3ed00000 0x0 0x40000>;
    };

    test_r50: zynqmp_r5_rproc@0 {
      compatible = "xlnx,zynqmp-r5-remoteproc-1.0";
      reg = <0x0 0xff9a0100 0x0 0x100>, <0x0 0xff340000 0x0 0x100>, <0x0 0xff9a0000 0x0 0x100>; 
      reg-names = "rpu_base", "ipi", "rpu_glbl_base";
      dma-ranges;
      core_conf = "split0";
      srams = <&r5_0_tcm_a &r5_0_tcm_b &elf_ddr_0>;
      pd-handle = <&pd_r5_0>;
      interrupt-parent = <&gic>; 
      interrupts = <0 29 4>;
    } ;
    /* Shared memory */
    shm0: shm@0 { 
      compatible = "shm_uio";
      reg = <0x0 0x3ed80000 0x0 0x1000000>;
    };
    /* IPI device */
    ipi_amp: ipi@ff340000 {
      compatible = "ipi_uio";
      reg = <0x0 0xff340000 0x0 0x1000>;
      interrupt-parent = <&gic>; 
      interrupts = <0 29 4>;
    };
  };
};&ttc0 {
  compatible = "ttc0";
  status = "okay";
};

 

I compared `petalinux-config -c rootfs` between the 2 projects.  They have the same libs and misc config.

 

I even did a recursive diff of the build/conf directories:

diff -uwr build/conf/bblayers.conf ../soc2_plx/build/conf/bblayers.conf
--- build/conf/bblayers.conf  2018-10-08 08:03:18.819469135 -0500
+++ ../soc2_plx/build/conf/bblayers.conf  2018-10-08 08:21:10.952200176 -0500
@@ -29,6 +29,6 @@
   ${SDKBASEMETAPATH}/layers/meta-virtualization \
   ${SDKBASEMETAPATH}/layers/meta-openamp \
   ${SDKBASEMETAPATH}/workspace \
-  /opt/projects/xilinx/xilinx-zcu104-2018.2/project-spec/meta-plnx-generated \
-  /opt/projects/xilinx/xilinx-zcu104-2018.2/project-spec/meta-user \
+  /opt/projects/xilinx/soc2_plx/project-spec/meta-plnx-generated \
+  /opt/projects/xilinx/soc2_plx/project-spec/meta-user \
   "
diff -uwr build/conf/plnxtool.conf ../soc2_plx/build/conf/plnxtool.conf
--- build/conf/plnxtool.conf  2018-10-08 08:03:19.023473089 -0500
+++ ../soc2_plx/build/conf/plnxtool.conf  2018-10-08 08:18:40.517294981 -0500
@@ -24,15 +24,15 @@
 
 
 
-MACHINE = "zcu104-zynqmp"
+MACHINE = "plnx-zynqmp"
 PACKAGE_CLASSES = "package_rpm"
 DL_DIR = "${TOPDIR}/downloads"
 SSTATE_DIR = "${TOPDIR}/sstate-cache"
 XILINX_SDK_TOOLCHAIN = "/opt/pkg/petalinux/tools/hsm"
 IMAGE_LINGUAS = " "
-TMPDIR = "/opt/projects/xilinx/xilinx-zcu104-2018.2/build/tmp"
-hostname_pn-base-files = "xilinx-zcu104-2018_2"
-PETALINUX_PRODUCT_pn-base-files = "xilinx-zcu104-2018.2"
+TMPDIR = "/opt/projects/xilinx/soc2_plx/build/tmp"
+hostname_pn-base-files = "soc2_plx"
+PETALINUX_PRODUCT_pn-base-files = "soc2_plx"
 PETALINUX_VERSION_pn-base-files = "1.00"
 
 
@@ -46,7 +46,7 @@
 # Add system HDF/DSA 
 HDF_EXT = "hdf" 
 HDF_BASE = "file://"
-HDF_PATH = "/opt/projects/xilinx/xilinx-zcu104-2018.2/project-spec/hw-description/system.hdf"
+HDF_PATH = "/opt/projects/xilinx/soc2_plx/project-spec/hw-description/system.hdf"
 
 
 #Add FIT Variables
@@ -64,8 +64,4 @@
 INITRAMFS_MAXSIZE = "524288"
 
 SERIAL_CONSOLE_forcevariable = "115200 ttyPS0" 
-
-MACHINE_HWCODECS = "libomxil-xlnx"
-IMAGE_FEATURES += "hwcodecs"
-
-SOC_VARIANT = "ev"
+SOC_VARIANT = "eg"
diff -uwr build/conf/sanity_info ../soc2_plx/build/conf/sanity_info
--- build/conf/sanity_info  2018-10-08 06:50:58.107343933 -0500
+++ ../soc2_plx/build/conf/sanity_info  2018-10-08 08:21:11.852217556 -0500
@@ -1,4 +1,4 @@ 
 SANITY_VERSION 1
-TMPDIR /opt/projects/xilinx/xilinx-zcu104-2018.2/build/tmp
-SSTATE_DIR /opt/projects/xilinx/xilinx-zcu104-2018.2/build/sstate-cache
+TMPDIR /opt/projects/xilinx/soc2_plx/build/tmp
+SSTATE_DIR /opt/projects/xilinx/soc2_plx/build/sstate-cache
 NATIVELSBSTRING ubuntu-16.04

I am not understanding why the remoteproc0 device is not being generated in the MPSoC only project.

0 Kudos
4 Replies
Moderator
Moderator
631 Views
Registered: ‎05-10-2017

Re: new ZCU104 project fails to create /sys/class/remoteproc/remoteproc0 device

Are you trying to do this with RPMsg in Userspace or RPMsg in Kernel space?

 

If you have the shared memory and IPI nodes, it means you are in userspace. In that case your remoteproc node should like the one below

 

test_r5_0: zynqmp_r5_rproc@0 {
 compatible = "xlnx,zynqmp-r5-remoteproc-1.0";
 reg = <0x0 0xff9a0100 0x0 0x100>,
 <0x0 0xff9a0000 0x0 0x100>;
 reg-names = "rpu_base", "rpu_glbl_base";
 dma-ranges;
 core_conf = "split0";
 srams = <&r5_0_tcm_a &r5_0_tcm_b &elf_ddr_0>;
 pd-handle = <&pd_r5_0>;
 };
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Participant cb_cross
Participant
625 Views
Registered: ‎08-10-2018

Re: new ZCU104 project fails to create /sys/class/remoteproc/remoteproc0 device

No, the test_r5_0 definition needs to be the way I have it.  When I write the device tree the way you suggested, then /dev/rpmsg0 does not get created.

 

I suppose I should clarify that I'm still using the matrix multiply demo, but not the pre-build binary, a binary I built.

 

I'm slightly embarrassed by my first post.  I had my projects mixed up.

When I actually do what I said in my first post, it works.  (just the SoC where the ZCU104 board is the project part)

 

The non-creation of remoteproc0 happens in a project based upon my modification of the board.xml file for the ZCU104.  (just the SoC where my custom board is the project part)

 

I'll update when I have more info.

0 Kudos
Moderator
Moderator
619 Views
Registered: ‎05-10-2017

Re: new ZCU104 project fails to create /sys/class/remoteproc/remoteproc0 device

Did you update the resource table?

Which section of the document are you following?

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Participant cb_cross
Participant
612 Views
Registered: ‎08-10-2018

Re: new ZCU104 project fails to create /sys/class/remoteproc/remoteproc0 device

This issue was mostly on me...

 

I put the I2C definition back into my custom board.xml file, regenerated the HDF, re-created the PetaLinux project, and now it works.

 

We're confused as to why I2C matters, since we're not using it at all...

 

I2C was necessary to include in the Re-customization screen in Vivado in order to get all the proper include files to get a bare-metal HelloWorld program to compile for the A53, in the SDK.

Now, I2C is necessary in the board.xml file in order to allow the remoteproc0 device to be created in PetaLinux.

 

Anyway, thanks for being a sounding board.  Sometimes talking out an issue is all that's necessary to solve it.

0 Kudos