fixed some problems with shared PPC exception handling code

This commit is contained in:
Thomas Doerfler
2007-07-05 20:32:43 +00:00
parent 20074c4980
commit 78f96ab7c7
20 changed files with 53 additions and 41 deletions

View File

@@ -1,3 +1,7 @@
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.

View File

@@ -129,7 +129,7 @@ libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/shared/cpuIdent.rel \
../../../libcpu/@RTEMS_CPU@/shared/stack.rel \
../../../libcpu/@RTEMS_CPU@/@exceptions@/rtems-cpu.rel \
../../../libcpu/@RTEMS_CPU@/mpc6xx/clock.rel \
../../../libcpu/@RTEMS_CPU@/mpc6xx/exceptions.rel \
../../../libcpu/@RTEMS_CPU@/@exceptions@/raw_exception.rel \
../../../libcpu/@RTEMS_CPU@/mpc6xx/mmu.rel \
../../../libcpu/@RTEMS_CPU@/mpc6xx/timer.rel

View File

@@ -1,3 +1,7 @@
2007-07-06 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
* irq_init.c, Makefile.am: adapted to shared exception code
2007-06-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* clock/clock.c, network_5200/network.c: Convert to using clock driver

View File

@@ -144,7 +144,7 @@ libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/shared/cpuIdent.rel \
../../../libcpu/@RTEMS_CPU@/@exceptions@/rtems-cpu.rel \
../../../libcpu/@RTEMS_CPU@/mpc6xx/mmu.rel \
../../../libcpu/@RTEMS_CPU@/mpc6xx/timer.rel \
../../../libcpu/@RTEMS_CPU@/mpc6xx/exceptions.rel
../../../libcpu/@RTEMS_CPU@/@exceptions@/raw_exception.rel
include $(srcdir)/preinstall.am
include $(top_srcdir)/../../../../automake/local.am

View File

@@ -273,7 +273,7 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
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");
}
@@ -283,7 +283,7 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
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");
}
@@ -293,7 +293,7 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
vectorDesc.hdl.raw_hdl = system_management_exception_vector_prolog_code;
vectorDesc.hdl.raw_hdl_size = (unsigned) &system_management_exception_vector_prolog_code_size;
if (!mpc60x_set_exception (&vectorDesc))
if (!ppc_set_exception (&vectorDesc))
{
BSP_panic("Unable to initialize RTEMS system management raw exception\n");
}

View File

@@ -186,7 +186,7 @@ void initialize_exceptions()
printk("installing exception number %d\n", i);
if (!mpc60x_vector_is_valid(i))
if (!ppc_vector_is_valid(i))
continue;
exception_table[i].exceptIndex = i;
@@ -197,7 +197,7 @@ void initialize_exceptions()
exception_table[i].isOn = except_always_enabled;
}
if (!mpc60x_init_exceptions(&exception_config))
if (!ppc_init_exceptions(&exception_config))
BSP_panic("Exception handling initialization failed\n");
else
printk("Exception handling initialization done\n");

View File

@@ -1,3 +1,7 @@
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.

View File

@@ -149,7 +149,7 @@ libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/shared/cpuIdent.rel \
../../../libcpu/@RTEMS_CPU@/shared/cache.rel \
../../../libcpu/@RTEMS_CPU@/@exceptions@/rtems-cpu.rel \
../../../libcpu/@RTEMS_CPU@/mpc6xx/clock.rel \
../../../libcpu/@RTEMS_CPU@/mpc6xx/exceptions.rel \
../../../libcpu/@RTEMS_CPU@/@exceptions@/raw_exception.rel \
../../../libcpu/@RTEMS_CPU@/mpc6xx/mmu.rel \
../../../libcpu/@RTEMS_CPU@/mpc6xx/timer.rel

View File

@@ -1,3 +1,7 @@
2007-07-06 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
* irq_init.c, Makefile.am: adapted to shared exception code
2007-04-12 Ralf Corsépius <ralf.corsepius@rtems.org>
* bsp_specs: Remove qrtems_debug.

View File

@@ -96,7 +96,7 @@ libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/shared/cpuIdent.rel \
../../../libcpu/@RTEMS_CPU@/shared/stack.rel \
../../../libcpu/@RTEMS_CPU@/@exceptions@/rtems-cpu.rel \
../../../libcpu/@RTEMS_CPU@/mpc6xx/clock.rel \
../../../libcpu/@RTEMS_CPU@/mpc6xx/exceptions.rel \
../../../libcpu/@RTEMS_CPU@/@exceptions@/raw_exception.rel \
../../../libcpu/@RTEMS_CPU@/mpc6xx/mmu.rel \
../../../libcpu/@RTEMS_CPU@/mpc6xx/timer.rel

View File

@@ -151,14 +151,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

View File

@@ -1,3 +1,7 @@
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.

View File

@@ -120,7 +120,7 @@ libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/shared/cpuIdent.rel \
../../../libcpu/@RTEMS_CPU@/shared/stack.rel \
../../../libcpu/@RTEMS_CPU@/@exceptions@/rtems-cpu.rel \
../../../libcpu/@RTEMS_CPU@/mpc6xx/clock.rel \
../../../libcpu/@RTEMS_CPU@/mpc6xx/exceptions.rel \
../../../libcpu/@RTEMS_CPU@/@exceptions@/raw_exception.rel \
../../../libcpu/@RTEMS_CPU@/mpc6xx/mmu.rel \
../../../libcpu/@RTEMS_CPU@/mpc6xx/timer.rel

View File

@@ -1,3 +1,13 @@
2007-07-05 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
* include/bsp.h:
added bsp/vectors.h and bsp/irq.h to list of included headers
2007-07-05 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
* opbintctrl/opbintctrl.c:
removed obsolete code
2007-07-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* .cvsignore: New file.

View File

@@ -69,7 +69,8 @@ extern "C" {
#include <rtems/console.h>
#include <rtems/iosupp.h>
#include <rtems/rtems_bsdnet.h>
#include <bsp/irq.h>
#include <bsp/vectors.h>
/* Constants */

View File

@@ -100,7 +100,6 @@ void BSP_irq_handle_at_opbintc(void)
*/
rtems_status_code opb_intc_init(void)
{
uint32_t msr_value;
uint32_t i, mask = 0;
/* mask off all interrupts */
@@ -125,19 +124,6 @@ rtems_status_code opb_intc_init(void)
*((volatile uint32_t *) (OPB_INTC_BASE + OPB_INTC_MER)) =
(OPB_INTC_MER_HIE | OPB_INTC_MER_ME);
#if 0 /* EB: we do it somewhere else */
/*
* enable (non-critical) exceptions
*/
_CPU_MSR_GET(msr_value);
msr_value |= PPC_MSR_EE;
_CPU_MSR_SET(msr_value);
/* install exit handler to close opb_intc when program atexit called */
/* atexit(opb_intc_exit); */
#endif
return RTEMS_SUCCESSFUL;
}

View File

@@ -1,3 +1,9 @@
2007-07-05 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
* configure.ac, Makefile.am:
added ppc403 and ppc405 to "shared" conditional
adapted to shared setting
2007-07-02 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
* ppc403/clock/clock.c, ppc403/console/console405.c,

View File

@@ -98,13 +98,9 @@ if OLD_EXCEPTIONS
include_HEADERS = ppc403/ictrl/ictrl.h
else
include_HEADERS =
include_libcpu_HEADERS += shared/include/spr.h
noinst_PROGRAMS += shared/cpuIdent.rel
shared_cpuIdent_rel_SOURCES = shared/include/cpuIdent.c shared/include/cpuIdent.h
shared_cpuIdent_rel_SOURCES = shared/include/cpuIdent.c
shared_cpuIdent_rel_CPPFLAGS = $(AM_CPPFLAGS)
shared_cpuIdent_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
include_libcpu_HEADERS += shared/include/cpuIdent.h
endif

View File

@@ -41,6 +41,8 @@ AM_CONDITIONAL(shared, \
|| test "$RTEMS_CPU_MODEL" = "mpc555" \
|| test "$RTEMS_CPU_MODEL" = "mpc5xx" \
|| test "$RTEMS_CPU_MODEL" = "ppc603e" \
|| test "$RTEMS_CPU_MODEL" = "ppc403" \
|| test "$RTEMS_CPU_MODEL" = "ppc405" \
|| test "$RTEMS_CPU_MODEL" = "mpc604" \
|| test "$RTEMS_CPU_MODEL" = "mpc6xx" \
|| test "$RTEMS_CPU_MODEL" = "mpc821" \

View File

@@ -97,15 +97,6 @@ if OLD_EXCEPTIONS
$(PROJECT_INCLUDE)/ictrl.h: ppc403/ictrl/ictrl.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/ictrl.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/ictrl.h
else
$(PROJECT_INCLUDE)/libcpu/spr.h: shared/include/spr.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/spr.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/spr.h
$(PROJECT_INCLUDE)/libcpu/cpuIdent.h: shared/include/cpuIdent.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/cpuIdent.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/cpuIdent.h
endif
if ppc405
$(PROJECT_INCLUDE)/tty_drv.h: ppc403/tty_drv/tty_drv.h $(PROJECT_INCLUDE)/$(dirstamp)