Re: ppc manual paging question

2007-10-26 Thread Wang, Baojun
On Monday 22 October 2007 16:04:14, Benjamin Herrenschmidt wrote: > > Yup, I've found how does the kernel handle tlbs, I think the most > > important thing is I forgot read/write the SPRN_SPRG3 register as _switch > > does. > > SPRG3 is for use by the operating system for whatever you want... if yo

Re: ppc manual paging question

2007-10-22 Thread Benjamin Herrenschmidt
> Yup, I've found how does the kernel handle tlbs, I think the most important > thing is I forgot read/write the SPRN_SPRG3 register as _switch does. SPRG3 is for use by the operating system for whatever you want... if you are copying linux code, then you probably indeed want to get that right b

Re: [Rtlinuxgpl] ppc manual paging question

2007-10-22 Thread Nicholas Mc Guire
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > OK, Shall I look for the DataTLBError code in head.S? I realized that I've got > DataTLBError sometimes via BDI2000/kgdb (the fault address is within > DataTLBError), Shall I should also look for arch/ppc/mm/fault.c? > if you end up in fault.c (via c

Re: ppc manual paging question

2007-10-22 Thread Wang, Baojun
On Monday 22 October 2007 15:34:24, Benjamin Herrenschmidt wrote: > > Sorry I didn't realized that. I've finished looking pem64b.pdf, but it's > > almost nothing like in ppc 4xx/44x. > > You'll have to get yourself a 44x manual :-) > > > > It's a software loaded TLB, you'll have to put translations

Re: ppc manual paging question

2007-10-22 Thread Benjamin Herrenschmidt
> Sorry I didn't realized that. I've finished looking pem64b.pdf, but it's > almost nothing like in ppc 4xx/44x. You'll have to get yourself a 44x manual :-) > > 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 f

Re: ppc manual paging question

2007-10-21 Thread Wang, Baojun
On Monday 22 October 2007 14:01:33, Benjamin Herrenschmidt wrote: > > 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 > > rea

Re: ppc manual paging question

2007-10-21 Thread Benjamin Herrenschmidt
> 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

Re: ppc manual paging question

2007-10-21 Thread Wang, Baojun
On Monday 22 October 2007 12:50:52, Benjamin Herrenschmidt wrote: > On Mon, 2007-10-22 at 12:03 +0800, Wang, Baojun wrote: > > hi, > > > > I've got some qeustion about ppc(ppc44x) paging: > > > > how can I manually map a virtual address to a physical address through a > > specific pgd? How does p

Re: ppc manual paging question

2007-10-21 Thread Benjamin Herrenschmidt
On Mon, 2007-10-22 at 12:03 +0800, Wang, Baojun wrote: > hi, > > I've got some qeustion about ppc(ppc44x) paging: > > how can I manually map a virtual address to a physical address through a > specific pgd? How does ppc translate virt address to physical one? I think > besides from tlb, the

Re: ppc manual paging question

2007-10-21 Thread Nicholas Mc Guire
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > > I've got some qeustion about ppc(ppc44x) paging: > > how can I manually map a virtual address to a physical address through a > specific pgd? How does ppc translate virt address to physical one? I think > besides from tlb, the CPU will search the

ppc manual paging question

2007-10-21 Thread Wang, Baojun
hi, I've got some qeustion about ppc(ppc44x) paging: how can I manually map a virtual address to a physical address through a specific pgd? How does ppc translate virt address to physical one? I think besides from tlb, the CPU will search the page table entries via the pgd, can I alter the