From: Tirumala Marri <tmarri@apm.com>
To: Suzuki Poulose <suzuki@in.ibm.com>
Cc: monstr@monstr.eu, John Williams <john.williams@petalogix.com>,
linuxppc-dev@ozlabs.org
Subject: Re: Relocatable kernel for ppc44x
Date: Wed, 15 Jun 2011 09:02:21 -0700 [thread overview]
Message-ID: <BANLkTimR95gM_w07=7L5h1E03nPPQYdJ6w@mail.gmail.com> (raw)
In-Reply-To: <4DF8C453.70500@in.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2194 bytes --]
On Wed, Jun 15, 2011 at 7:40 AM, Suzuki Poulose <suzuki@in.ibm.com> wrote:
> On 06/15/11 15:41, Benjamin Herrenschmidt wrote:
>
>> On Wed, 2011-06-15 at 11:43 +0530, Suzuki Poulose wrote:
>>
>>> On 06/14/11 17:34, Michal Simek wrote:
>>>
>>>> Hi,
>>>>
>>>> have someone tried to support RELOCATABLE kernel on ppc44x?
>>>>
>>> As Josh, mentioned, I will be working on this. In fact I was trying a
>>> couple of
>>> patches towards this on PPC440x. But, I am stuck in debugging the hang
>>> that I am
>>> experiencing with the changes. I am setting up a RISCWatch processor
>>> probe to
>>> debug the same.
>>>
>>> Here is some information that I wanted to share :
>>>
>>> The PPC440X currently uses 256M TLB entries to pin the lowmem. When we go
>>> for a
>>> relocatable kernel we have to :
>>>
>>> 1) Restrict the kernel load address to be 256M aligned
>>>
>>
>> Wait a minute ... :-)
>>
>> There's a difference between having the kernel run from any address and
>> mapping the linear mapping not starting at 0.
>>
>> Those are completely orthogonal.
>>
>> I don't see why off hand you are changing the way the TLB is used.
>>
>
> I started off with PHYSICAL_START support and that kind of hogged me into
> this approach :-).
>
> The
>
>> only possible change needed is to make sure the initial bolted entry set
>> by the asm code properly covers the kernel in whatever it's "current"
>> location is. The rest is a matter of fixing up the relocations...
>>
> Could we do something like,
>
> If kernel is loaded at X,
>
> 1. map : ((X-1) & ~256M) to PAGE_OFFSET and so on to cover the kernel in
> 256M
> chunks.
> 2. Then process the relocations with (X % 256M)
>
> Thanks
>
> [marri] I had to deal with kernel relocation to non-zero physical address.
I hacked
few places to make this work. In my case there were holes(mutliple of 250MB)
in
the low-memory region. To handle these memory holes I manipulated "lmb"
structure.
I had to depend on the bootloader making sure that it is running from
non-zero
physical address and during linux boot it checks for the current TLB where
it is
running from and creates the same new TLB in linux. And everything else
should
take care of it.
--marri
[-- Attachment #2: Type: text/html, Size: 3212 bytes --]
next prev parent reply other threads:[~2011-06-15 16:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-14 12:04 Relocatable kernel for ppc44x Michal Simek
2011-06-14 12:16 ` Josh Boyer
2011-06-15 6:13 ` Suzuki Poulose
2011-06-15 9:30 ` David Laight
2011-06-15 9:38 ` John Williams
2011-06-15 10:14 ` Benjamin Herrenschmidt
2011-06-15 10:11 ` Benjamin Herrenschmidt
2011-06-15 14:40 ` Suzuki Poulose
2011-06-15 16:02 ` Tirumala Marri [this message]
2011-06-15 19:47 ` Scott Wood
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='BANLkTimR95gM_w07=7L5h1E03nPPQYdJ6w@mail.gmail.com' \
--to=tmarri@apm.com \
--cc=john.williams@petalogix.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=monstr@monstr.eu \
--cc=suzuki@in.ibm.com \
/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).