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: 
Observer jorge_2015
Observer
803 Views
Registered: ‎12-06-2017

CMA reserved addresses when creating a new SDSoC platform

Jump to solution

Hi,

 

I have created a SDSoC platform for Trenz TE0803 StarterKit but when I tried to execute the SDx application inside my board this gets stuck. This is what I see:

 

 

root@te0803-3eg-tebf0808-zynqmp:/mnt# ./Matrix.elf 
[   31.166537] xlnk_eng_probe ...
[   31.169533] uio name xilinx-xlnk-eng.0
[   31.173273] xilinx-xlnk-eng xilinx-xlnk-eng.0: physical base : 0xa0000000
[   31.180019] xilinx-xlnk-eng xilinx-xlnk-eng.0: register range : 0x10000
[   31.186617] xilinx-xlnk-eng xilinx-xlnk-eng.0: base remapped to: 0xffffff800a4a0000
[   31.194390] xilinx-xlnk-eng xilinx-xlnk-eng.0: xilinx-xlnk-eng uio registered

Briefly below I am going to explain which steps I have followed until having this error:

 

 

First I have created the platform in Vivado. This is how it looks like:

 

3816513948-SDSoC_BD.png

 

Second I have defined the platform properties

 

 

set_property PFM_NAME "xilinx.com:sdx:SK0803_zusys_SDSoC:1.0" [get_files ./SK0803_zusys_SDSoC.srcs/sources_1/bd/zusys/zusys.bd]


set_property PFM.CLOCK { \
 clk_out1 {id "0" is_default "true" proc_sys_reset \
"proc_sys_reset_2" } \
clk_out2 {id "1" is_default "false" proc_sys_reset \
"proc_sys_reset_2" } \
 clk_out3 {id "2" is_default "false" proc_sys_reset \
"proc_sys_reset_2" } \
clk_out4 {id "3" is_default "false" proc_sys_reset \
"proc_sys_reset_2" } \
 } [get_bd_cells /clk_wiz_0]

set_property PFM.AXI_PORT { \
 M_AXI_HPM0_FPD {memport "M_AXI_GP"} \
 M_AXI_HPM1_FPD {memport "M_AXI_GP"} \
 M_AXI_HPM0_LPD {memport "M_AXI_GP"} \
 S_AXI_HPC0_FPD {memport "S_AXI_HPC" sptag "HPC0"} \
 S_AXI_HPC1_FPD {memport "S_AXI_HPC" sptag "HPC1"} \
 S_AXI_HP0_FPD {memport "S_AXI_HP" sptag "HP0"} \
 S_AXI_HP1_FPD {memport "S_AXI_HP" sptag "HP1"} \
 S_AXI_HP2_FPD {memport "S_AXI_HP" sptag "HP2"} \
 S_AXI_HP3_FPD {memport "S_AXI_HP" sptag "HP3"} \
} [get_bd_cells /zynq_ultra_ps_e_0]
set intVar []
for {set i 1} {$i < 8} {incr i} {
 lappend intVar In$i {}
}

set_property PFM.IRQ $intVar [get_bd_cells /xlconcat_0]

 

Generate the Device Support Archive

 

 

set_property dsa.name SK0803_zusys_SDSoC [current_project]

write_dsa -file SK0803_zusys_SDSoC.dsa -include_bit
validate_dsa SK0803_zusys_SDSoC.dsa -verbose

 

Software Platform Data Creation with Petalinux.

 

1.- Create Proyect

2.- Configure Kernel

 

Set CMA size to be larger, for SDS-alloc buffers:

  • for Zynq MPSoC: Device Drivers→ Generic Driver Options → Size in Mega Bytes(1024)
  • for Zynq-7000: Device Drivers→ Generic Driver Options → Size in Mega Bytes(256) Enable staging drivers:
  • Device Drivers → Staging drivers (ON) Enable APF management driver:
  • Device Drivers → Staging drivers → Xilinx APF Accelerator driver (ON) Enable APF DMA driver:
  • Device Drivers → Staging drivers → Xilinx APF Accelerator driver → Xilinx APF DMA engines support (ON)

Note: For Zynq MPSoC, you must turn off CPU idle and frequency scaling. To do so, mark the following orঞonsĹ CPU Power Management->CPU idle->CPU idle PM support (OFF) CPU Power Management->CPU Frequency scaling->CPU Frequency scaling (OFF)

 

3.- Configure rootfs

 

Add stdc++ libs: * Filesystem Packages → misc → gcc-runtime → libstdc++ (ON)

 

4.- Change device-tree

 

/{
 xlnk {
 compatible = "xlnx,xlnk-1.0";
 };
};

5.- Build petalinux image

 

To Create an SDSoC Platform Project, I have launched SDx and 

 

1.- Create new SDx Project -> Platform Project.

2.- Import Device Support Archiv (DSA) file.

3.- Define the Software Platform defining system configuration and processor domain.

4.- Finally Generate Platform and Add to Repository

 

 

When the Platform is finished I have created a new Project  with the Direct connect sample.

 

The trick comes here:

 

If I use the BOOT.bin generated by SDx that has the accelerated bitstream and petalinux provided image.ub (Image, rootfs and device-tree) everything is working perfectly and I see this in the console.

 

root@sdsoc:/mnt# ./Matrix.elf 
[   37.639151] xlnk_eng_probe ...
[   37.644393] uio name xilinx-xlnk-eng.0
[   37.650311] xilinx-xlnk-eng xilinx-xlnk-eng.0: physical base : 0xa0000000
[   37.659289] xilinx-xlnk-eng xilinx-xlnk-eng.0: register range : 0x10000
[   37.668101] xilinx-xlnk-eng xilinx-xlnk-eng.0: base remapped to: 0xffffff800a450000
[   37.678090] xilinx-xlnk-eng xilinx-xlnk-eng.0: xilinx-xlnk-eng uio registered
Number of CPU cycles running application in hardware: 3009590
TEST[   37.707350] xilinx-xlnk-eng xilinx-xlnk-eng.0: xilinx-xlnk-eng uio unregistered
 PASSED.

but if I tried to separate this image.ub in different parts (Image, rootfs and device-tree) and create a persistent rootfs inside my SDCard inside a new partition I get stuck in the above message

 

root@te0803-3eg-tebf0808-zynqmp:/mnt# ./Matrix.elf 
[   31.166537] xlnk_eng_probe ...
[   31.169533] uio name xilinx-xlnk-eng.0
[   31.173273] xilinx-xlnk-eng xilinx-xlnk-eng.0: physical base : 0xa0000000
[   31.180019] xilinx-xlnk-eng xilinx-xlnk-eng.0: register range : 0x10000
[   31.186617] xilinx-xlnk-eng xilinx-xlnk-eng.0: base remapped to: 0xffffff800a4a0000
[   31.194390] xilinx-xlnk-eng xilinx-xlnk-eng.0: xilinx-xlnk-eng uio registered

At first I thought that I was getting stuck because fpga was not well programmed but if image.ub works okey I do not think this is problem.

 

To boot with persistent rootfs I have created the nex uEnv.txt file

 

kernel_image=Image
devicetree_image=te0803-3eg-tebf0808-zynqmp.dtb
dtb=system.dtb
bootargs=console=ttyPS0,115200 root=/dev/mmcblk1p2 rw rootwait earlyprintk
uenvcmd=echo Copying Linux from SD to RAM... && load mmc $sdbootdev:$partid $fdt_addr ${devicetree_image} && load mmc $sdbootdev:$partid $kernel_addr ${kernel_image} && booti $kernel_addr - $fdt_addr

where kernel_addr=0x80000 and fdt_addr=4000000 and it can be boot with 

 

setenv sdbootdev 1
run uenvboot

In the other hand when I boot with image.ub I am using

 

mmcinfo && fatload mmc 1 ${netstart} ${kernel_img};bootm ${netstart}
setenv netstart 0x10000000
setenv kernel_img image.ub

So can this error be due to how I store kernel, rootfs and device-tree files inside the memory?

 

From kernel logs I see that when I boot with image.ub.

 

cma: Reserved 1024 MiB at 0x000000003bc00000

and from persistent

 

[    0.000000] cma: Reserved 1024 MiB at 0x0000000040000000

So cma reserves memory in different locations....

 

Someone know how to solve this to have persistent rootfs?

 

Thank you very much,

 

Jorge

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Observer jorge_2015
Observer
1,031 Views
Registered: ‎12-06-2017

Re: CMA reserved addresses when creating a new SDSoC platform

Jump to solution

I have solved the issue changing this line in the uEnv.txt

 

bootargs=console=ttyPS0,115200 root=/dev/mmcblk1p2 rw rootwait earlyprintk

with this new one:

 

bootargs= earlycon clk_ignore_unused root=/dev/mmcblk1p2 

Thanks!

 

Jorge

0 Kudos
1 Reply
Highlighted
Observer jorge_2015
Observer
1,032 Views
Registered: ‎12-06-2017

Re: CMA reserved addresses when creating a new SDSoC platform

Jump to solution

I have solved the issue changing this line in the uEnv.txt

 

bootargs=console=ttyPS0,115200 root=/dev/mmcblk1p2 rw rootwait earlyprintk

with this new one:

 

bootargs= earlycon clk_ignore_unused root=/dev/mmcblk1p2 

Thanks!

 

Jorge

0 Kudos