diff options
author | Till Straumann <strauman@slac.stanford.edu> | 2007-11-14 05:19:59 +0000 |
---|---|---|
committer | Till Straumann <strauman@slac.stanford.edu> | 2007-11-14 05:19:59 +0000 |
commit | 61c98010e6e0c34f174c959ec2a7477a9b5f4ed5 (patch) | |
tree | a74568e01b1a1d8bc6a7bb139b7d554689149e3a /cpukit/score/cpu | |
parent | 2007-11-13 Till Straumann <strauman@slac.stanford.edu> (diff) | |
download | rtems-61c98010e6e0c34f174c959ec2a7477a9b5f4ed5.tar.bz2 |
2007-11-13 Till Straumann <strauman@slac.stanford.edu>
* rtems/score/powerpc.h: Added a '__ppc_generic' CPU variant.
The goal would be making cpukit and hopefully libcpu work
for all (or at least most) CPUs/BSPs with -D__ppc_generic so
that eventually all tests [#if defined(<cpu_flavor>)] for CPU
flavors can be eliminated.
Diffstat (limited to 'cpukit/score/cpu')
-rw-r--r-- | cpukit/score/cpu/powerpc/ChangeLog | 8 | ||||
-rw-r--r-- | cpukit/score/cpu/powerpc/rtems/score/powerpc.h | 20 |
2 files changed, 25 insertions, 3 deletions
diff --git a/cpukit/score/cpu/powerpc/ChangeLog b/cpukit/score/cpu/powerpc/ChangeLog index e1a9ef0c4a..7ae0910fbd 100644 --- a/cpukit/score/cpu/powerpc/ChangeLog +++ b/cpukit/score/cpu/powerpc/ChangeLog @@ -1,5 +1,13 @@ 2007-11-13 Till Straumann <strauman@slac.stanford.edu> + * rtems/score/powerpc.h: Added a '__ppc_generic' CPU variant. + The goal would be making cpukit and hopefully libcpu work + for all (or at least most) CPUs/BSPs with -D__ppc_generic so + that eventually all tests [#if defined(<cpu_flavor>)] for CPU + flavors can be eliminated. + +2007-11-13 Till Straumann <strauman@slac.stanford.edu> + * rtems/powerpc/registers.h: Added SPR definitions for BookE DECAR, TCR, TSR. diff --git a/cpukit/score/cpu/powerpc/rtems/score/powerpc.h b/cpukit/score/cpu/powerpc/rtems/score/powerpc.h index 7de8cc5d49..29a2a2a70d 100644 --- a/cpukit/score/cpu/powerpc/rtems/score/powerpc.h +++ b/cpukit/score/cpu/powerpc/rtems/score/powerpc.h @@ -218,10 +218,24 @@ extern "C" { #define PPC_ALIGNMENT 8 #define PPC_CACHE_ALIGNMENT 32 #define PPC_INTERRUPT_MAX 125 +#elif defined(__ppc_generic) + +/* Generic ppc */ + +#ifdef _SOFT_FLOAT +#define CPU_MODEL_NAME "PowerPC Generic (no FPU)" +#elif defined(__NO_FPRS__) +#define CPU_MODEL_NAME "PowerPC Generic (E500/float-gprs)" #else - +#define CPU_MODEL_NAME "PowerPC Generic" +#endif + +#define PPC_ALIGNMENT 8 + +#else + #error "Unsupported CPU Model" - + #endif /* @@ -300,7 +314,7 @@ extern "C" { */ #ifndef PPC_HAS_FPU -#ifdef _SOFT_FLOAT +#if defined(_SOFT_FLOAT) || defined(__NO_FPRS__) /* e500 has unified integer/FP registers */ #define PPC_HAS_FPU 0 #else #define PPC_HAS_FPU 1 |