[meta-xilinx] AMP using Yocto meta-xilinx

Edward Wingate edwingate8 at gmail.com
Fri Jan 23 11:09:02 PST 2015


Thanks Nathan,

That worked, but running into another issue now.  The module is
loading on boot, so I didn't need to run the modprobe command (which
actually would be fine with me in this case, but if I had to, how
would I prevent it so that I could load the module manually?) and I
see the below, which doesn't match what is in ug978 AMP guide.  There
is a stack trace and error "dma_declare_coherent_memory failed":

[    5.772445] CPU1: shutdown
[    5.821954] ------------[ cut here ]------------
[    5.860298] WARNING: CPU: 0 PID: 601 at arch/arm/mm/ioremap.c:301
__arm_ioremap_pfn_caller+0xfc/0x17c()
[    6.020403] Modules linked in: zynq_remoteproc(+) remoteproc virtio
virtio_ring
[    6.027636] CPU: 0 PID: 601 Comm: udevd Not tainted 3.14.2-xilinx #1
[    6.034081] [<80015658>] (unwind_backtrace) from [<800119b4>]
(show_stack+0x10/0x14)
[    6.041837] [<800119b4>] (show_stack) from [<80490830>]
(dump_stack+0x8c/0xd0)
[    6.048994] [<80490830>] (dump_stack) from [<8002295c>]
(warn_slowpath_common+0x60/0x84)
[    6.057115] [<8002295c>] (warn_slowpath_common) from [<80022a10>]
(warn_slowpath_null+0x18/0x20)
[    6.065885] [<80022a10>] (warn_slowpath_null) from [<8001b038>]
(__arm_ioremap_pfn_caller+0xfc/0x17c)
[    6.075081] [<8001b038>] (__arm_ioremap_pfn_caller) from
[<8001b104>] (__arm_ioremap_caller+0x4c/0x54)
[    6.084367] [<8001b104>] (__arm_ioremap_caller) from [<8001ae10>]
(__arm_ioremap+0x14/0x1c)
[    6.092701] [<8001ae10>] (__arm_ioremap) from [<8027cfc4>]
(dma_declare_coherent_memory+0x40/0xe4)
[    6.101637] [<8027cfc4>] (dma_declare_coherent_memory) from
[<7f018354>] (zynq_remoteproc_probe+0xb0/0x3dc [zynq_remoteproc])
[    6.112993] [<7f018354>] (zynq_remoteproc_probe [zynq_remoteproc])
from [<80273138>] (platform_drv_probe+0x18/0x48)
[    6.123394] [<80273138>] (platform_drv_probe) from [<8027197c>]
(driver_probe_device+0x11c/0x334)
[    6.132240] [<8027197c>] (driver_probe_device) from [<80271c48>]
(__driver_attach+0x70/0x94)
[    6.140658] [<80271c48>] (__driver_attach) from [<8026ff38>]
(bus_for_each_dev+0x70/0x84)
[    6.148788] [<8026ff38>] (bus_for_each_dev) from [<80271020>]
(bus_add_driver+0xfc/0x1f4)
[    6.156977] [<80271020>] (bus_add_driver) from [<80272260>]
(driver_register+0x9c/0xe0)
[    6.164961] [<80272260>] (driver_register) from [<800088b8>]
(do_one_initcall+0xb8/0x160)
[    6.173125] [<800088b8>] (do_one_initcall) from [<800860ac>]
(load_module+0x1744/0x1d48)
[    6.181195] [<800860ac>] (load_module) from [<80086844>]
(SyS_finit_module+0x88/0xa0)
[    6.188979] [<80086844>] (SyS_finit_module) from [<8000e660>]
(ret_fast_syscall+0x0/0x48)
[    6.340135] ---[ end trace 8181865a1d5909d8 ]---
[    6.344687] zynq_remoteproc 0.remoteproc-test:
dma_declare_coherent_memory failed
[    6.512421] CPU1: Booted secondary processor

I am using a Zedboard and have ramdisk loading at 0x1000_0000, device
tree at 0x1180_0000 and the kernel at 0x1200_0000.
I have this in my dtsi file:
    test: remoteproc-test at 0 {
        compatible = "xlnx,zynq_remoteproc";
        reg = < 0x0 0x12000000 >;
        interrupt-parent = <&ps7_scugic_0>;
        interrupts = < 0 37 4 0 38 4 >;
        firmware = "freertos";
        ipino = <6>;
        vring0 = <2>;
        vring1 = <3>;
    } ;


I also noticed that Linux is reporting it is still seeing all the RAM.
/proc/meminfo:
MemTotal:         507408 kB

Is this expected?  I thought 256MB RAM would be for Linux and 256MB
would be for the 2nd CPU.  Would this division be in effect on boot-up
or on release of 2nd CPU?

Also, I don't know if this is related, but I haven't set up the binary
yet to load and run on the 2nd CPU.  Does zynq_remoteproc expect this?
 It sounded like zynq_remoteproc just releases the CPU and
rpmsg_freertos_statistic module (or eventually, my own module) is the
one that would load the binary for the 2nd CPU to execute.

Thanks for your help!

Edward


On Thu, Jan 22, 2015 at 9:21 PM, Nathan Rossi <nathan.rossi at xilinx.com> wrote:
>> -----Original Message-----
>> From: meta-xilinx-bounces at yoctoproject.org [mailto:meta-xilinx-
>> bounces at yoctoproject.org] On Behalf Of Edward Wingate
>> Sent: Friday, January 23, 2015 9:54 AM
>> To: meta-xilinx at yoctoproject.org
>> Subject: Re: [meta-xilinx] AMP using Yocto meta-xilinx
>>
>> I created a fragment that configures the linux-xlnx kernel to allow AMP:
>> CONFIG_HIGHMEM=y
>> CONFIG_VMSPLIT_2G=y
>> CONFIG_ZYNQ_REMOTEPROC=m
>> CONFIG_RPMSG_OMX=m
>> CONFIG_RPMSG_FREERTOS_STAT=m
>> (These kernel config settings are based on the ug978 AMP guide.)
>>
>> The bitbake command succeeded and after booting the new kernel, I
>> attempted to release the 2nd CPU from Linux with:
>> modprobe zynq_remoteproc
>>
>> But this resulted in:
>> modprobe: module zynq_remoteproc not found in modules.dep
>>
>> And when I looked at /lib/modules/3.14.2-xilinx/modules.dep, the file
>> is empty (zero length) and there are no modules in the directory
>> either.  I would think at least some modules would be present in the
>> distribution, if not the one I want.
>>
>> In log.do_install for linux-xlnx, I do see the following (among many
>> others):
>> INSTALL drivers/remoteproc/zynq_remoteproc.ko
>>
>> And I do see the module in the poky build image directory:
>> ./poky/build/tmp/work/<architecture>/linux-xlnx/3.14-
>> xilinx+git2b48a8aeea7367359f9eebe55c4a09a05227f32b-
>> r0/image/lib/modules/3.14.2-
>> xilinx/kernel/drivers/remoteproc/zynq_remoteproc.ko
>>
>> And zynq_remoteproc.ko is listed in
>> ./poky/build/tmp/work/<architecture>/linux-xlnx/3.14-
>> xilinx+git2b48a8aeea7367359f9eebe55c4a09a05227f32b-
>> r0/image/lib/modules/3.14.2-xilinx/modules.order
>> as well.
>>
>> Why didn't the module make it to the image?  I didn't see any obvious
>> errors in the log.do_deploy or log.do_package either.  Is there
>> another log I can check?
>
> You will need to add the module(s) package to the image. E.g. "kernel-module-zynq-remoteproc" (not sure if that's the exact name, check for the package in deploy/).
>
> Adding it to MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS (or *_RDEPENDS as a hard dependency).
> (http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS)
>
> MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-zynq-remoteproc"
>
> Regards,
> Nathan
>



More information about the meta-xilinx mailing list