cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Adventurer
Adventurer
791 Views
Registered: ‎03-12-2018

Query Regarding FSBL_AMP

Jump to solution

Hi there,

 

I'm using Zynq ZC702 and for my application I want to use dual cores,

Core_0 - Linux

Core_1 - Bare Metal

version - 2017.4 (Vivado, Petalinx, SDK)

 

I'm referring following PDF from Xilinx,

https://www.xilinx.com/support/documentation/application_notes/xapp1078-amp-linux-bare-metal.pdf

 

It says that I need to use the zynq_AMP_fsbl, but in my SDK, i'm not able to see the same named application, instead it has  zync_fsbl. Also, I tried adding the repository from <xapp1078>/design/src/sdk_repos but nothing is happening.

 

Can anyone help to get Zynq_AMP_fsbl in SDK. I'm really stuck with this.

 

Thanks

Lokesh_OEPL  

Lokesh J.
1 Solution

Accepted Solutions
Adventurer
Adventurer
184 Views
Registered: ‎03-12-2018

Dear all,

Finally, I've cracked this.

First of all, you need a complete Petalinux Build, which will generate u-boot.elf, image.ub. Also do remember to edit system-user.dtsi which should have definition of memory as <0 0x20000000> and define reserved memory as <0x20000000 0x20000000>.

     memory {
	    device_type = "memory";
       	    reg = <0 0x20000000>; 
	};

     reserved-memory {
		   ranges;
      		   reserved {
       			reg = <0x20000000 0x20000000>;   
          	   }; 
     };

Now in SDK create 2 new application is standalone BareMetal 

(1) zynq_fsbl with "Zynq Fsbl" template

(2) cpu1 with "helloworld" template. Along with this, do edit lscript.d. only change you need to do in ps7_ddr_0 as follows:

Base Address: 0x20000000  Size : 0x20000000

 

Then Create BOOT.bin in SDK with following files in the same sequence - 

1. (bootloader) zynq_fsbl.elf

2. design_1_wrapper.bit

3. u-boot.elf

4. cpu1.elf

 

Then Copy Boot.bin and image.ub in SD card, insert it in Board and switch on the board.

Before loading Linux image, boot waits for 5 secs, press any key to interrupt it and zynq> prompt will appear and there give following commands

zynq> mw 0xFFFFFFF0 0x20000000 32    // Press Enter
zynq> boot   // Press Enter

This will continue the boot load and wait for 20 secs, CPU1 elf will start getting executed.

Along with that, if you want you can run cpu0 elf.

 

Hence dual core CPU0 Linux and CPU1 BareMetal will work.

I've tried and tested it. and its working perfectly fine with 2017.4, 2018.3 and 2019.2

Lokesh J.

View solution in original post

0 Kudos
Reply
4 Replies
Moderator
Moderator
768 Views
Registered: ‎12-04-2016

Hi Lokesh

 

Firstly, xapp1078 is not updated from very long time, so you might not see the exact 2017.4 files. But below are for reference

Refer these links for zynq amp fsbl 

http://www.wiki.xilinx.com/XAPP1078+Latest+Information

(Download xapp1078_edk14.5_lnx14.3.zip)

This will also has the generated elf's

https://github.com/xupsh/Amp-zynq/tree/master/generated_files/elfs

 

 

Best Regards

Shabbir

0 Kudos
Reply
Adventurer
Adventurer
693 Views
Registered: ‎03-12-2018
Dear @shabbirk,
 
Thanks for your response and sorry for not getting back to you soon. 
 
Actually our application requires us to use dual core with one working on Linux OS and second one on Bare Metal. 
So even if xapp1078 is not updated, we are not looking at a specific XAPP here but a solution that enables us achieve our requirement as captured the above.
 
We are with the latest Vivado and SDK and we would also not like to use something as old as XAPP1078 defined on ISE 2014 version. 
 
I believe the task that we are trying to achieve here is not a new one (considering Zynq has been there for about 5 years now) and so wanted to check if the dual core support is an in-built feature  with the newer version of Vivado / SDK or still we have to follow the same XAPP1078 implementation?
 
Do we still need to edit FSBL if we want to get dual core working in AMP mode? Is there an API that takes care of it? 
 
Thanks and warm regards
Lokesh_OEPL
 
 
 
The only priority we have is to get the dual core working i.e. core 0 with Linux and core 1 with Bare-Metal.
 
Moreover, I want you to look into one thing, that the xapp1078 or xapp1079, they both mentioned that the fsbl which they are using are edited. Does this means that we need to edit the existing zynq-fsbl to get this working. Just a though. Please check this also.
Lokesh J.
0 Kudos
Reply
Moderator
Moderator
686 Views
Registered: ‎05-10-2017

Hi Lokesh,

 

Please use the OpenAMP solution. The link to the user guide is here

https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_1/ug1186-zynq-openamp-gsg.pdf

 

You can check the openamp demos. We have examples for both Zynq-7000 and Zynq-Ultrascale+. 

In the demos, ps7_cortexa9_0 runs Linux while the OpenAMP slave (your baremetal application) runs on ps7_cortexa9_1, 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Reply
Adventurer
Adventurer
185 Views
Registered: ‎03-12-2018

Dear all,

Finally, I've cracked this.

First of all, you need a complete Petalinux Build, which will generate u-boot.elf, image.ub. Also do remember to edit system-user.dtsi which should have definition of memory as <0 0x20000000> and define reserved memory as <0x20000000 0x20000000>.

     memory {
	    device_type = "memory";
       	    reg = <0 0x20000000>; 
	};

     reserved-memory {
		   ranges;
      		   reserved {
       			reg = <0x20000000 0x20000000>;   
          	   }; 
     };

Now in SDK create 2 new application is standalone BareMetal 

(1) zynq_fsbl with "Zynq Fsbl" template

(2) cpu1 with "helloworld" template. Along with this, do edit lscript.d. only change you need to do in ps7_ddr_0 as follows:

Base Address: 0x20000000  Size : 0x20000000

 

Then Create BOOT.bin in SDK with following files in the same sequence - 

1. (bootloader) zynq_fsbl.elf

2. design_1_wrapper.bit

3. u-boot.elf

4. cpu1.elf

 

Then Copy Boot.bin and image.ub in SD card, insert it in Board and switch on the board.

Before loading Linux image, boot waits for 5 secs, press any key to interrupt it and zynq> prompt will appear and there give following commands

zynq> mw 0xFFFFFFF0 0x20000000 32    // Press Enter
zynq> boot   // Press Enter

This will continue the boot load and wait for 20 secs, CPU1 elf will start getting executed.

Along with that, if you want you can run cpu0 elf.

 

Hence dual core CPU0 Linux and CPU1 BareMetal will work.

I've tried and tested it. and its working perfectly fine with 2017.4, 2018.3 and 2019.2

Lokesh J.

View solution in original post

0 Kudos
Reply