[PATCH] powerpc: merged asm/cputable.h

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Sep 27 09:38:43 EST 2005

> At the end of the day we should have the same init path for  
> everything.  We have to deal with the fact that some processors are  
> not going to have "real mode" to run in.  Anything Book-E 32 or 64- 
> bit is going to fall into this case.

I know, and real mode isn't necessarily useable on others, my point was,
there is this "pre-mmu-init" phase when we run into a kind of reduced
mmu environment but no need to use RELOC's or -mrelocatable. That is:

 - on ppc64, real mode
 - on CONFIG_6xx, memory mapped by BATs over first 16M or so
 - on others, typically, bolted TLB entries during early asm

This "pre-init" phase has common characteristics, that is

 - we can run code without reloc's as explained above
 - we can't access much memory above kernel text/data. on ppc64, it
ranges from all memory (lucky) to the limit of the RMO on lpar which
tend to get smaller. In fact, pSeries might even lose real mode sooner
or later and get into a similar "bolted initial mapping" case.

This is when early_setup() is run on ppc64. This is when machine_init()
and MMU_init() are called on ppc32. Those do fundamentally the same
thing. Some pre-init, typically based on device-tree bits & pieces, and
choosing the "right" ppc_md. They could be merged to look like the ppc64
version. The main issue is that ppc32 does a bit too much there (like
finish_device_tree which should be done later like ppc64). There is bits
& pieces there that should be moved around a bit, including in platform
code (ppc_md.probe() should replace {pmac,chrp,...}_init() for example).


More information about the Linuxppc-dev mailing list