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: 
3,593 Views
Registered: ‎05-22-2017

Linux hangs when accessing AXI register

Jump to solution

Hi all,

 

I'm struggling to solve PL issue using AXI GPIO from Linux.

I've a bitstream with FPGA configuration (working fine from bare-metal application) , and I generated the .dts file using the following instructions:

 

 

hsi open_hw_design <file>.hdf
hsi set_repo_path ../../../device-tree-xlnx
hsi create_sw_design device-tree -os device_tree -proc ps7_cortexa9_0
hsi generate_target -dir RTI_dts

When I include the dts in my device tree file, the linux booting hang on starting kernel. The dts generated is composed by following node:

axi_gpio_LED_Output: gpio@81260000 {
			#gpio-cells = <2>;
			compatible = "xlnx,xps-gpio-1.00.a";
			gpio-controller ;
			reg = <0x81260000 0x10000>;
			xlnx,all-inputs = <0x0>;
			xlnx,all-inputs-2 = <0x0>;
			xlnx,all-outputs = <0x1>;
			xlnx,all-outputs-2 = <0x0>;
			xlnx,dout-default = <0x00000000>;
			xlnx,dout-default-2 = <0x00000000>;
			xlnx,gpio-width = <0x4>;
			xlnx,gpio2-width = <0x20>;
			xlnx,interrupt-present = <0x0>;
			xlnx,is-dual = <0x0>;
			xlnx,tri-default = <0xFFFFFFFF>;
			xlnx,tri-default-2 = <0xFFFFFFFF>;
		};

I've tried with devmem tool as well, from working linux configuration. It hangs after calling:

devmem -r 0x81260000

I'm using YOCTO and meta-xilinx layer to generate the kernel, boot.ini and rootfs. I'm working with openAMP configuration.

 

Do I need to add some support to kernel ? Following the trace from my boot.

Do you have any suggestion ?

 

Thanks

 

BOOT LOG


U-Boot SPL 2016.07-dirty (May 02 2017 - 15:52:44)
mmc boot
Trying to boot from MMC1
reading fpga.bin
reading fpga.bin
zynq_validate_bitstream: Bitstream is not validated yet (diff 73)
reading system.dtb
spl_load_image_fat_os: error reading image system.dtb, err - -1
reading u-boot.img
reading u-boot.img


U-Boot 2016.07 (May 10 2017 - 07:35:46 +0000)

Model: Zynq MicroZED Board
Board: Xilinx Zynq
DRAM:  ECC disabled 1 GiB
MMC:   sdhci@e0100000: 0
SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
In:    serial@e0001000
Out:   serial@e0001000
Err:   serial@e0001000
Model: Zynq MicroZED Board
Board: Xilinx Zynq
Net:   ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
eth0: ethernet@e000b000
reading uEnv.txt
245 bytes read in 10 ms (23.4 KiB/s)
Importing environment from SD ...
Hit any key to stop autoboot:  0
Device: sdhci@e0100000
Manufacturer ID: 3
OEM: 5344
Name: SU04G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 3.7 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading uEnv.txt
245 bytes read in 10 ms (23.4 KiB/s)
Loaded environment from uEnv.txt
Importing environment from SD ...
Running uenvcmd ...
reading uImage
3781072 bytes read in 329 ms (11 MiB/s)
reading microzed-zynq7.dtb
23044 bytes read in 24 ms (937.5 KiB/s)
## Booting kernel from Legacy Image at 03000000 ...
   Image Name:   Linux-4.9.0-xilinx-v2017.1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3781008 Bytes = 3.6 MiB
   Load Address: 10000000
   Entry Point:  10000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 02a00000
   Booting using the fdt blob at 0x2a00000
   Loading Kernel Image ... OK
   Loading Device Tree to 1fff7000, end 1ffffa03 ... OK

Starting kernel ...

 

 

 

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
Teacher muzaffer
Teacher
6,136 Views
Registered: ‎03-31-2012

Re: Linux hangs when accessing AXI register

Jump to solution

@giulio.presazzi in the kernel log there is something which says "zynq_validate_bitstream: Bitstream is not validated yet (diff 73) "

not sure if this means uboot is not programming the fpga. Make sure you know which portion of boot has responsibility to program the fpga. It could be fsbl or uboot. If neither you have to do it from running linux (cp fpga.bit > /dev/xdevcfg?) Otherwise accessing the pl device will hang your system.

 

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
5 Replies
Teacher muzaffer
Teacher
6,137 Views
Registered: ‎03-31-2012

Re: Linux hangs when accessing AXI register

Jump to solution

@giulio.presazzi in the kernel log there is something which says "zynq_validate_bitstream: Bitstream is not validated yet (diff 73) "

not sure if this means uboot is not programming the fpga. Make sure you know which portion of boot has responsibility to program the fpga. It could be fsbl or uboot. If neither you have to do it from running linux (cp fpga.bit > /dev/xdevcfg?) Otherwise accessing the pl device will hang your system.

 

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
3,444 Views
Registered: ‎05-22-2017

Re: Linux hangs when accessing AXI register

Jump to solution

@muzaffer Thanks for your response.

 

The FPGA was not programmed correctly. I do it from uboot, and now the address 0x81260000 does not hang anymore.

 

Thanks.

 

0 Kudos
Participant shantan1
Participant
1,116 Views
Registered: ‎05-22-2018

Re: Linux hangs when accessing AXI register

Jump to solution

Hi @giulio.presazzi @muzafferHow did you do it? I have the same problem and mine is hanging up on:

devmem <register_access>

I am getting the zynqmp_validate_bistream error.
Please help.

0 Kudos
Visitor dave-tech
Visitor
581 Views
Registered: ‎04-24-2013

Re: Linux hangs when accessing AXI register

Jump to solution
0 Kudos
Participant shantan1
Participant
168 Views
Registered: ‎05-22-2018

Re: Linux hangs when accessing AXI register

Jump to solution
Thanks dave-tech
0 Kudos