devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Simek <monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
To: LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Ohad Ben-Cohen <ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@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: Fri, 27 Jan 2012 11:06:19 +0100	[thread overview]
Message-ID: <4F22771B.3030402@monstr.eu> (raw)
In-Reply-To: <4F212E9E.9060807-pSz03upnqPeHXe+LvDLADg@public.gmane.org>

Michal Simek wrote:
> Ohad Ben-Cohen wrote:
>> On Wed, Jan 25, 2012 at 4:19 PM, Michal Simek <monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org> wrote:
>>> I started with pur vanilla kernel and patches from your tree
>>> git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc.git
>>> for-next branch
>>> but then I had to moved to for-next-acked-merged because in the origin
>>> one were some problems.
>>
>> Unlike for-next-acked-merged, the other branches aren't rebased and
>> therefore have merge conflicts with 3.3 material; that's intentional.
>>
>>> Do you have any kernel tree with CMA just for sure?
>>
>> Not a 3.3-based one, so I recommend you to just merge Marek's branch 
>> directly.
>>
>> I'll soon create a full-fledged 3.3 branch though, so you may want to
>> wait a bit until I get to it.
> 
> I have done it and tested. It works as expected. Thanks.
> I have created region at phys addr 0x10000000 with selected size.
> I had to move carveout in resource table to be first in this area.
> Also removed that copying from kick function.
> 
> 
> 
> I have one small problem which is that physical address is 0x10000000
> which means that firmware entry point is the same.
> In rproc_load_segments is da composed from phdr->p_paddr which is 
> 0x10000000.
> And code is designed that this load addr is offset.
> 
> Here is the code:
>     /* go through the available ELF segments */
>     for (i = 0; i < ehdr->e_phnum; i++, phdr++) {
>         u32 da = phdr->p_paddr; // OFFSET 0x10000000
>         u32 memsz = phdr->p_memsz;
> 
> But for my case is physical address correct and it is not offset 
> 0x10000000.
> I have created temporary fix which substract virtual address to get 
> correct da.
> 
> u32 da = phdr->p_paddr - phdr->p_vaddr;
> 
> What should be correct solution?

Just follow up. I have find out that moving to 0x10000000 offset will be problematic
because there must be vector table at 0x0. IIUC Linux remaps reset vectors to 0xffff0000 offset
through cp15 reg in bootup code.

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-01-27 10:06 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 [this message]
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
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=4F22771B.3030402@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).