summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h
diff options
context:
space:
mode:
authorThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2008-07-11 10:02:12 +0000
committerThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2008-07-11 10:02:12 +0000
commit25a92bc1ed79b0eb5967fa454220ea90810c7ebb (patch)
tree1f1986de2e9d38bf3514284fc37c2f3d84c3e4d2 /c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h
parentadapted powerpc BSPs to new exception code (diff)
downloadrtems-25a92bc1ed79b0eb5967fa454220ea90810c7ebb.tar.bz2
adapted powerpc exception code
Diffstat (limited to 'c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h')
-rw-r--r--c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h
index 9166e91302..2ee0ca0709 100644
--- a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h
+++ b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h
@@ -16,6 +16,8 @@
#ifndef _LIBCPU_CPUIDENT_H
#define _LIBCPU_CPUIDENT_H
+#include <stdbool.h>
+
#ifndef ASM
typedef enum
{
@@ -44,6 +46,7 @@ typedef enum
PPC_e300c1 = 0x8083, /* e300c1 core, in MPC83xx*/
PPC_e300c2 = 0x8084, /* e300c2 core */
PPC_e300c3 = 0x8085, /* e300c3 core */
+ PPC_e200z6 = 0x8115,
PPC_PSIM = 0xfffe, /* GDB PowerPC simulator -- fake version */
PPC_UNKNOWN = 0xffff
} ppc_cpu_id_t;
@@ -67,6 +70,7 @@ typedef struct {
unsigned has_8_bats : 1;
unsigned has_epic : 1;
unsigned has_shadowed_gprs : 1;
+ unsigned has_ivpr_and_ivor : 1;
} ppc_feature_t;
extern ppc_feature_t current_ppc_features;
@@ -81,7 +85,7 @@ extern ppc_cpu_revision_t current_ppc_revision;
/* PUBLIC ACCESS ROUTINES */
#define _PPC_FEAT_DECL(x) \
-static inline ppc_cpu_##x() { \
+static inline unsigned ppc_cpu_##x() { \
if ( PPC_UNKNOWN == current_ppc_cpu ) \
get_ppc_cpu_type(); \
return current_ppc_features.x; \
@@ -95,6 +99,17 @@ _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_and_ivor)
+
+static inline bool ppc_cpu_is_e300()
+{
+ if (current_ppc_cpu == PPC_UNKNOWN) {
+ get_ppc_cpu_type();
+ }
+ return current_ppc_cpu == PPC_e300c1
+ || current_ppc_cpu == PPC_e300c2
+ || current_ppc_cpu == PPC_e300c3;
+}
#undef _PPC_FEAT_DECL
#endif /* ASM */