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: 
Scholar wzab
Scholar
2,705 Views
Registered: ‎08-24-2011

ZCU102: System starts, when FPGA loaded from JTAG, but hangs when FGPA loaded from U-Boot

Hi,

 

I need to create a system, where the decision which FPGA bitstream and which Linux image should be uploaded must be taken in U-Boot.

I have created the ".bin" image of the FPGA bitstream, using the bootgen as described in http://www.wiki.xilinx.com/FPGA+Manager+ZCU102 .

 

As I'm working with my board remotely, I have to use JTAG to load images. I have tested two scenarios:

 

1. Loading with FPGA configured via U-Boot

I load the U-Boot with:

$ petalinux-boot --jtag --uboot

 

The FSBL, PMU firmware and finally U-Boot are loaded. Then in the U-Boot I do:

 

ZynqMP> tftpboot ${netstart} 192.168.95.50:r1_system.bin

ZynqMP> fpga load 0 ${netstart} 26510780

ZynqMP> tftpboot ${netstart} 192.168.95.50:r1_image.ub

ZynqMP> bootm ${netstart}

 

After that the kernel starts to boot and finally hangs:

[...]
[    0.000000] NR_IRQS:64 nr_irqs:64 0                                          
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000          
[    0.000000] GIC: Using split EOI/Deactivate mode                             
[    0.000000] Architected cp15 timer(s) running at 33.00MHz (phys).            
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycless
[    0.000003] sched_clock: 56 bits at 33MHz, resolution 30ns, wraps every 2199s
[    0.008330] Console: colour dummy device 80x25                               
[    0.012643] Calibrating delay loop (skipped), value calculated using timer f)
[    0.023023] pid_max: default: 32768 minimum: 301                             
[    0.027758] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)     
[    0.034389] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes)
[    0.042145] ASID allocator initialised with 65536 entries 
NOTHING MORE IS DISPLAYED - SYSTEM HANGS

2. Loading with FPGA configured via JTAG

I configure FPGA and load U-Boot via:

$ petalinux-boot --jtag --fpga --bitstream images/linux/design_1_wrapper.bit --uboot

 

The FSBL, PMU firmware and finally U-Boot are loaded. Then in the U-Boot I do:

 

ZynqMP> tftpboot ${netstart} 192.168.95.50:r1_image.ub

ZynqMP> bootm ${netstart}

 

After that the kernel starts to boot and and finally I get the login prompt. The system is working correctly.

The part of the booting process, where booting previously failed looks like below:

[...]
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=4     
[    0.000000] NR_IRQS:64 nr_irqs:64 0                                          
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000          
[    0.000000] GIC: Using split EOI/Deactivate mode                             
[    0.000000] Architected cp15 timer(s) running at 33.00MHz (phys).            
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycless
[    0.000003] sched_clock: 56 bits at 33MHz, resolution 30ns, wraps every 2199s
[    0.008332] Console: colour dummy device 80x25                               
[    0.012642] Calibrating delay loop (skipped), value calculated using timer f)
[    0.023023] pid_max: default: 32768 minimum: 301                             
[    0.027757] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)     
[    0.034389] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes)
[    0.042142] ASID allocator initialised with 65536 entries                    
PMUFW: PmGetApiVersion: version 0.2                                             
[    0.048096] zynqmp_plat_init Power management API v0.2                       
[    0.056227] EFI services will not be available.                              
PMUFW: PmRequestWakeup: (NODE_APU_1, REQUEST_ACK_BLOCKING)                      
PMUFW: PmProcTrSleepToActive: SLEEP->ACTIVE NODE_APU_1                          
PMUFW: PmRequestWakeup: (NODE_APU_2, REQUEST_ACK_BLOCKING)                      
[...]

So it looks, that an attempt to communicate with the PMU firmware hangs the kernel, when FPGA is configured from the U-Boot.

What can be the reason of that unexpected behavior?

 

TIA & Regards,

Wojtek

0 Kudos
3 Replies
Scholar wzab
Scholar
2,697 Views
Registered: ‎08-24-2011

Re: ZCU102: System starts, when FPGA loaded from JTAG, but hangs when FGPA loaded from U-Boot

I attach the project, that I used for my test.

I had to add some trivial logic to the AXI interface. Otherwise the system didn't boot even with FPGA configured via FSBL. However, in that case the booting stopped later:

 

Booting the system with nothing connected to AXI:

[    1.321224] xor: measuring software checksum speed                           
[    1.365889]    8regs     :  2156.000 MB/sec                                  
[    1.409925]    8regs_prefetch:  1915.000 MB/sec                              
[    1.454307]    32regs    :  2389.000 MB/sec                                  
[    1.498341]    32regs_prefetch:  2156.000 MB/sec                             
[    1.502783] xor: using function: 32regs (2389.000 MB/sec)                    
[    1.508731] NET: Registered protocol family 16                               
[    1.541046] cpuidle: using governor menu                                     
[    1.544829] vdso: 2 pages (1 code @ ffffff8008876000, 1 data @ ffffff8009394)
[    1.552173] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.    
[    1.559412] DMA: preallocated 256 KiB pool for atomic allocations            
[    1.566280] ARM CCI_400_r1 PMU driver probed                                 
[    1.602493] HugeTLB registered 2 MB page size, pre-allocated 0 pages         
[    1.676333] raid6: int64x1  gen()   403 MB/s                                 
[    1.748386] raid6: int64x1  xor()   419 MB/s                                 
[    1.820417] raid6: int64x2  gen()   605 MB/s                                 
[    1.892473] raid6: int64x2  xor()   544 MB/s                                 
[    1.964576] raid6: int64x4  gen()   891 MB/s                                 
[    2.036604] raid6: int64x4  xor()   673 MB/s                                 
[    2.108649] raid6: int64x8  gen()  1055 MB/s                                 
[    2.180699] raid6: int64x8  xor()   674 MB/s                                 
[    2.252790] raid6: neonx1   gen()   658 MB/s                                 
[    2.324808] raid6: neonx1   xor()   686 MB/s                                 
[    2.396891] raid6: neonx2   gen()  1024 MB/s                                 
[    2.468910] raid6: neonx2   xor()   914 MB/s                                 
[    2.540953] raid6: neonx4   gen()  1363 MB/s                                 
[    2.613017] raid6: neonx4   xor()  1061 MB/s                                 
[    2.685051] raid6: neonx8   gen()  1538 MB/s                                 
[    2.757098] raid6: neonx8   xor()  1117 MB/s                                 
[    2.761187] raid6: using algorithm neonx8 gen() 1538 MB/s                    
[    2.766558] raid6: .... xor() 1117 MB/s, rmw enabled                         
[    2.771498] raid6: using intx1 recovery algorithm      
SYSTEM HANGS!!!

The corresponding part of the boot messages after some trivial logic was added to the AXI bus

[    0.143241] DMI not present or invalid.                                      
[    0.147002] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ms
[    0.159914] xor: measuring software checksum speed                           
[    0.204611]    8regs     :  2156.000 MB/sec                                  
[    0.248675]    8regs_prefetch:  1915.000 MB/sec                              
[    0.293089]    32regs    :  2389.000 MB/sec                                  
[    0.337158]    32regs_prefetch:  2156.000 MB/sec                             
[    0.341626] xor: using function: 32regs (2389.000 MB/sec)                    
[    0.347619] NET: Registered protocol family 16                               
[    0.363947] cpuidle: using governor menu                                     
[    0.367759] vdso: 2 pages (1 code @ ffffff8008876000, 1 data @ ffffff8008bb4)
[    0.375164] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.    
[    0.382458] DMA: preallocated 256 KiB pool for atomic allocations            
[    0.389401] ARM CCI_400_r1 PMU driver probed                                 
[    0.413648] HugeTLB registered 2 MB page size, pre-allocated 0 pages         
[    0.488236] raid6: int64x1  gen()   403 MB/s                                 
[    0.560480] raid6: int64x1  xor()   419 MB/s                                 
[    0.632673] raid6: int64x2  gen()   605 MB/s                                 
[    0.704881] raid6: int64x2  xor()   544 MB/s                                 
[    0.777137] raid6: int64x4  gen()   891 MB/s                                 
[    0.849370] raid6: int64x4  xor()   673 MB/s                                 
[    0.921568] raid6: int64x8  gen()  1052 MB/s                                 
[    0.993797] raid6: int64x8  xor()   674 MB/s                                 
[    1.065990] raid6: neonx1   gen()   657 MB/s                                 
[    1.138193] raid6: neonx1   xor()   685 MB/s                                 
[    1.210402] raid6: neonx2   gen()  1024 MB/s                                 
[    1.282593] raid6: neonx2   xor()   914 MB/s                                 
[    1.354826] raid6: neonx4   gen()  1365 MB/s                                 
[    1.427036] raid6: neonx4   xor()  1062 MB/s                                 
[    1.499266] raid6: neonx8   gen()  1539 MB/s                                 
[    1.571455] raid6: neonx8   xor()  1117 MB/s                                 
[    1.575579] raid6: using algorithm neonx8 gen() 1539 MB/s                    
[    1.580996] raid6: .... xor() 1117 MB/s, rmw enabled                         
[    1.585976] raid6: using intx1 recovery algorithm                            
[    1.591018] GPIO IRQ not connected                                           
[    1.594271] XGpio: /amba_pl/gpio@80000000: registered, base is 306           
[    1.600478] GPIO IRQ not connected                                           
[    1.603972] XGpio: /amba_pl/gpio@80000000: dual channel registered, base is 4
[    1.611333] GPIO IRQ not connected                                           
[    1.614622] XGpio: /amba_pl/gpio@80010000: registered, base is 242           
[    1.620918] ACPI: Interpreter disabled.                                      
[    1.625306] arm-smmu fd800000.smmu: probing hardware configuration...        
[    1.631615] arm-smmu fd800000.smmu: SMMUv2 with:                             
[    1.636244] arm-smmu fd800000.smmu:  stage 1 translation                     
[    1.641573] arm-smmu fd800000.smmu:  stage 2 translation                     
[    1.646903] arm-smmu fd800000.smmu:  nested translation                      
[    1.652149] arm-smmu fd800000.smmu:  stream matching with 48 register groupsf
[    1.660360] arm-smmu fd800000.smmu:  16 context banks (0 stage-2 only)       
[    1.666914] arm-smmu fd800000.smmu:  Supported page sizes: 0x60211000        
[    1.673378] arm-smmu fd800000.smmu:  Stage-1: 48-bit VA -> 48-bit IPA        
[    1.679843] arm-smmu fd800000.smmu:  Stage-2: 48-bit IPA -> 48-bit PA        
[    1.687149] arm-smmu fd800000.smmu: registered 26 master devices
[...]
SYSTEM BOOTS SUCCESSFULLY AND LOGIN PROMPT APPEARS

It is also interesting, why I can't boot Linux on a system without any logic connected to AXI, but this is another problem.

Now the crucial question is the one asked in my previous post: why the kernel hangs before reporting the PMU firmware version if the FPGA is configured from U-Boot instead from JTAG?

 

 

0 Kudos
Observer ahira
Observer
281 Views
Registered: ‎10-15-2018

Re: ZCU102: System starts, when FPGA loaded from JTAG, but hangs when FGPA loaded from U-Boot

Hi,@wzab I know it's been a while since you had this issue. I just wanted to ask how did you figure out how to get past the "raid6: using neon recovery algorithm" issue? 

It seems like something with the axi bus causes it to get stuck there. Do you know what is happening?

0 Kudos
Moderator
Moderator
265 Views
Registered: ‎09-12-2007

Re: ZCU102: System starts, when FPGA loaded from JTAG, but hangs when FGPA loaded from U-Boot

If you have IP in the PL that are enabled in the Devicetree, and dont have a bitstream, then the linux will crash while booting as the kernel will probe these IP.

 

Sounds like you want to use devicetree overlays. If so, you can use the flow below on the ZCU111 (but same steps apply to zcu102):

Creating Image in Petalinux 2018.3:

  • petalinux-create -t project -s <path to BSP>.bsp
  • cd <plnx project>
  • petalinux-config:
    • remove the PL from the devicetree:
    • petalinux-config.png
  • petalinux-config -c kernel
    • config as shown here
  • petalinux-build
  • cd images/linux
  • petalinux-package --boot --u-boot

 

Creating BIN, and DTO:

 

Launch XSCT, and source the attached helper script. Run the commands below:

  • generate_dts <path to HDF>.hdf
  • bit2bin <path to HDF>.hdf

 

This will create the bit.bin, and the pl.dtso:

win.png

Note: you will need to use DTC 1.5.1 as this supports symbols

Testing on Hardware:

Place the BOOT.BIN, image.ub, design_1_wrapper.bit.bin, pl.dtbo onto an SD card and boot:

files.png

 

 

Use the commands on the wiki to test

console.png

0 Kudos