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: 
Highlighted
Newbie jmarcao
Newbie
382 Views
Registered: ‎03-21-2019

Emulating QSPI in QEMU during U-Boot

We are using a Arty Z7-10 development board with a Zynq 7000 processor and XC7Z010-1CLG400C FPGA. We have a software solution that access the QSPI flash while in UBOOT before loading Linux. Both are built using the Petalinux tools.

We are having issues emulating UBoot in QEMU. Launching the emulation through petalinux ( petalinux-boot --qemu --u-boot ) we are able to see the U-Boot output, but we cannot access the QSPI and run into many errors, since calls to it have no hardware to connect to. Is it possible to emulate the QSPI device using QEMU? If so, is it possible to recover and re-use the QSPI storage?

The full command that petalinux executes is below:

qemu-system-aarch64 -M arm-generic-fdt-7series -machine linux=on -serial mon:stdio -serial /dev/null -display none -kernel <BUILD_PATH>/images/linux/u-boot.elf -gdb tcp::9000 -dtb <BUILD_PATH>/images/linux/system.dtb -net nic,vlan=1 -net user,vlan=1,tftp=<BUILD_PATH>/images/linux -net nic -device loader,addr=0xf8000008,data=0xDF0D,data-len=4 -device loader,addr=0xf8000140,data=0x00500801,data-len=4 -device loader,addr=0xf800012c,data=0x1ed044d,data-len=4 -device loader,addr=0xf8000108,data=0x0001e008,data-len=4 -device loader,addr=0xF8000910,data=0xF,data-len=0x4 -sd /dev/sdb

Thank you,

J

Tags (3)
0 Kudos
3 Replies
Moderator
Moderator
339 Views
Registered: ‎12-04-2016

Re: Emulating QSPI in QEMU during U-Boot

Hi @jmarcao 

 

Are you able to detect the flash with uboot's sf probe 0 0 command?

I tried at our end with zynq7000 petalinux bsp, I dont see any issues

 

Best Regards

Shabbir

0 Kudos
Newbie jmarcao
Newbie
322 Views
Registered: ‎03-21-2019

Re: Emulating QSPI in QEMU during U-Boot

Hello Shabbir,

Thanks for your response.

Executing the command requested returns the following:

SF: unrecognized JEDEC id bytes: 20, 20, 14

It seems like we can  detect the flash, but it is rejected based on its ID. Is there an option to accept unrecognized JEDEC id bytes? Or is an unrecognized ID a symptom of a larger issue?

EDIT: This command returns no error on hardware and everything executes normally on the flash (read, write, etc.)

Thank you,

J

0 Kudos
Moderator
Moderator
304 Views
Registered: ‎12-04-2016

Re: Emulating QSPI in QEMU during U-Boot

Hi 

Make sure you are using the same device tree file that have been used while booting the hardware.

On ZC702 BSP, we have this flash

Zynq> sf probe 0 0
SF: Detected n25q512 with page size 256 Bytes, erase size 4 KiB, total 64 MiB

 

Best Regards

Shabbir

 

0 Kudos