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: 
Explorer
Explorer
173 Views
Registered: ‎05-25-2016

fsbl stuck on wfe loop

Jump to solution

Hello,

I'm trying to figure out why my cpu0 is getting stuck on this wfe instruction.  I'm using xcst to load the fsbl and that works, but when I use the "con" command I see that the fsbl / cpu0 just spins on a wfe instruction from "FsblHandoffJtagExit();" in the fsbl main.c.  I'm trying to step through and load the two boot loaders and then the os via jtag to understand the process.  So far from Xilinx documentation and the zynq TRM it sounds like the wfe instruction is meant to hold cpu1 in a loop while booting and cpu0 eventually pulls cpu1 out of this loop with a SEV instruction.  

My question is, how do I get CPU0 out of this wfe loop?  I've verified that the address of the cpu in xcst matches the address of the wfe disassembly instruction in the sdk when running the fsbl in the debugger.  The images attached show this.  I'm just a little unsure how to troubleshoot this.

 

Platform:

Pynq-Z1 dev board

Attempting to build fsbl in sdk using exported hdf from fpga project

fpga project built from tcl scripts without errors

uboot build from source - because of wfe I'm not getting here

2.jpg
3.jpg
4.jpg
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
149 Views
Registered: ‎10-12-2018

Re: fsbl stuck on wfe loop

Jump to solution

Hi @m3atwad ,

The bootrom captures cpu1 and sends it to a loop running around address 0xFFFFFF00 or 0xFFFFFF20. The loop includes checking address 0xFFFFFFF0 and the operand wfe(). Once cpu1 executes wfe(), it will go to sleep until an event occurs. Events include sev() and interrupts. So if cpu0 executes sev(), cpu1 will wakeup and re-execute the loop where it checks the value at 0xFFFFFFF0 and then executes wfe() again.

Please check XAPP1079 cpu0 application executes sev().

https://www.xilinx.com/support/documentation/application_notes/xapp1079-amp-bare-metal-cortex-a9.pdf

You can also check below wiki for latest information of xapp1079.

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842504/XAPP1079+Latest+Information

Thanks & Regards
Anil B
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
2 Replies
Highlighted
Xilinx Employee
Xilinx Employee
150 Views
Registered: ‎10-12-2018

Re: fsbl stuck on wfe loop

Jump to solution

Hi @m3atwad ,

The bootrom captures cpu1 and sends it to a loop running around address 0xFFFFFF00 or 0xFFFFFF20. The loop includes checking address 0xFFFFFFF0 and the operand wfe(). Once cpu1 executes wfe(), it will go to sleep until an event occurs. Events include sev() and interrupts. So if cpu0 executes sev(), cpu1 will wakeup and re-execute the loop where it checks the value at 0xFFFFFFF0 and then executes wfe() again.

Please check XAPP1079 cpu0 application executes sev().

https://www.xilinx.com/support/documentation/application_notes/xapp1079-amp-bare-metal-cortex-a9.pdf

You can also check below wiki for latest information of xapp1079.

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842504/XAPP1079+Latest+Information

Thanks & Regards
Anil B
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Explorer
Explorer
141 Views
Registered: ‎05-25-2016

Re: fsbl stuck on wfe loop

Jump to solution

Ok.  I'll go through the xapp, but my issue is that cpu0 is stuck on the WFE instruction - cpu1 seems to be doing what you described.

0 Kudos