diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-12-29 09:51:18 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-12-29 09:51:18 +0000 |
commit | 644448f8401368d0614bc4e296e966031a97bef4 (patch) | |
tree | 69649eab626c36d2885bf0aaf77c619dcadceb06 /c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h | |
parent | 2010-12-29 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff) | |
download | rtems-644448f8401368d0614bc4e296e966031a97bef4.tar.bz2 |
2010-12-29 Sebastian Huber <sebastian.huber@embedded-brains.de>
* shared/include/cpuIdent.c, shared/include/cpuIdent.h: Added support
for e500v2. Removed IVPR/IVOR/HWIVOR features since they are included
in Book E.
* new-exceptions/bspsupport/vectors.h,
new-exceptions/bspsupport/ppc_exc.S,
new-exceptions/bspsupport/ppc_exc_address.c,
new-exceptions/bspsupport/ppc_exc_categories.c,
new-exceptions/bspsupport/ppc_exc_initialize.c,
new-exceptions/bspsupport/ppc_exc_prologue.c: Added support for
e500v2. Added exception vector defines for Book E types. Removed
e200 exception vector defines. Added e500 exception vector defines.
Unified IVOR calculation for e200 and e500 (e200z1 has hard wired
IVOR values).
Diffstat (limited to 'c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h')
-rw-r--r-- | c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h index 0e64af84e2..dd48f1640f 100644 --- a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h +++ b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h @@ -51,6 +51,7 @@ typedef enum PPC_8240 = PPC_8260, PPC_8245 = 0x8081, PPC_8540 = 0x8020, + PPC_e500v2 = 0x8021, PPC_603le = 0x8082, /* 603le core, in MGT5100 and MPC5200 */ PPC_e300c1 = 0x8083, /* e300c1 core, in MPC83xx*/ PPC_e300c2 = 0x8084, /* e300c2 core */ @@ -82,9 +83,6 @@ typedef struct { unsigned has_8_bats : 1; unsigned has_epic : 1; unsigned has_shadowed_gprs : 1; - unsigned has_ivpr : 1; - unsigned has_ivor : 1; - unsigned has_hwivor : 1; } ppc_feature_t; extern ppc_feature_t current_ppc_features; @@ -113,32 +111,34 @@ _PPC_FEAT_DECL(is_60x) _PPC_FEAT_DECL(has_8_bats) _PPC_FEAT_DECL(has_epic) _PPC_FEAT_DECL(has_shadowed_gprs) -_PPC_FEAT_DECL(has_ivpr) -_PPC_FEAT_DECL(has_ivor) -_PPC_FEAT_DECL(has_hwivor) #undef _PPC_FEAT_DECL -static inline unsigned ppc_cpu_has_ivpr_and_ivor() { \ - return ppc_cpu_has_ivpr() - && (ppc_cpu_has_ivor() || ppc_cpu_has_hwivor()); -} - static inline ppc_cpu_id_t ppc_cpu_current(void) { return current_ppc_cpu; } +static inline bool ppc_cpu_is_e200() +{ + return ppc_cpu_current() == PPC_e200z0 + || ppc_cpu_current() == PPC_e200z1 + || ppc_cpu_current() == PPC_e200z6; +} + static inline bool ppc_cpu_is_e300() { - if (ppc_cpu_current() == PPC_UNKNOWN) { - get_ppc_cpu_type(); - } return ppc_cpu_current() == PPC_e300c1 || ppc_cpu_current() == PPC_e300c2 || ppc_cpu_current() == PPC_e300c3; } +static inline bool ppc_cpu_is_e500() +{ + return ppc_cpu_current() == PPC_8540 + || ppc_cpu_current() == PPC_e500v2; +} + static inline bool ppc_cpu_is(ppc_cpu_id_t cpu) { return ppc_cpu_current() == cpu; |