summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu
diff options
context:
space:
mode:
authorThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2007-07-10 18:43:12 +0000
committerThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2007-07-10 18:43:12 +0000
commit185da086420ae9cfccf0343bb4d906151c44b8f7 (patch)
tree23be360e8e7dc4ece1e02d692e38a144dadc656b /c/src/lib/libcpu
parentcompilable release of virtex/gen83xx/gen5200 powerpc adaptations. Merged many... (diff)
downloadrtems-185da086420ae9cfccf0343bb4d906151c44b8f7.tar.bz2
additional fixes for the shared exception code
Diffstat (limited to 'c/src/lib/libcpu')
-rw-r--r--c/src/lib/libcpu/powerpc/Makefile.am2
-rw-r--r--c/src/lib/libcpu/powerpc/new-exceptions/raw_exception.c9
-rw-r--r--c/src/lib/libcpu/powerpc/old-exceptions/cpu.c2
-rw-r--r--c/src/lib/libcpu/powerpc/preinstall.am2
4 files changed, 14 insertions, 1 deletions
diff --git a/c/src/lib/libcpu/powerpc/Makefile.am b/c/src/lib/libcpu/powerpc/Makefile.am
index 388a8aae86..5d5682bc34 100644
--- a/c/src/lib/libcpu/powerpc/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/Makefile.am
@@ -34,12 +34,14 @@ new_exceptions_rtems_cpu_rel_CPPFLAGS = $(AM_CPPFLAGS)
new_exceptions_rtems_cpu_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
+if !mpc5xx
include_libcpu_HEADERS += new-exceptions/raw_exception.h
noinst_PROGRAMS += new-exceptions/raw_exception.rel
new_exceptions_raw_exception_rel_SOURCES = new-exceptions/raw_exception.c \
new-exceptions/asm_utils.S
new_exceptions_raw_exception_rel_CPPFLAGS = $(AM_CPPFLAGS)
new_exceptions_raw_exception_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
+endif
endif
diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/raw_exception.c b/c/src/lib/libcpu/powerpc/new-exceptions/raw_exception.c
index d412f38008..d19c4da5f2 100644
--- a/c/src/lib/libcpu/powerpc/new-exceptions/raw_exception.c
+++ b/c/src/lib/libcpu/powerpc/new-exceptions/raw_exception.c
@@ -119,7 +119,7 @@ int mpc860_vector_is_valid(rtems_vector vector)
#if (defined(mpc555) || defined(mpc505))
-int ppc_vector_is_valid(rtems_vector vector)
+int mpc5xx_vector_is_valid(rtems_vector vector)
{
switch (current_ppc_cpu) {
case PPC_5XX:
@@ -350,6 +350,13 @@ int ppc_vector_is_valid(rtems_vector vector)
}
break;
#endif
+#if ( defined(mpc555) || defined(mpc505) )
+ case PPC_5XX:
+ if (!mpc5xx_vector_is_valid(vector)) {
+ return 0;
+ }
+ break;
+#endif
#if ( defined(mpc860) || defined(mpc821) )
case PPC_860:
if (!mpc860_vector_is_valid(vector)) {
diff --git a/c/src/lib/libcpu/powerpc/old-exceptions/cpu.c b/c/src/lib/libcpu/powerpc/old-exceptions/cpu.c
index 5ce8f452bb..ed8d15280d 100644
--- a/c/src/lib/libcpu/powerpc/old-exceptions/cpu.c
+++ b/c/src/lib/libcpu/powerpc/old-exceptions/cpu.c
@@ -259,7 +259,9 @@ void _CPU_Context_Initialize(
*/
_CPU_MSR_GET( msr_value );
the_context->msr |= (msr_value & PPC_MSR_EP);
+#if defined(PPC_MSR_RI)
the_context->msr |= PPC_MSR_RI;
+#endif
the_context->msr |= msr_value & (PPC_MSR_DR|PPC_MSR_IR);
#if (PPC_ABI == PPC_ABI_SVR4)
diff --git a/c/src/lib/libcpu/powerpc/preinstall.am b/c/src/lib/libcpu/powerpc/preinstall.am
index bb30265c7d..eea3daec08 100644
--- a/c/src/lib/libcpu/powerpc/preinstall.am
+++ b/c/src/lib/libcpu/powerpc/preinstall.am
@@ -51,10 +51,12 @@ $(PROJECT_INCLUDE)/rtems/score/ppc_offs.h: old-exceptions/rtems/score/ppc_offs.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/ppc_offs.h
else
+if !mpc5xx
$(PROJECT_INCLUDE)/libcpu/raw_exception.h: new-exceptions/raw_exception.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/raw_exception.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/raw_exception.h
endif
+endif
if shared
$(PROJECT_INCLUDE)/libcpu/io.h: shared/include/io.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/io.h