Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Separating PowerPC 4xx and 6xx arch-specific code



Folks,

We (Wasabi) are working on a port to a 4xx series PowerPC board, and in
the interests of sharing as much code as possible between the 4xx family
and the 6xx/7xx family I'd like to propose adding some new kernel config
options.  What I'm thinking of is:

 + Adding to the kernel config file(s):

        options         ARCH_4xx        # PowerPC 400 family
        options         ARCH_6xx        # PowerPC 600/700 family 

 + Defopt'ing these in files.powerpc as

        defopt  opt_arch.h      ARCH_4xx ARCH_6xx

 + Any code that needs to make architectural decisions does

        #include "opt_arch.h"

   and

        #ifdef ARCH_4xx
        ...
        #endif

        #ifdef ARCH_6xx
        ...
        #endif

I guess technically the 600/700 family name could be "ARCH_6xx_7xx" but
that's starting to get unwieldy.  Another option is PPC_4xx and PPC_6xx.

Any comments?

Simon.
--
Simon Burge                            <simonb%wasabisystems.com@localhost>
NetBSD CDs, Support and Service:    http://www.wasabisystems.com/



Home | Main Index | Thread Index | Old Index