devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Simek <monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
To: Ohad Ben-Cohen <ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	John Williams
	<john.williams-g5w7nrANp4BDPfheJLI6IQ@public.gmane.org>,
	"Grosen, Mark" <mgrosen-l0cyMroinI0@public.gmane.org>,
	linux-arm
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: remoteproc: Load coprocessor code to the specific main memory location
Date: Thu, 16 Feb 2012 14:07:57 +0100	[thread overview]
Message-ID: <4F3CFFAD.9030402@monstr.eu> (raw)
In-Reply-To: <CAK=WgbaRF-L7M3VMZQdqFLUFOJuwFVkBH1hUNuJ51kSrzkaVjA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Ohad Ben-Cohen wrote:
> On Thu, Feb 16, 2012 at 10:12 AM, Michal Simek <monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org> wrote:
>> I should be more specific. Can you point me to remoteproc code which publish
>> remote service based on them Linux rpmsg driver will be probed? It is rtos
>> part of code.
>> In your ELCE presentation is called rpmsg-client-sample service.
> 
> Sorry for the late response (I'm in ELC).
> 
> Yes, use the client sample (which is part of the submitted patch set)
> and not the omx/server samples (which are public, but were never
> submitted nor cleaned up).

Client sample is clear because it is probed when services are published.

> 
> The channels are created dynamically: the rpmsg bus designates address
> 53 for a name service, which listens to channel creation/removal
> announcements coming from the remote processor. Take a look in
> virtio_rpmsg_bus.c and you'll immediately see it.

I see that values but I can't see how rtos should send that messages.

Have checked both vrings - one for rx and one for tx. They are
initialized correctly on addresses I like.

(gdb) x /80x 0xe1100000
0xe1100000:     0x31140000      0x00000000      0x00000200      0x00010002
0xe1100010:     0x31140200      0x00000000      0x00000200      0x00020002
0xe1100020:     0x31140400      0x00000000      0x00000200      0x00030002
0xe1100030:     0x31140600      0x00000000      0x00000200      0x00040002
0xe1100040:     0x31140800      0x00000000      0x00000200      0x00050002

(gdb) x /80x 0xe1104000
0xe1104000:     0x00000000      0x00000000      0x00000000      0x00010000
0xe1104010:     0x00000000      0x00000000      0x00000000      0x00020000
0xe1104020:     0x00000000      0x00000000      0x00000000      0x00030000
0xe1104030:     0x00000000      0x00000000      0x00000000      0x00040000
0xe1104040:     0x00000000      0x00000000      0x00000000      0x00050000
0xe1104050:     0x00000000      0x00000000      0x00000000      0x00060000
0xe1104060:     0x00000000      0x00000000      0x00000000      0x00070000



rtos can handle kick from Linux
Linux is able to catch kick from freertos and run rproc_vg_interrupt

 From code I see that in rpmsg_probe function is virtqueue_kick which means sending
kick to rtos. Then rtos can send the message.


Above is condition "if (virtio_has_feature(vdev, VIRTIO_RPMSG_F_NS))" which is failing for me.
Not sure if is correct.

I am still not sure how to propagate that messages from rtos side.
In TI software it is in NameMap.c file which calls MessageQCopy_send function with address 53(which fits).
If I look at that function you copy data to msg->payload, setup data length, dstAddr is 53, srcAddr is don't know yet,
flag is 0, reserverd is 0 then you call VirtQueue_addUsedBuf and kick.

How does look like that structure for vring channels? It is probably mapped any structure. Can you point me which one?
Channel description is rpmsg_channel_info struct.

Thanks,
Michal





-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

  parent reply	other threads:[~2012-02-16 13:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4F1EE861.4030405@monstr.eu>
     [not found] ` <CAK=Wgba5kT8AwLtuHyosucYnWf-EA+xpE1kzmssfhSC7ZXQA=g@mail.gmail.com>
     [not found]   ` <4F1FF870.3000105@monstr.eu>
     [not found]     ` <CAK=WgbZwaxMPsMiNcq5yFvBLrcODqGgDT6b=mmQ91JBVtTEyXA@mail.gmail.com>
2012-01-25 14:19       ` remoteproc: Load coprocessor code to the specific main memory location Michal Simek
     [not found]         ` <4F200F64.9060203-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
2012-01-25 16:24           ` Ohad Ben-Cohen
2012-01-26 10:44             ` Michal Simek
     [not found]               ` <4F212E9E.9060807-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
2012-01-27 10:06                 ` Michal Simek
2012-01-27 11:38                 ` Ohad Ben-Cohen
2012-02-13 14:20                   ` Michal Simek
2012-02-14 16:28                     ` Ohad Ben-Cohen
2012-02-15 12:47                       ` Michal Simek
     [not found]                         ` <4F3BA962.9040109-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
2012-02-15 14:36                           ` Michal Simek
2012-02-16  9:12                             ` Michal Simek
2012-02-16 11:28                               ` Ohad Ben-Cohen
     [not found]                                 ` <CAK=WgbaRF-L7M3VMZQdqFLUFOJuwFVkBH1hUNuJ51kSrzkaVjA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-16 13:07                                   ` Michal Simek [this message]
2012-02-16 13:22                                     ` Michal Simek
2012-02-16 17:34                                       ` Ohad Ben-Cohen
     [not found]                                         ` <CAK=WgbZ3oXc+NQscdShqmu2wkzv=M-qBDCH2-k=5qSRX9W=z3Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-16 20:21                                           ` Michal Simek
2012-02-17  1:55                                             ` Ohad Ben-Cohen
2012-02-20 14:22                                               ` Michal Simek
2012-02-20 20:11                                                 ` Ohad Ben-Cohen
2012-02-22 12:10                                                   ` Michal Simek
2012-02-22 12:59                                                     ` Ohad Ben-Cohen
2012-03-06 15:22                                                       ` Michal Simek
2012-03-06 16:26                                                         ` Ohad Ben-Cohen
2012-02-16 17:27                                     ` Ohad Ben-Cohen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F3CFFAD.9030402@monstr.eu \
    --to=monstr-psz03upnqpehxe+lvdladg@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=john.williams-g5w7nrANp4BDPfheJLI6IQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mgrosen-l0cyMroinI0@public.gmane.org \
    --cc=ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).