[rtems commit] bsps/powerpc: Add and use ppc_cpu_is_specific_e200
Sebastian Huber
sebh at rtems.org
Wed Feb 6 14:31:40 UTC 2013
Module: rtems
Branch: master
Commit: 39de53882c1919795ecbf9a426c8c68f51df148d
Changeset: http://git.rtems.org/rtems/commit/?id=39de53882c1919795ecbf9a426c8c68f51df148d
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Feb 5 17:00:10 2013 +0100
bsps/powerpc: Add and use ppc_cpu_is_specific_e200
---
.../new-exceptions/bspsupport/ppc_exc_initialize.c | 7 +++++--
c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h | 5 +++++
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_initialize.c b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_initialize.c
index 872eed4..31c9881 100644
--- a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_initialize.c
+++ b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_initialize.c
@@ -105,7 +105,10 @@ static void ppc_exc_initialize_booke(void)
/* Interupt vector prefix register */
MTIVPR(ppc_exc_vector_base);
- if (ppc_cpu_is(PPC_e200z0) || ppc_cpu_is(PPC_e200z1)) {
+ if (
+ ppc_cpu_is_specific_e200(PPC_e200z0)
+ || ppc_cpu_is_specific_e200(PPC_e200z1)
+ ) {
/*
* These cores have hard wired IVOR registers. An access will case a
* program exception.
@@ -135,7 +138,7 @@ static void ppc_exc_initialize_booke(void)
MTIVOR(33, ppc_exc_vector_address(ASM_E500_EMB_FP_DATA_VECTOR));
MTIVOR(34, ppc_exc_vector_address(ASM_E500_EMB_FP_ROUND_VECTOR));
}
- if (ppc_cpu_is_e500()) {
+ if (ppc_cpu_is_specific_e200(PPC_e200z7) || ppc_cpu_is_e500()) {
MTIVOR(35, ppc_exc_vector_address(ASM_E500_PERFMON_VECTOR));
}
}
diff --git a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h
index cb9607e..bbda15e 100644
--- a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h
+++ b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h
@@ -124,6 +124,11 @@ static inline bool ppc_cpu_is_e200(void)
return (ppc_cpu_current() & 0xff80) == 0x8100;
}
+static inline bool ppc_cpu_is_specific_e200(ppc_cpu_id_t id)
+{
+ return (ppc_cpu_current() & 0xfff0) == id;
+}
+
static inline bool ppc_cpu_is_e300(void)
{
return ppc_cpu_current() == PPC_e300c1
More information about the vc
mailing list