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: 
Visitor sosod
Visitor
3,099 Views
Registered: ‎05-06-2014

Load data in OCM on Zynq

Hello,

 

I'm using both cpus on Zynq and I'd like to load data of the app running on cpu1 in the ocm.

I try to change the linker script to do it, but when I load my programm on the board, it's not working.

I've seen that the fsbl uses the ocm during the boot. And that fsbl loads elf files in ddr.

How can I overcome this to load the data section in ocm?

 

Thanks

0 Kudos
3 Replies
Scholar sampatd
Scholar
3,080 Views
Registered: ‎09-05-2011

Re: Load data in OCM on Zynq

0 Kudos
Visitor sosod
Visitor
3,075 Views
Registered: ‎05-06-2014

Re: Load data in OCM on Zynq

Hello sampatd,

 

Thank you for your reply. I've already read that application note, but it doesn't help me resolving my problem. Indeed, in the application note, the ocm is used for communication between both cpus and is only written after the apps begin to run. When I use the ocm the same way, all is working fine.

But here, what I'd like to do is to store the data section of the ELF file of the app running on cpu1 in the ocm. I don't know if it's possible to do it or not. But if anyone has an idea, it will be useful for me.

 

Thanks

0 Kudos
Xilinx Employee
Xilinx Employee
3,038 Views
Registered: ‎02-01-2008

Re: Load data in OCM on Zynq

It's definitly possible. Check the address map table in the Zynq Technical Reference Manual. There are a few options that can move OCM around and actually disable visability of the OCM.

 

After bootrom runs and while FSBL is running, the top 1/4 of OCM (64KB) is mapped high at 0xffff0000 and the lower 3/4 of OCM is mapped to 0x00000000 (where FSBL is running from).

 

Depending on the OS that you are running, the lowest 3/4 of OCM could get mapped high so you have the full 512KB at 0xfffc0000-0xffffffff. There is also an address filter bit that can map the DDR into the lower address space.

 

Also, the top of high OCM (somewhere around 0xffffff00-0xffffffff) is initialized by the bootrom to contain the wfe() loop and the bootrom sends cpu1 to the wfe loop.

 

So read the registers that tell you where the quarters of OCM are mapped (high or low) and make sure your linkerscript works within those ranges. Also make sure your app will not overwrite the running FSBL.

0 Kudos