forked from Imagelibrary/rtems
additional fixes for the shared exception code
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2007-07-10 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
|
||||
|
||||
* irq/irq_init.c: adapted to shared exception code
|
||||
|
||||
2007-07-06 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
|
||||
|
||||
* Makefile.am: adapted to shared exception code
|
||||
|
||||
@@ -315,14 +315,14 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
|
||||
vectorDesc.on = nop_func;
|
||||
vectorDesc.off = nop_func;
|
||||
vectorDesc.isOn = connected;
|
||||
if (!mpc60x_set_exception (&vectorDesc)) {
|
||||
if (!ppc_set_exception (&vectorDesc)) {
|
||||
BSP_panic("Unable to initialize RTEMS decrementer raw exception\n");
|
||||
}
|
||||
vectorDesc.exceptIndex = ASM_EXT_VECTOR;
|
||||
vectorDesc.hdl.vector = ASM_EXT_VECTOR;
|
||||
vectorDesc.hdl.raw_hdl = external_exception_vector_prolog_code;
|
||||
vectorDesc.hdl.raw_hdl_size = (unsigned) external_exception_vector_prolog_code_size;
|
||||
if (!mpc60x_set_exception (&vectorDesc)) {
|
||||
if (!ppc_set_exception (&vectorDesc)) {
|
||||
BSP_panic("Unable to initialize RTEMS external raw exception\n");
|
||||
}
|
||||
#ifdef TRACE_IRQ_INIT
|
||||
|
||||
@@ -76,7 +76,6 @@
|
||||
#include <bsp.h>
|
||||
#include <rtems/bspIo.h>
|
||||
|
||||
extern int mpc60x_vector_is_valid(rtems_vector);
|
||||
static rtems_raw_except_global_settings exception_config;
|
||||
static rtems_raw_except_connect_data exception_table[LAST_VALID_EXC + 1];
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2007-07-10 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
|
||||
|
||||
* vectors/vectors_init.c, irq/irq_init.c:
|
||||
adapted to shared exception code
|
||||
|
||||
2007-04-12 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* bsp_specs: Remove qrtems_debug.
|
||||
|
||||
@@ -147,14 +147,14 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
|
||||
vectorDesc.on = nop_func2;
|
||||
vectorDesc.off = nop_func2;
|
||||
vectorDesc.isOn = connected;
|
||||
if (!mpc8xx_set_exception (&vectorDesc)) {
|
||||
if (!ppc_set_exception (&vectorDesc)) {
|
||||
BSP_panic("Unable to initialize RTEMS decrementer raw exception\n");
|
||||
}
|
||||
vectorDesc.exceptIndex = ASM_EXT_VECTOR;
|
||||
vectorDesc.hdl.vector = ASM_EXT_VECTOR;
|
||||
vectorDesc.hdl.raw_hdl = external_exception_vector_prolog_code;
|
||||
vectorDesc.hdl.raw_hdl_size = (unsigned) &external_exception_vector_prolog_code_size;
|
||||
if (!mpc8xx_set_exception (&vectorDesc)) {
|
||||
if (!ppc_set_exception (&vectorDesc)) {
|
||||
BSP_panic("Unable to initialize RTEMS external raw exception\n");
|
||||
}
|
||||
#ifdef TRACE_IRQ_INIT
|
||||
|
||||
@@ -112,7 +112,7 @@ void initialize_exceptions()
|
||||
exception_config.defaultRawEntry.hdl.raw_hdl_size = (unsigned) &default_exception_vector_code_prolog_size;
|
||||
for (i=0; i <= exception_config.exceptSize; i++) {
|
||||
printk("installing exception number %d\n", i);
|
||||
if (!mpc8xx_vector_is_valid (i)) {
|
||||
if (!ppc_vector_is_valid (i)) {
|
||||
continue;
|
||||
}
|
||||
#if 0 /* FIXME: refine this condition, leave Syscall for EPPCBug console */
|
||||
@@ -127,7 +127,7 @@ void initialize_exceptions()
|
||||
exception_table[i].off = nop_except_enable;
|
||||
exception_table[i].isOn = except_always_enabled;
|
||||
}
|
||||
if (!mpc8xx_init_exceptions(&exception_config)) {
|
||||
if (!ppc_init_exceptions(&exception_config)) {
|
||||
/*
|
||||
* At this stage we may not call BSP_Panic because it uses exceptions!!!
|
||||
*/
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
2007-07-10 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
|
||||
|
||||
* vectors/vectors_init.c, irq/irq_init.c:
|
||||
adapted to shared exception code
|
||||
|
||||
2007-07-06 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
|
||||
|
||||
* Makefile.am: adapted to shared exception code
|
||||
|
||||
2007-04-12 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* bsp_specs: Remove qrtems_debug.
|
||||
|
||||
@@ -84,7 +84,7 @@ libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/shared/cpuIdent.rel \
|
||||
../../../libcpu/@RTEMS_CPU@/mpc8260/cpm.rel \
|
||||
../../../libcpu/@RTEMS_CPU@/mpc8260/mmu.rel \
|
||||
../../../libcpu/@RTEMS_CPU@/mpc8260/timer.rel \
|
||||
../../../libcpu/@RTEMS_CPU@/mpc8260/exceptions.rel
|
||||
../../../libcpu/@RTEMS_CPU@/@exceptions@/raw_exception.rel
|
||||
|
||||
EXTRA_DIST += times
|
||||
|
||||
|
||||
@@ -136,14 +136,14 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
|
||||
vectorDesc.on = nop_func;
|
||||
vectorDesc.off = nop_func;
|
||||
vectorDesc.isOn = connected;
|
||||
if (!mpc8xx_set_exception (&vectorDesc)) {
|
||||
if (!ppc_set_exception (&vectorDesc)) {
|
||||
BSP_panic("Unable to initialize RTEMS decrementer raw exception\n");
|
||||
}
|
||||
vectorDesc.exceptIndex = ASM_EXT_VECTOR;
|
||||
vectorDesc.hdl.vector = ASM_EXT_VECTOR;
|
||||
vectorDesc.hdl.raw_hdl = external_exception_vector_prolog_code;
|
||||
vectorDesc.hdl.raw_hdl_size = (unsigned) &external_exception_vector_prolog_code_size;
|
||||
if (!mpc8xx_set_exception (&vectorDesc)) {
|
||||
if (!ppc_set_exception (&vectorDesc)) {
|
||||
BSP_panic("Unable to initialize RTEMS external raw exception\n");
|
||||
}
|
||||
#ifdef TRACE_IRQ_INIT
|
||||
|
||||
@@ -120,7 +120,7 @@ void initialize_exceptions()
|
||||
/*
|
||||
printk("installing exception number %d\n", i);
|
||||
*/
|
||||
if (!mpc8xx_vector_is_valid (i)) {
|
||||
if (!ppc_vector_is_valid (i)) {
|
||||
continue;
|
||||
}
|
||||
exception_table[i].exceptIndex = i;
|
||||
@@ -133,7 +133,7 @@ void initialize_exceptions()
|
||||
|
||||
/* _BSP_GPLED0_on(); */
|
||||
|
||||
if (!mpc8xx_init_exceptions(&exception_config)) {
|
||||
if (!ppc_init_exceptions(&exception_config)) {
|
||||
/*
|
||||
* At this stage we may not call BSP_Panic because it uses exceptions!!!
|
||||
*/
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2007-07-10 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
|
||||
|
||||
* irq/irq_init.c: adapted to shared exception code
|
||||
|
||||
2007-07-06 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
|
||||
|
||||
* Makefile.am: adapted to shared exception code
|
||||
|
||||
@@ -227,14 +227,14 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
|
||||
vectorDesc.on = nop_func;
|
||||
vectorDesc.off = nop_func;
|
||||
vectorDesc.isOn = connected;
|
||||
if (!mpc60x_set_exception (&vectorDesc)) {
|
||||
if (!ppc_set_exception (&vectorDesc)) {
|
||||
BSP_panic("Unable to initialize RTEMS decrementer raw exception\n");
|
||||
}
|
||||
vectorDesc.exceptIndex = ASM_EXT_VECTOR;
|
||||
vectorDesc.hdl.vector = ASM_EXT_VECTOR;
|
||||
vectorDesc.hdl.raw_hdl = external_exception_vector_prolog_code;
|
||||
vectorDesc.hdl.raw_hdl_size = (unsigned) external_exception_vector_prolog_code_size;
|
||||
if (!mpc60x_set_exception (&vectorDesc)) {
|
||||
if (!ppc_set_exception (&vectorDesc)) {
|
||||
BSP_panic("Unable to initialize RTEMS external raw exception\n");
|
||||
}
|
||||
#ifdef TRACE_IRQ_INIT
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2007-07-10 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
|
||||
|
||||
* irq/irq_init.c: adapted to shared exception code
|
||||
|
||||
2007-07-06 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
|
||||
|
||||
* Makefile.am: adapted to shared exception code
|
||||
|
||||
@@ -348,14 +348,14 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
|
||||
vectorDesc.on = nop_func;
|
||||
vectorDesc.off = nop_func;
|
||||
vectorDesc.isOn = connected;
|
||||
if (!mpc60x_set_exception (&vectorDesc)) {
|
||||
if (!ppc_set_exception (&vectorDesc)) {
|
||||
BSP_panic("Unable to initialize RTEMS decrementer raw exception\n");
|
||||
}
|
||||
vectorDesc.exceptIndex = ASM_EXT_VECTOR;
|
||||
vectorDesc.hdl.vector = ASM_EXT_VECTOR;
|
||||
vectorDesc.hdl.raw_hdl = external_exception_vector_prolog_code;
|
||||
vectorDesc.hdl.raw_hdl_size = (unsigned) external_exception_vector_prolog_code_size;
|
||||
if (!mpc60x_set_exception (&vectorDesc)) {
|
||||
if (!ppc_set_exception (&vectorDesc)) {
|
||||
BSP_panic("Unable to initialize RTEMS external raw exception\n");
|
||||
}
|
||||
#ifdef TRACE_IRQ_INIT
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user