diff options
author | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2009-10-02 13:39:12 +0000 |
---|---|---|
committer | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2009-10-02 13:39:12 +0000 |
commit | 1a328955345754131f06ebbec6896d5a6c10a09c (patch) | |
tree | f359e6feab6e31124aed2a73359976757076429e /c/src/lib/libbsp/powerpc/qemuppc/irq/irq_init.c | |
parent | 2009-10-02 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-1a328955345754131f06ebbec6896d5a6c10a09c.tar.bz2 |
* Makefile.am, irq/irq_config.h, irq/irq_init.c, irq/irq.h:
add basic IRQ support (for decrementer)
* start/start.S, startup/cmain.c, startup/linkcmds: add support
for sdata* sections
* startup/bsppanic.c: some cleanup
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/powerpc/qemuppc/irq/irq_init.c | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/powerpc/qemuppc/irq/irq_init.c b/c/src/lib/libbsp/powerpc/qemuppc/irq/irq_init.c new file mode 100644 index 0000000000..d1cc1e0520 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/qemuppc/irq/irq_init.c @@ -0,0 +1,63 @@ +/*===============================================================*\ +| Project: RTEMS generic MPC83xx BSP | ++-----------------------------------------------------------------+ +| Copyright (c) 2007 | +| Embedded Brains GmbH | +| Obere Lagerstr. 30 | +| D-82178 Puchheim | +| Germany | +| rtems@embedded-brains.de | ++-----------------------------------------------------------------+ +| The license and distribution terms for this file may be | +| found in the file LICENSE in this distribution or at | +| | +| http://www.rtems.com/license/LICENSE. | +| | ++-----------------------------------------------------------------+ +| this file integrates the IPIC irq controller | +\*===============================================================*/ + +#include <rtems.h> + +#include <libcpu/powerpc-utility.h> +#include <libcpu/raw_exception.h> + +#include <bsp.h> +#include <bsp/irq.h> +#include <bsp/vectors.h> +#include <bsp/ppc_exc_bspsupp.h> + +int qemuppc_exception_handler( BSP_Exception_frame *frame, unsigned exception_number) +{ + BSP_panic("Unexpected interrupt occured"); + return 0; +} + +/* + * functions to enable/disable a source at the ipic + */ +rtems_status_code bsp_interrupt_vector_enable( rtems_vector_number irqnum) +{ + /* FIXME: do something */ + return RTEMS_SUCCESSFUL; +} + +rtems_status_code bsp_interrupt_vector_disable( rtems_vector_number irqnum) +{ + /* FIXME: do something */ + return RTEMS_SUCCESSFUL; +} + +rtems_status_code bsp_interrupt_facility_initialize(void) +{ + /* Install exception handler */ + if (ppc_exc_set_handler( ASM_EXT_VECTOR, qemuppc_exception_handler)) { + return RTEMS_IO_ERROR; + } + +} + +void bsp_interrupt_handler_default( rtems_vector_number vector) +{ + printk( "Spurious interrupt: 0x%08x\n", vector); +} |