All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Wang, Baojun" <wangbj@lzu.edu.cn>
Cc: linuxppc-dev@ozlabs.org, rtlinuxgpl@upv.es,
	Miguel Masmano <mimastel@doctor.upv.es>
Subject: Re: ppc manual paging question
Date: Mon, 22 Oct 2007 16:01:33 +1000	[thread overview]
Message-ID: <1193032893.6745.60.camel@pasglop> (raw)
In-Reply-To: <200710221350.31688.wangbj@lzu.edu.cn>


> I'm porting an adeos nano kernel named xtratum (http://www.xtratum.org) from 
> x86 to ppc, I think I'm near the ending except the above problem. xtratum is 
> doing things like xen but it's much simpler (it's aimed for realtime), it 
> need provides memory space sperations for it's domains, so I need manually 
> paging. Each domain is loaded by a userspace program (instead of the root 
> domain as a kernel module), the loader will load the domain's (ELF staticly 
> excutable) PT_LOAD section into memory, and then raise a properly system call 
> (passing the structurized loaded data as arguments) to load the domain via 
> load_domain_sys(), and at the last step of loading the domain, xtratum will 
> jump to the entry code of the new domain(asm wrappered start() routine) and 
> then everything should be fine. The problem now is as follow:
> 
> under my ppc (440GR/440EP) platform, start() is always at 0x100000a0, but I 
> guess there is something wrong with my mm code so after the domain is loaded, 
> the virt addres 0x100000a0 just point to garbage instead of the right start() 
> routine. So how can I setup paging properly so that the virtual memory could 
> be translated to proper data?

Are you aware that the 440 MMU doesn't actually know what a page table
is and doesn't load PTEs from memory ?

It's a software loaded TLB, you'll have to put translations in the TLB
yourself. You'll need to design your own data structures for that, tho
you can use a page table for tracking, like we do in linux, and then
have your own TLB miss handler to fill the TLB from that.

Your initial code probably need to bolt a TLB entry for the kernel
itself.

Ben.

  parent reply	other threads:[~2007-10-22  6:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-22  4:03 ppc manual paging question Wang, Baojun
2007-10-22  4:03 ` Wang, Baojun
2007-10-22  4:40   ` Nicholas Mc Guire
2007-10-22  4:50 ` Benjamin Herrenschmidt
     [not found] ` <393029235.18964@lzu.edu.cn>
2007-10-22  5:50   ` Wang, Baojun
2007-10-22  5:50     ` Wang, Baojun
2007-10-22  6:01     ` Benjamin Herrenschmidt [this message]
     [not found]     ` <393033430.04221@lzu.edu.cn>
2007-10-22  6:17       ` Wang, Baojun
2007-10-22  6:17         ` Wang, Baojun
2007-10-22  7:53           ` [Rtlinuxgpl] " Nicholas Mc Guire
2007-10-22  7:34         ` Benjamin Herrenschmidt
     [not found]         ` <393039004.29574@lzu.edu.cn>
2007-10-22  7:42           ` Wang, Baojun
2007-10-22  7:42             ` Wang, Baojun
2007-10-22  8:04             ` Benjamin Herrenschmidt
     [not found]             ` <393040796.08064@lzu.edu.cn>
2007-10-26  9:50               ` Wang, Baojun
2007-10-26  9:50                 ` Wang, Baojun

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=1193032893.6745.60.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mimastel@doctor.upv.es \
    --cc=rtlinuxgpl@upv.es \
    --cc=wangbj@lzu.edu.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.