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 jlynnc
Visitor
1,701 Views
Registered: ‎07-16-2017

Linux on CPU0 and bare metal on CPU1

Platfom information:

vivado 2016.2

sdk 2016.2

petalinux 2016.2

Board: a customized zc7045 board 

 

Issues:

I need to run the Linux on cpu0 and bare metal on cpu1, refer to the XAPP1079, I created a new project for cpu1, the code is attached. But I didn't import the repo from the doc. The OS version is 5.5.

 

The memory map:

0x0-0x10000000 256MB for linux

0x10000000-0x20000000 256MB for bare metal

 

I just added the macro -g -DUSE_AMP

 

The bif file as following :

//arch = zynq; split = false; format = BIN
the_ROM_image:
{
	[bootloader]D:\zynq\project\prj_fh7045_v1\prj_fh7045_v1.sdk\fsbl_test\Debug\fsbl_test.elf
	D:\zynq\project\prj_fh7045_v1\prj_fh7045_v1.sdk\design_1_wrapper_hw_platform_0\design_1_wrapper.bit
	C:\Users\Julian\Desktop\u-boot.elf
	D:\zynq\project\prj_fh7045_v1\prj_fh7045_v1.sdk\cpu1_app\Debug\cpu1_app.elf
	[load = 0xFFFFFFF0]D:\zynq\project\prj_fh7045_v1\prj_fh7045_v1.sdk\cpu1_app\bootimage\cpu1_bootvec.bin
}

If I used this bif to gen the boot.bin, the u-boot can not start. The error is:

INVALID_LOAD_ADDRESS_FAIL 

I found this error message in the file image_mover.c:

means the partitionloadaddr(0xFFFFFFF0) is greater than DDR_END_ADDR(0x3fffffff)

How to solve this problem?

 

Then I deleted the last line of bif file, remove the cpu1_bootvec.bin, the u-boot is ok, but the cpu1 can not run. Using following command to run:

root@zynq_test:/mnt# ./rwmem.elf 0xfffffff0
0x00000000fffffff0 = 0xffffff2c
root@zynq_test:/mnt# ./rwmem.elf 0xfffffff0 0x10000000
root@zynq_test:/mnt# ./rwmem.elf 0xfffffff0
0x00000000fffffff0 = 0x10000000
root@zynq_test:/mnt# ./rwmem.elf 0x10000000
0x0000000010000000 = 0xedfe0dd0

I also watched the addr 0x10000000, the contents are not the content of cpu1_app.elf.

How to solve this problem?

 

If I created a app for cpu0, using the same memory map and cpu1 app, the 2 bare metal AMP system runs well.

 

BTW:

Refer to the UG585 doc, the cpu0 need to send SEV command to CPU1, but I can not find how to send this event on linux

 

 

 

 

 

 

 

 

 

 

 

0 Kudos
2 Replies
Visitor jlynnc
Visitor
1,700 Views
Registered: ‎07-16-2017

Re: Linux on CPU0 and bare metal on CPU1

Sorry, I forgot the attachment

 

0 Kudos
Visitor jpoyhia
Visitor
1,609 Views
Registered: ‎07-23-2017

Re: Linux on CPU0 and bare metal on CPU1

Try swapping the bare metal app and Linux in your memory map. I think the bare metal needs to be at address 0x0 when using Linux. Take a look at this.

0 Kudos