I'm using the free memory region at the end of the DDR3 RAM address range for DMA. It could also be useful for some other project like this one.Mike1010 wrote:May i ask you why your device tree only uses 0 - 0x1E000000 (480MB)?
bare metal app
-
- Posts: 799
- Joined: Sat May 23, 2015 5:22 pm
Re: bare metal app
-
- Posts: 23
- Joined: Mon Jun 15, 2015 8:02 pm
Re: bare metal app
I can boot the ubuntu but cat /proc/cpuinfo shows two cores...
i set maxcpus=1 in the boot_args within scripts/devicetree.tcl ... Did i miss a change?
Here the kernel log: http://paste.ubuntu.com/11734402
i set maxcpus=1 in the boot_args within scripts/devicetree.tcl ... Did i miss a change?
Here the kernel log: http://paste.ubuntu.com/11734402
-
- Posts: 799
- Joined: Sat May 23, 2015 5:22 pm
Re: bare metal app
A couple of questions.
What SD card image are you using?
What are real kernel args returned by the following command?
What SD card image are you using?
What are real kernel args returned by the following command?
Code: Select all
cat /proc/cmdline
-
- Posts: 23
- Joined: Mon Jun 15, 2015 8:02 pm
Re: bare metal app
i built the SD card image by myself with the src from: https://github.com/pavel-demin/red-pitaya-notes
I changed the Makefile as discussed before:
here the output:
I changed the Makefile as discussed before:
Code: Select all
boot.bin: tmp/$(NAME).fsbl/executable.elf tmp/$(NAME).bit tmp/u-boot.elf
echo "img:{[bootloader] tmp/red_pitaya_0_92.fsbl/executable.elf tmp/red_pitaya_0_92.bit tmp/u-boot.elf app_cpu1.elf}" > tmp/boot.bif bootgen -image tmp/boot.bif -w -o i boot.bin
Code: Select all
cat /proc/cmdline
console=ttyPS0,115200 root=/dev/mmcblk0p2 ro rootfstype=ext4 earlyprintk rootwait maxcpus=1
-
- Posts: 799
- Joined: Sat May 23, 2015 5:22 pm
Re: bare metal app
Thanks. is indeed where it should be. But the kernel still starts the second CPU core.
Still from the same blog: http://henryomd.blogspot.be/2014/09/smp ... -core.html
The second CPU can be stopped with the following command:
After looking at XAPP1078, XAPP1079 and this article, I think that the easiest would be to follow the article and XAPP1079.
Here is what I think could be done:
Code: Select all
maxcpus=1
Still from the same blog: http://henryomd.blogspot.be/2014/09/smp ... -core.html
The second CPU can be stopped with the following command:
Code: Select all
echo 0 >> /sys/devices/system/cpu/cpu1/online
Here is what I think could be done:
- build the remoteproc module
- add remoteproc to devicetree
- take app_cpu1.c from XAPP1079 because it's much shorter
- take BSP code from XAPP1078 because it's more recent
- build app_cpu1.elf and copy it to the SD card
- boot Red Pitaya with default kernel args and default boot.bin
- stop CPU1 using
Code: Select all
echo 0 >> /sys/devices/system/cpu/cpu1/online
- load the remoteproc module that should start CPU1 and run app_cpu1.elf
-
- Posts: 799
- Joined: Sat May 23, 2015 5:22 pm
Re: bare metal app
Correction to my todo list. BSP from XAP1078 is not needed. SDK 2015.1 comes with a more recent version. Only scripts/fsbl.tcl should be modified to add -DUSE_AMP=1.
-
- Posts: 23
- Joined: Mon Jun 15, 2015 8:02 pm
Re: bare metal app
I had already added -DUSE_AMP=1 as mentioned in XAP1078.
Do you mean the app_cpu1_bsp project i created according to XAP1078?
1.) I created a board support package project. This one had the -DUSE_AMP=1 set! The code for this project was added by vivado 2015!
2.) i created the application project called app_cpu1 and added the files from XAP1078 (http://www.wiki.xilinx.com/file/view/xa ... 2014.4.zip) and removed the interrupt code + i changed the lscript.ld to use the correct ddram baseaddr and length. I didnt add a DUSE_AMP flag for this project.
Do you mean the app_cpu1_bsp project i created according to XAP1078?
1.) I created a board support package project. This one had the -DUSE_AMP=1 set! The code for this project was added by vivado 2015!
2.) i created the application project called app_cpu1 and added the files from XAP1078 (http://www.wiki.xilinx.com/file/view/xa ... 2014.4.zip) and removed the interrupt code + i changed the lscript.ld to use the correct ddram baseaddr and length. I didnt add a DUSE_AMP flag for this project.
Last edited by Mike1010 on Thu Jun 18, 2015 12:29 pm, edited 3 times in total.
-
- Posts: 799
- Joined: Sat May 23, 2015 5:22 pm
Re: bare metal app
Sorry for the confusion. I'm trying to understand how to generate FSBL from the command-line without GUI. In the same time, I'm trying to follow the blog article.
-
- Posts: 23
- Joined: Mon Jun 15, 2015 8:02 pm
Re: bare metal app
I again looked at http://www.wiki.xilinx.com/XAPP1078+Latest+Information
The following note seems to be important. i guess we need to patch the linux kernel as well?
The following note seems to be important. i guess we need to patch the linux kernel as well?
The file to be modified: https://github.com/Xilinx/linux-xlnx/bl ... /platsmp.cModifying the Linux Kernel
The Linux kernel contains initialization code for CPU1. This code needs to be modified to send CPU1 back to the WFE loop located at 0xFFFFFF2C.
Edit the file arch/arm/mach-zynq/platsmp.c search for the following line:
ret = zynq_cpu1_start(virt_to_phys(secondary_startup));
and change the line to:
ret = zynq_cpu1_start(0xFFFFFF2C);
-
- Posts: 23
- Joined: Mon Jun 15, 2015 8:02 pm
Re: bare metal app
According to the link i posted before i need to generate and modify the cpu1_bootvec.bin
... But on the other hand xapp1079 latest information mentions that the cpu1_bootvec.bin is no longer required...!? What could i try !?
... But on the other hand xapp1079 latest information mentions that the cpu1_bootvec.bin is no longer required...!? What could i try !?
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie
Who is online
Users browsing this forum: No registered users and 76 guests