cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
1,439 Views
Registered: ‎03-17-2020

OpenAMP zynq (not zynqMP)

Jump to solution

Hello,

I have a problem in using openAMP on zynq 7035.

I followed UG1186 (22 May 2019) to create a petalinux project from an XSA file (created from ADRV9361 bob board) supporting openAMP. I chose to use default pre build examples to make a first test (so I did not compile any code for remote processor, just using default images)

My problem is that when i start the image_echo_test on remote processor, I get:

remoteproc remoteproc0: powering up remoteproc@0

remoteproc remoteproc0: Booting fw image image_echo_test, size 2702112
Starting application...
Successfully initialize remoteproc.
Initialize remoteproc successfully.
creating remoteproc virtio
virtio_rpmsg_buinitializing rpmsg vdev
initializing rpmsg vdev
Try to create rpmsg endpoint.
ERROR: Failed to create endpoint.
Stopping application...
remoteproc remoteproc0: registered virtio0 (type 7)
remoteproc remoteproc0: remote processor remoteproc@0 is now up

Also, I need to modprobe both rpmsg_char and rpmsg_core which are not probed at boot.

You can find in attachment my system_user.dtsi, in which I added the nodes for zynq as stated in UG1186.

I'm using Petalinux 2019.2.

Thanks,

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor
Visitor
1,043 Views
Registered: ‎03-17-2020

I didi not solve the issue with Petalinux 2019.1.

Since I cannot go to 2019.2, I switched to 2018.2 and it seems to be working now.

 

View solution in original post

0 Kudos
13 Replies
Highlighted
Moderator
Moderator
1,355 Views
Registered: ‎05-10-2017

Your device-tree looks like from an older version. If you see the 2019.2 user guide we have update the device-tree that should be used (see page 36 in UG1186). Please update your system-user.dtsi as shown below

/include/ "system-conf.dtsi"
/ {
};
/ {
	reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;
		rproc_0_reserved: rproc@3e000000 {
			no-map;
			reg = <0x3e000000 0x400000>;
		};
		rproc_0_dma: rproc@3e800000 {
			no-map;
			compatible = "shared-dma-pool";
			reg = <0x3e800000 0x100000>;
		};
	};

	remoteproc0: remoteproc@0 {
		compatible = "xlnx,zynq_remoteproc";
		firmware = "firmware";
		vring0 = <15>;
		vring1 = <14>;
		memory-region = <&rproc_0_reserved>, <&rproc_0_dma>;
	};
};

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor
Visitor
1,342 Views
Registered: ‎03-17-2020

Thanks for the answer.

Unfortunately, after changing the device tree blob I get the following error:

root@tlmEM56T:~# echo image_echo_test > /sys/class/remoteproc/remoteproc0/firmware
root@tlmEM56T:~# echo start > /sys/class/remoteproc/remoteproc0/state
remoteproc remoteproc0: powering up remoteproc@0
remoteproc remoteproc0: Booting fw image image_echo_test, size 2702112
remoteproc remoteproc0: bad phdr da 0x3e000000 mem 0x1aefc
remoteproc remoteproc0: Failed to load program segments: -22
remoteproc remoteproc0: Boot failed: -22
-sh: echo: write error: Invalid argument

rpmsg_char module is not loaded, but even if I load it nothing changes. Also, if I try to run an application compiled with Vitis, I get the same error.

I attach the complete device tree blob, made with dtc from the system.dtb inside the image/linux folder

0 Kudos
Highlighted
Visitor
Visitor
1,322 Views
Registered: ‎03-17-2020

I noticed one thing in boot sequence:

..

Ignoring RAM at 0x30000000-0x40000000
Consider using a HIGHMEM enabled kernel.
Reserved memory: created DMA memory pool at 0x3e800000, size 1 MiB
OF: reserved mem: initialized node rproc@3e800000, compatible id shared-dma-pool
cma: Reserved 128 MiB at 0x28000000

..

Could the higlighted line be an issue?

0 Kudos
Highlighted
Moderator
Moderator
1,304 Views
Registered: ‎05-10-2017

It could be an issue. Could you please attach the complete boot log? How much ddr do you have ?

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor
Visitor
1,270 Views
Registered: ‎03-17-2020

Hello,

my board has 1 GB of DDR. Here is the boot log:


Abort
Hit any key to stop autoboot: 0
Zynq> boot
Device: mmc@e0100000
Manufacturer ID: 1b
OEM: 534d
Name: EC2QT
Bus Speed: 50000000
Mode : SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 59.6 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
5129252 bytes read in 308 ms (15.9 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
Using 'conf@system-top.dtb' configuration
Verifying Hash Integrity ... OK
Trying 'kernel@1' kernel subimage
Description: Linux kernel
Type: Kernel Image
Compression: uncompressed
Data Start: 0x100000f0
Data Size: 5104760 Bytes = 4.9 MiB
Architecture: ARM
OS: Linux
Load Address: 0x00008000
Entry Point: 0x00008000
Hash algo: sha1
Hash value: 170ef0952d9847bc296e9ab3b1cf3f1cd9def68e
Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
Using 'conf@system-top.dtb' configuration
Verifying Hash Integrity ... OK
Trying 'fdt@system-top.dtb' fdt subimage
Description: Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x104de668
Data Size: 22601 Bytes = 22.1 KiB
Architecture: ARM
Hash algo: sha1
Hash value: bc1cad8c4635ae203bfccb675f7ee3bd51eb4d8f
Verifying Hash Integrity ... sha1+ OK
Booting using the fdt blob at 0x104de668
Loading Kernel Image ... OK
Loading Device Tree to 07ff7000, end 07fff848 ... OK

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.19.0-xilinx-v2019.2 (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP PREEMPT Wed Mar 18 19:40:12 UTC 2020
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: Analog Devices ADRV9361-Z7035 (Z7035/AD9361)
earlycon: cdns0 at MMIO 0xe0001000 (options '115200n8')
bootconsole [cdns0] enabled
Memory policy: Data cache writealloc
Ignoring RAM at 0x30000000-0x40000000
Consider using a HIGHMEM enabled kernel.
Reserved memory: created DMA memory pool at 0x3e800000, size 1 MiB
OF: reserved mem: initialized node rproc@3e800000, compatible id shared-dma-pool
cma: Reserved 128 MiB at 0x28000000
random: get_random_bytes called from start_kernel+0x9c/0x400 with crng_init=0
percpu: Embedded 16 pages/cpu @(ptrval) s33484 r8192 d23860 u65536
Built 1 zonelists, mobility grouping on. Total pages: 195072
Kernel command line: console=ttyPS0,115200 earlycon root=/dev/mmcblk0p2 rw rootwait
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 632336K/786432K available (7168K kernel code, 660K rwdata, 5620K rodata, 1024K init, 127K bss, 23024K reserved, 131072K cma-reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xf0800000 - 0xff800000 ( 240 MB)
lowmem : 0xc0000000 - 0xf0000000 ( 768 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0x(ptrval) - 0x(ptrval) (8160 kB)
.init : 0x(ptrval) - 0x(ptrval) (1024 kB)
.data : 0x(ptrval) - 0x(ptrval) ( 661 kB)
.bss : 0x(ptrval) - 0x(ptrval) ( 128 kB)
rcu: Preemptible hierarchical RCU implementation.
rcu: RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
Tasks RCU enabled.
rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
efuse mapped to (ptrval)
slcr mapped to (ptrval)
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
zynq_clock_init: clkc starts at (ptrval)
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
timer #0 at (ptrval), irq=17
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
CPU: Testing write buffer coherency: ok
CPU0: Spectre v2: using BPIALL workaround
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x100000 - 0x100060
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
CPU1: Spectre v2: using BPIALL workaround
smp: Brought up 1 node, 2 CPUs
SMP: Total of 2 processors activated (1333.33 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 3, 32768 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0x(ptrval)
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
▒console [ttyPS0] enabledt MMIO 0xe0001000 (irq = 25, base_baud = 6249999) is a xuartps
console [ttyPS0] enabled
bootconsole [cdns0] disabled
bootconsole [cdns0] disabled
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
videodev: Linux video capture interface: v2.00
jesd204: found 0 devices and 0 topologies
FPGA manager framework
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
workingset: timestamp_bits=30 max_order=18 bucket_order=0
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
brd: module loaded
loop: module loaded
Registered mathworks_ip class
mwipcore 43c00000.mwipcore: Dev memory resource found at (ptrval) 0000FFFF.
mwipcore 43c00000.mwipcore: 'mwipcore' device not found, creating
mwipcore 43c00000.mwipcore: Char dev region registered: major num:247
mwipcore 43c00000.mwipcore: 'mwipcore' device created
m25p80 spi1.0: SPI-NOR-UniqueID 104473aaae93001912001000203448e8a1
m25p80 spi1.0: n25q256a (32768 Kbytes)
6 fixed-partitions partitions found on MTD device spi1.0
Creating 6 MTD partitions on "spi1.0":
0x000000000000-0x0000000e0000 : "qspi-fsbl-uboot"
0x0000000e0000-0x000000100000 : "qspi-uboot-env"
0x000000100000-0x000000600000 : "qspi-linux"
0x000000600000-0x000000620000 : "qspi-device-tree"
0x000000620000-0x000001300000 : "qspi-rootfs"
0x000001300000-0x000002000000 : "qspi-bitstream"
MACsec IEEE 802.1AE
libphy: Fixed MDIO Bus: probed
tun: Universal TUN/TAP device driver, 1.6
libphy: MACB_mii_bus: probed
Marvell 88E1510 e000b000.ethernet-ffffffff:00: attached PHY driver [Marvell 88E1510] (mii_bus:phy_addr=e000b000.ethernet-ffffffff:00, irq=POLL)
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 28 (00:0a:35:00:1e:53)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver ftdi_sio
usbserial: USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver upd78f0730
usbserial: USB Serial support registered for upd78f0730
chipidea-usb2 e0002000.usb: e0002000.usb supply vbus not found, using dummy regulator
chipidea-usb2 e0002000.usb: Linked as a consumer to regulator.0
ULPI transceiver vendor/product ID 0x0424/0x0007
Found SMSC USB3320 ULPI transceiver.
ULPI integrity check: passed.
ci_hdrc ci_hdrc.0: EHCI Host Controller
ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
i2c /dev entries driver
at24 0-0050: 4096 byte 24c32 EEPROM, writable, 1 bytes/write
usbcore: registered new interface driver uvcvideo
USB Video Class driver (1.1.1)
gspca_main: v2.14.0 registered
cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at (ptrval) with timeout 10s
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on e0100000.mmc [e0100000.mmc] using ADMA
ledtrig-cpu: registered to indicate activity on CPUs
hidraw: raw HID events driver (C) Jiri Kosina
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
ad7291: probe of 0-002f failed with error -5
ad9361 spi0.0: ad9361_probe : enter (ad9361)
ad9361 spi0.0: No GPIOs defined for ext band ctrl
random: fast init done
mmc0: new high speed SDXC card at address 0001
mmcblk0: mmc0:0001 EC2QT 59.6 GiB
mmcblk0: p1 p2 p3
ad9361 spi0.0: ad9361_probe : AD936x Rev 2 successfully initialized
cf_axi_dds 79024000.cf-ad9361-dds-core-lpc: Analog Devices CF_AXI_DDS_DDS MASTER (9.01.b) at 0x79024000 mapped to 0x(ptrval), probed DDS AD9361
axi_sysid 45000000.axi-sysid-0: [adrv9361z7035] on [ccbob] git <0> dirty [2020-03-17 17:48:34] UTC
fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
NET: Registered protocol family 17
NET: Registered protocol family 36
Registering SWP/SWPB emulation handler
cf_axi_adc 79020000.cf-ad9361-lpc: ADI AIM (10.01.b) at 0x79020000 mapped to 0x(ptrval), probed ADC AD9361 as MASTER
input: gpio_keys as /devices/soc0/gpio_keys/input/input0
hctosys: unable to open rtc device (rtc0)
ALSA device list:
No soundcards found.
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) on device 179:2.
devtmpfs: mounted
Freeing unused kernel memory: 1024K
Run /sbin/init as init process
INIT: version 2.88 booting
Starting udev
udevd[1083]: starting version 3.2.5
random: udevd: uninitialized urandom read (16 bytes read)
random: udevd: uninitialized urandom read (16 bytes read)
random: udevd: uninitialized urandom read (16 bytes read)
udevd[1084]: starting eudev-3.2.5
remoteproc remoteproc0: remoteproc@0 is available
FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
hwclock: can't open '/dev/misc/rtc': No such file or directory
Tue Mar 24 09:15:27 UTC 2020
hwclock: can't open '/dev/misc/rtc': No such file or directory
urandom_read: 2 callbacks suppressed
random: dd: uninitialized urandom read (512 bytes read)
Configuring packages on first boot....
(This may take several minutes. Please do not power off the machine.)
Running postinst /etc/rpm-postinsts/100-sysvinit-inittab...
update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
Removing any system startup links for run-postinsts ...
/etc/rcS.d/S99run-postinsts
INIT: Entering runlevel: 5
Configuring network interfaces... udhcpc: started, v1.29.2
udhcpc: sending discover
udhcpc: sending discover
macb e000b000.ethernet eth0: link up (1000/Full)
udhcpc: sending discover
udhcpc: no lease, forking to background
done.
random: dbus-uuidgen: uninitialized urandom read (12 bytes read)
random: dbus-uuidgen: uninitialized urandom read (8 bytes read)
Starting system message bus: random: dbus-daemon: uninitialized urandom read (12 bytes read)
dbus.
Starting haveged: haveged: listening socket at 3
haveged: haveged starting up


Starting Dropbear SSH server: Generating 2048 bit rsa key, this may take a while...
haveged: haveged: ver: 1.9.4; arch: generic; vend: ; build: (gcc 8.2.0 CTV); collect: 128K

haveged: haveged: cpu: (VC); data: 16K (D); inst: 16K (D); idx: 12/40; sz: 15012/57848

haveged: haveged: tot tests(BA8): A:1/1 B:1/1 continuous tests(B): last entropy estimate 8.00308

haveged: haveged: fills: 0, generated: 0

random: crng init done
random: 1 urandom warning(s) missed due to ratelimiting

Public key portion is:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCQtDeN+Kojy16SRpR6xn62yZVAS9qb5h6F/k+OBnZaXQHWBtc70YqWGFYOH7r/ClpReId2FbZYV9RKBDfceZXPtdZfaujs8m9LIZPpQrzwRHFj1hB+7pKtIRaulnPxGPr2StJm4ropjlc3zkn5TtXoEvrZbD2JfOpbm4ETky8X6h2i4QqBkPrBRm+nLi7/uuxyWzerwfh4+yUCiSKNwQxbO0WFOWC9jQDkOfY2C9ocZCoNuhwhizPpyIm1kEe3cwbetZ2DXH6PwxmqUkdyADjUunr5DJWt3f0pAZEgni9EDCKlYdfOA81xrP4nyWC5ndG4CO/c4mGcXrY/dKaTZuQZ root@tlmEM56T
Fingerprint: sha1!! 40:44:33:5e:20:0e:fd:45:3b:cd:a2:7f:b8:6b:a3:d2:c8:5b:5c:ab
dropbear.
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting IIO Daemon: iiod
Starting internet superserver: inetd.
Starting syslogd/klogd: done
Starting tcf-agent: OK

root@tlmEM56T:~#
root@tlmEM56T:~# lsmod
Not tainted
zynq_remoteproc 16384 0 - Live 0xbf030000
remoteproc 32768 1 zynq_remoteproc, Live 0xbf021000
virtio_ring 20480 1 remoteproc, Live 0xbf018000
virtio 16384 1 remoteproc, Live 0xbf010000
uio_pdrv_genirq 16384 0 - Live 0xbf000000
root@tlmEM56T:~# echo image_echo_test > /sys/class/remoteproc/remoteproc0/firmware
root@tlmEM56T:~# echo start > /sys/class/remoteproc/remoteproc0/state
remoteproc remoteproc0: powering up remoteproc@0
remoteproc remoteproc0: Booting fw image image_echo_test, size 2702112
remoteproc remoteproc0: bad phdr da 0x3e000000 mem 0x1aefc
remoteproc remoteproc0: Failed to load program segments: -22
remoteproc remoteproc0: Boot failed: -22
-sh: echo: write error: Invalid argument
root@tlmEM56T:~#

0 Kudos
Highlighted
Visitor
Visitor
1,266 Views
Registered: ‎03-17-2020
I also tested changing enabling Kernel High Memory, and the result is the same
0 Kudos
Highlighted
Visitor
Visitor
1,245 Views
Registered: ‎03-17-2020

Sorry for the flow of messages, I'm trying to understand first what are errors on my side. I think the problem is that I'm using the kernel provided from Analog Devices since I'm using one of their boards. Unfortunately, theirr kernel is updated to 2019.1, I can see that when I look in Documentation zynq_remoteproc.txt which contains the old values .
So, do you suggest to revert back to Petalinux 2019.1? Unless AD updates their Kernel...

0 Kudos
Highlighted
Moderator
Moderator
1,243 Views
Registered: ‎05-10-2017

Hi,

Yes. You should use 2019.2 xilinx kernel. The remoteproc and rpmsg driver had some changes that went in to 2019.2

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor
Visitor
1,201 Views
Registered: ‎03-17-2020

Hello,

sorry to write again but it seems I cannot resolve this issue.

I rolled back to Petalinux 2019.1, since as I said the Analog Devices  Kernel is updated to that version. Doing this, I'm coming back to the original error:

root@EM56T20191:~# echo image_echo_test > /sys/class/remoteproc/remoteproc0/firmware
root@EM56T20191:~# echo start > /sys/class/remoteproc/remoteproc0/state
remoteproc remoteproc0: powering up remoteproc@0
remoteproc remoteproc0: Booting fw image image_echo_test, size 2687104
Starting application...
Successfully intialize remoteproc.
Initialize remoteproc successfully.
creating remoteproc virtio

remoteproc remoteproc0: remote processor remoteproc@0 is now up
root@EM56T20191:~# virtio_rpmsg_bus virtio0: rpmsg host is online
initializing rpmsg vdev
initializing rpmsg vdev
Try to create rpmsg endpoint.
ERROR: Failed to create endpoint.
Stopping application...

I attach the dts file (from system.dtb) and the boot log. Could you please have a look at them and give me an hint on what could be the issue?

Thank you very much

 

0 Kudos
Highlighted
Visitor
Visitor
1,166 Views
Registered: ‎03-17-2020

I tried to put some traces in bare metal application (echo test derived):

root@EM56T20191:/dev# echo start > /sys/class/remoteproc/remoteproc0/state
remoteproc remoteproc0: powering up remoteproc@0
remoteproc remoteproc0: Booting fw image myEcho.elf, size 2700284
Starting application...
Successfully intialize remoteproc.
remoteproc_mmap mem 0
metal_io_phys_to_virt 0x3E208728 0x3E100000
metal_io_phys_to_offset phys_to_offset 0x0
remoteproc_mmap mem 0
metal_io_phys_to_virt 0x3E2087A8 0x3E800000
metal_io_phys_to_offset phys_to_offset 0x0
Initialize remoteproc successfully.
metal_io_phys_to_virt 0x3E2087A8 0x3E880000
metal_io_phys_to_offset phys_to_offset 0x0
creating remoteproc virtio
remoteproc_mmap mem 0
metal_io_phys_to_virt 0x3E2089A0 0x36048000
metal_io_phys_to_offset phys_to_offset 0x0
remoteproc_mmap mem 0
metal_io_phys_to_virt 0x3E208A20 0x3604C000
metal_io_phys_to_offset phys_to_offset 0x0
initializing rpmsg vdev
initializing rpmsg vdev
Try to create rpmsg endpoint.
rpmsg_create_ept 1 status 0
rpmsg_virtio_send_offchannel_raw 1 vdev 0x3E208878 rvq 0x3E208928 svq 0x3E2088F0 metale re 0x3E2087A8 size 524288 shm 0x0
rpmsg_virtio_send_offchannel_raw 1 40 496
rpmsg_virtio_get_tx_buffer
virtqueue_get_available_buffer 1 0 256 free 256 queued 0
virtqueue_get_available_buffer 2 head 0x0
virtqueue_get_available_buffer 3 shm 0x3E2087A8
virtqueue_get_available_buffer 4 addr 1 0x36080000
virtqueue_get_available_buffer 5 addr 2 0x36080200
rpmsg_virtio_send_offchannel_raw 2 buffer 0x0 len 512 idx 0
rpmsg_create_ept 2 status -2005
ERROR: Failed to create endpoint -2005.
Stopping application...
remoteproc remoteproc0: registered virtio0 (type 7)
remoteproc remoteproc0: remote processor remoteproc@0 is now up
root@EM56T20191:/dev#

 

I see some addesses in the range 0x36080000, it seems that the 512 bytes buffers are in that range,  but the bare metal application cannot  access them.

In boot log I see:

cma: Reserved 128 MiB at 0x36000000

 

Could this be an issue? Any advice would be greatly appreciated

0 Kudos
Highlighted
Moderator
Moderator
1,152 Views
Registered: ‎05-10-2017

Hi.

So there were issues with the zynqMP AMP examples for 2019.1 since we moved to using rpmsg_char driver which were fixed in 2019.2 which I why I was suggesting if you could use 2019.2. Or you could go back to the 2018.2 version in which we were using rpmsg_user_dev_driver. 

If you still need to use 2019.1 version, my suggestion would be to get the kernel driver updates for rpmsg and remoteproc from 2019.2 to use with 2019.1.

Hope this helps.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor
Visitor
1,118 Views
Registered: ‎03-17-2020

Sorry, I'm not using zynqMP, there are a lot of examples about that. The title of this issues says "not zynqMP".

Anyway, correct me if I'm wrong: my issue is when i try to make the bare metal application run, I cannot create an endpoint. The rpmsg_char driver should come after that, it's an app on Linux side, I cannot even get there.

It seems that when in bare metal app I try to get a rpmsg TX buffer I get a METAL_BAD_OFFSET from "metal_io_phys_to_offset ".

0 Kudos
Highlighted
Visitor
Visitor
1,044 Views
Registered: ‎03-17-2020

I didi not solve the issue with Petalinux 2019.1.

Since I cannot go to 2019.2, I switched to 2018.2 and it seems to be working now.

 

View solution in original post

0 Kudos