Changeset 0c0181d in rtems for c/src/lib/libbsp


Ignore:
Timestamp:
Apr 4, 2012, 1:39:46 PM (9 years ago)
Author:
Jennifer Averett <jennifer.averett@…>
Branches:
4.11, 5, master
Children:
a36d1b4
Parents:
eb6362dc
git-author:
Jennifer Averett <jennifer.averett@…> (04/04/12 13:39:46)
git-committer:
Joel Sherrill <joel.sherrill@…> (04/04/12 13:43:08)
Message:

PR 1993 - Convert MIPS to PIC IRQ model

Location:
c/src/lib/libbsp
Files:
19 added
41 edited
2 moved

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/mips/ChangeLog

    reb6362dc r0c0181d  
     12012-03-07      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     2
     3        * shared/irq/irq.c: Fixed unhandled interrupts to print
     4        the registers and shutdown. This prevents a loop of
     5        unusable information from occuring.
     6
     72012-03-06      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     8
     9        PR 1993/bsps
     10        * shared/clock/clockdrv.c, shared/irq/vectorexceptions.c,
     11        ../shared/clockdrv_shell.h: Changed interrupt call, removed warnings
     12        and did cleanup.
     13
     142012-02-23      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     15
     16        PR 1993/bsps
     17        * shared/irq/interruptmask.c,
     18        shared/irq/interruptmask_TX49.c,
     19        shared/irq/irq.c, shared/irq/maxvectors.c,
     20        shared/irq/vectorexceptions.c:
     21        Mips conversion to PIC IRQ model.
     22        * shared/irq/interruptmask.c,
     23        shared/irq/interruptmask_TX49.c,
     24        shared/irq/irq.c: New files.
     25
    1262011-02-02      Ralf Corsépius <ralf.corsepius@rtems.org>
    227
  • c/src/lib/libbsp/mips/csb350/ChangeLog

    reb6362dc r0c0181d  
     12012-03-08      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     2
     3        * include/bsp.h: Added define for BSP_SHARED_HANDLER_SUPPORT.
     4
     52012-03-06      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     6
     7        PR 1993/bsps
     8        * clock/clockdrv.c, include/bsp.h, include/irq.h,
     9        irq/vectorisrs.c, startup/bspstart.c:
     10        Changed interrupt call, removed warnings and did cleanup.
     11
     122012-02-23      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     13
     14        PR 1993/bsps
     15        * Makefile.am, clock/clockdrv.c, include/irq.h,
     16        irq/vectorisrs.c,network/network.c,
     17        preinstall.am, startup/bspstart.c:
     18        Mips conversion to PIC IRQ model.
     19        * include/irq.h, irq/vectorisrs.c: New files.
     20
    1212011-12-14      Joel Sherrill <joel.sherrilL@OARcorp.com>
    222
  • c/src/lib/libbsp/mips/csb350/Makefile.am

    reb6362dc r0c0181d  
    1414include_HEADERS += include/tm27.h
    1515include_bsp_HEADERS = ../shared/liblnk/regs.h
     16#isr
     17include_bsp_HEADERS += ../../shared/include/irq-generic.h
     18include_bsp_HEADERS += ../../shared/include/irq-info.h
     19include_bsp_HEADERS += include/irq.h
    1620
    1721nodist_include_HEADERS = include/bspopts.h
     
    4246libbsp_a_SOURCES += ../../shared/bootcard.c
    4347libbsp_a_SOURCES += ../../shared/sbrk.c
    44 libbsp_a_SOURCES += ../../shared/gnatinstallhandler.c
    45 libbsp_a_SOURCES += ../../shared/setvec.c
    4648# clock
    4749libbsp_a_SOURCES += clock/clockdrv.c
     
    5254# timer
    5355libbsp_a_SOURCES += timer/timer.c
     56#isr
     57libbsp_a_SOURCES += ../../shared/src/irq-generic.c
     58libbsp_a_SOURCES += ../../shared/src/irq-legacy.c
     59libbsp_a_SOURCES += ../../shared/src/irq-info.c
     60libbsp_a_SOURCES += ../../shared/src/irq-shell.c
     61libbsp_a_SOURCES += ../../shared/src/irq-server.c
     62libbsp_a_SOURCES += ../shared/irq/vectorexceptions.c
     63libbsp_a_SOURCES += ../shared/irq/irq.c
     64libbsp_a_SOURCES += ../shared/irq/maxvectors.c
     65libbsp_a_SOURCES += irq/vectorisrs.c
     66libbsp_a_SOURCES += ../shared/irq/interruptmask.c
    5467
    5568if HAS_NETWORKING
     
    6376libbsp_a_LIBADD  = ../../../libcpu/mips/shared/cache.rel
    6477libbsp_a_LIBADD += ../../../libcpu/mips/shared/interrupts.rel
    65 libbsp_a_LIBADD += ../../../libcpu/mips/au1x00/vectorisrs.rel
     78
    6679if HAS_NETWORKING
    6780libbsp_a_LIBADD += network.rel
  • c/src/lib/libbsp/mips/csb350/bsp_specs

    reb6362dc r0c0181d  
    55*startfile:
    66%{!qrtems: %(old_startfile)} \
    7 %{!nostdlib: %{qrtems: start.o%s crtbegin.o%s -e _start}}
     7%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e _start}}
    88
    99*link:
  • c/src/lib/libbsp/mips/csb350/clock/clockdrv.c

    reb6362dc r0c0181d  
    1 /*
     1/**
     2 *  @file
     3 * 
    24 *  Instantiate the clock driver shell.
    35 *
    46 *  This uses the TOY (Time of Year) timer to implement the clock.
    5  *
     7 */
     8
     9/*
    610 *  Copyright (c) 2005 by Cogent Computer Systems
    711 *  Written by Jay Monkman <jtm@lopingdog.com>
     
    1014 *  found in the file LICENSE in this distribution or at
    1115 *  http://www.rtems.com/license/LICENSE.
    12  *
     16 * 
    1317 *  $Id$
    1418 */
     
    1620#include <rtems.h>
    1721#include <bsp.h>
    18 #include <libcpu/au1x00.h>
     22#include <bsp/irq.h>
    1923#include <rtems/bspIo.h>
    2024
    2125uint32_t tick_interval;
    2226uint32_t last_match;
     27
     28void au1x00_clock_init(void);
    2329
    2430#define CLOCK_VECTOR AU1X00_IRQ_TOY_MATCH2
     
    3541#define Clock_driver_support_install_isr( _new, _old )  \
    3642  do {                                                  \
    37         _old = set_vector( _new, AU1X00_IRQ_TOY_MATCH2, 1 );     \
    38         AU1X00_IC_MASKCLR(AU1X00_IC0_ADDR) = AU1X00_IC_IRQ_TOY_MATCH2; \
    39         AU1X00_IC_SRCSET(AU1X00_IC0_ADDR) = AU1X00_IC_IRQ_TOY_MATCH2; \
    40         AU1X00_IC_CFG0SET(AU1X00_IC0_ADDR) = AU1X00_IC_IRQ_TOY_MATCH2; \
    41         AU1X00_IC_CFG1CLR(AU1X00_IC0_ADDR) = AU1X00_IC_IRQ_TOY_MATCH2; \
    42         AU1X00_IC_CFG2CLR(AU1X00_IC0_ADDR) = AU1X00_IC_IRQ_TOY_MATCH2; \
    43         AU1X00_IC_ASSIGNSET(AU1X00_IC0_ADDR) = AU1X00_IC_IRQ_TOY_MATCH2; \
     43    rtems_interrupt_handler_install( \
     44      CLOCK_VECTOR, \
     45      "clock", \
     46      0, \
     47      _new, \
     48      NULL \
     49    ); \
     50    AU1X00_IC_MASKCLR(AU1X00_IC0_ADDR) = AU1X00_IC_IRQ_TOY_MATCH2; \
     51    AU1X00_IC_SRCSET(AU1X00_IC0_ADDR) = AU1X00_IC_IRQ_TOY_MATCH2; \
     52    AU1X00_IC_CFG0SET(AU1X00_IC0_ADDR) = AU1X00_IC_IRQ_TOY_MATCH2; \
     53    AU1X00_IC_CFG1CLR(AU1X00_IC0_ADDR) = AU1X00_IC_IRQ_TOY_MATCH2; \
     54    AU1X00_IC_CFG2CLR(AU1X00_IC0_ADDR) = AU1X00_IC_IRQ_TOY_MATCH2; \
     55    AU1X00_IC_ASSIGNSET(AU1X00_IC0_ADDR) = AU1X00_IC_IRQ_TOY_MATCH2; \
    4456  } while(0)
    4557
  • c/src/lib/libbsp/mips/csb350/include/bsp.h

    reb6362dc r0c0181d  
    1 /*  bsp.h
    2  *
     1/**
     2 *  @file
     3 * 
    34 *  This include file contains some definitions specific to the
    45 *  Cogent CSB350 Board.
    5  *
    6  *  COPYRIGHT (c) 1989-2000.
     6 */
     7
     8/*
     9 *  COPYRIGHT (c) 1989-2012.
    710 *  On-Line Applications Research Corporation (OAR).
    811 *
     
    2932#include <libcpu/au1x00.h>
    3033
     34#define BSP_FEATURE_IRQ_EXTENSION
     35#define BSP_SHARED_HANDLER_SUPPORT      1
    3136
    3237/*
  • c/src/lib/libbsp/mips/csb350/network/network.c

    reb6362dc r0c0181d  
     1/**
     2 *  @file
     3 * 
     4 *  Au1x00 ethernet driver
     5 */
     6
    17/*
    2  *  Au1x00 ethernet driver
    3  *
    48 *  Copyright (c) 2005 by Cogent Computer Systems
    59 *  Written by Jay Monkman <jtm@lopingdog.com>
     
    812 *  found in the file LICENSE in this distribution or at
    913 *  http://www.rtems.com/license/LICENSE.
    10  *
     14 * 
    1115 *  $Id$
    1216 */
     
    1721#include <rtems/bspIo.h>
    1822#include <libcpu/au1x00.h>
     23#include <bsp/irq.h>
    1924
    2025#include <stdio.h>
  • c/src/lib/libbsp/mips/csb350/preinstall.am

    reb6362dc r0c0181d  
    5050PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/regs.h
    5151
     52$(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     53        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
     54PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h
     55
     56$(PROJECT_INCLUDE)/bsp/irq-info.h: ../../shared/include/irq-info.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     57        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-info.h
     58PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-info.h
     59
     60$(PROJECT_INCLUDE)/bsp/irq.h: include/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     61        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h
     62PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h
     63
    5264$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
    5365        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
  • c/src/lib/libbsp/mips/csb350/startup/bspstart.c

    reb6362dc r0c0181d  
    1 /*
     1/**
     2 *  @file
     3 * 
    24 *  This routine starts the application.  It includes application,
    35 *  board, and monitor specific initialization and configuration.
    46 *  The generic CPU dependent initialization has been performed
    57 *  before this routine is invoked.
    6  *
    7  *  COPYRIGHT (c) 1989-2000.
     8 */
     9
     10/*
     11 *  COPYRIGHT (c) 1989-2012.
    812 *  On-Line Applications Research Corporation (OAR).
    913 *
     
    1115 *  found in the file LICENSE in this distribution or at
    1216 *  http://www.rtems.com/license/LICENSE.
    13  *
     17 * 
    1418 *  $Id$
    1519 */
     
    2024#include <libcpu/au1x00.h>
    2125#include <libcpu/isr_entries.h>
     26#include <bsp/irq-generic.h>
     27
     28void bsp_start( void );
    2229
    2330au1x00_uart_t *uart0 = (au1x00_uart_t *)AU1X00_UART0_ADDR;
     
    3643                          /* depend on the IRC to take care of things */
    3744  __asm__ volatile ("mtc0 %0, $11\n" :: "r" (compare));
    38   mips_install_isr_entries();
     45  bsp_interrupt_initialize();
    3946}
    40 
    41 
    42 /* These replace the ones in newlib. I'm not sure why the newlib ones
    43  * don't work.
    44  */
    45 void _init(void)
    46 {
    47 }
    48 
    49 void _fini(void)
    50 {
    51 }
  • c/src/lib/libbsp/mips/genmongoosev/ChangeLog

    reb6362dc r0c0181d  
     12012-03-08      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     2
     3        * include/bsp.h: Added define for BSP_SHARED_HANDLER_SUPPORT.
     4
     52012-03-06      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     6
     7        PR 1993/bsps
     8        * clock/clockdrv.c, include/bsp.h,
     9        include/irq.h, irq/vectorisrs.c,
     10        startup/bspstart.c, clock/ckinit.c:
     11        Changed interrupt call, removed warnings and did cleanup.
     12
     132012-02-23      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     14
     15        PR 1993/bsps
     16        * Makefile.am, clock/clockdrv.c, console/conscfg.c,
     17        include/irq.h, irq/vectorisrs.c, preinstall.am,
     18        startup/bspstart.c:
     19        Mips conversion to PIC IRQ model.
     20        * include/irq.h, irq/vectorisrs.c: New files.
     21
    1222011-10-18      Jennifer Averett <Jennifer.Averett@OARcorp.com>
    223
  • c/src/lib/libbsp/mips/genmongoosev/Makefile.am

    reb6362dc r0c0181d  
    1414include_HEADERS += include/tm27.h
    1515include_bsp_HEADERS = start/regs.h
     16#isr
     17include_bsp_HEADERS += ../../shared/include/irq-generic.h
     18include_bsp_HEADERS += ../../shared/include/irq-info.h
     19include_bsp_HEADERS += include/irq.h
    1620
    1721nodist_include_HEADERS = include/bspopts.h
     
    2327
    2428noinst_LIBRARIES = libbspstart.a
    25 libbspstart_a_SOURCES = start/start.S start/regs.h start/mg5.h
     29libbspstart_a_SOURCES  = start/start.S
     30libbspstart_a_SOURCES += start/regs.h
     31libbspstart_a_SOURCES += start/mg5.h
    2632project_lib_DATA = start.$(OBJEXT)
    2733
     
    3238
    3339# startup
    34 libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bsppretaskinghook.c \
    35     ../../shared/bsppredriverhook.c ../../shared/bsplibc.c \
    36     ../../shared/bsppost.c startup/bspstart.c ../../shared/bootcard.c \
    37     ../../shared/sbrk.c ../../shared/gnatinstallhandler.c \
    38     ../../shared/setvec.c ../../shared/bspgetworkarea.c
     40libbsp_a_SOURCES += ../../shared/bspclean.c
     41libbsp_a_SOURCES += ../../shared/bsppretaskinghook.c
     42libbsp_a_SOURCES += ../../shared/bsppredriverhook.c
     43libbsp_a_SOURCES += ../../shared/bsplibc.c
     44libbsp_a_SOURCES += ../../shared/bsppost.c
     45libbsp_a_SOURCES += startup/bspstart.c
     46libbsp_a_SOURCES += ../../shared/bootcard.c
     47libbsp_a_SOURCES += ../../shared/sbrk.c
     48libbsp_a_SOURCES += ../../shared/bspgetworkarea.c
    3949# clock
    4050libbsp_a_SOURCES += clock/clockdrv.c
    4151libbsp_a_SOURCES += ../../shared/clockdrv_shell.h
    4252# console
    43 libbsp_a_SOURCES += console/conscfg.c ../../shared/console.c \
    44     ../../shared/console_select.c ../../shared/console_control.c \
    45     ../../shared/console_read.c ../../shared/console_write.c
     53libbsp_a_SOURCES += console/conscfg.c
     54libbsp_a_SOURCES += ../../shared/console.c
     55libbsp_a_SOURCES += ../../shared/console_select.c
     56libbsp_a_SOURCES += ../../shared/console_control.c
     57libbsp_a_SOURCES += ../../shared/console_read.c
     58libbsp_a_SOURCES += ../../shared/console_write.c
    4659# timer
    4760libbsp_a_SOURCES += timer/timer.c
     61#isr
     62libbsp_a_SOURCES += ../../shared/src/irq-generic.c
     63libbsp_a_SOURCES += ../../shared/src/irq-legacy.c
     64libbsp_a_SOURCES += ../../shared/src/irq-info.c
     65libbsp_a_SOURCES += ../../shared/src/irq-shell.c
     66libbsp_a_SOURCES += ../../shared/src/irq-server.c
     67libbsp_a_SOURCES += ../shared/irq/vectorexceptions.c
     68libbsp_a_SOURCES += ../shared/irq/irq.c
     69libbsp_a_SOURCES += ../shared/irq/maxvectors.c
     70libbsp_a_SOURCES += irq/vectorisrs.c
     71libbsp_a_SOURCES += ../shared/irq/interruptmask.c
    4872
    4973gdbstub_CPPFLAGS = -I$(srcdir)/../../mips/shared/gdbstub
    5074noinst_PROGRAMS += gdbstub.rel
    51 gdbstub_rel_SOURCES = ../../mips/shared/gdbstub/mips-stub.c \
    52     startup/gdb-support.c ../../shared/gdbstub/rtems-stub-glue.c
     75gdbstub_rel_SOURCES  = ../../mips/shared/gdbstub/mips-stub.c
     76gdbstub_rel_SOURCES += startup/gdb-support.c
     77gdbstub_rel_SOURCES += ../../shared/gdbstub/rtems-stub-glue.c
    5378gdbstub_rel_CPPFLAGS = $(AM_CPPFLAGS) $(gdbstub_CPPFLAGS)
    5479gdbstub_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
    5580
    56 libbsp_a_LIBADD = \
    57     ../../../libcpu/@RTEMS_CPU@/shared/cache.rel \
    58     ../../../libcpu/@RTEMS_CPU@/shared/interrupts.rel \
    59     ../../../libcpu/@RTEMS_CPU@/mongoosev/duart.rel \
    60     ../../../libcpu/@RTEMS_CPU@/mongoosev/vectorisrs.rel
     81libbsp_a_LIBADD  = ../../../libcpu/@RTEMS_CPU@/shared/cache.rel
     82libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/shared/interrupts.rel
     83libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/mongoosev/duart.rel
    6184
    6285include $(srcdir)/preinstall.am
  • c/src/lib/libbsp/mips/genmongoosev/clock/clockdrv.c

    reb6362dc r0c0181d  
     1/**
     2 *  @file
     3 * 
     4 *  Instantiate the clock driver shell for the Mongoose-V's on-CPU timer.
     5 */
     6
    17/*
    2  *  Instantiate the clock driver shell for the Mongoose-V's on-CPU timer.
    3  *
    4  *  COPYRIGHT (c) 1989-2001.
     8 *  COPYRIGHT (c) 1989-2012.
    59 *  On-Line Applications Research Corporation (OAR).
    610 *
     
    812 *  found in the file LICENSE in this distribution or at
    913 *  http://www.rtems.com/license/LICENSE.
    10  *
     14 * 
    1115 *  $Id$
    1216 */
    1317
    1418#include <rtems.h>
    15 #include <libcpu/mongoose-v.h>
     19#include <bsp/irq.h>
    1620#include <bsp.h>
    1721
     
    3438#define Clock_driver_support_install_isr( _new, _old ) \
    3539  do { \
    36     _old = set_vector( _new, CLOCK_VECTOR, 1 ); \
     40    rtems_interrupt_handler_install( \
     41      CLOCK_VECTOR, \
     42      "clock", \
     43      0, \
     44      _new, \
     45      NULL \
     46    ); \
    3747  } while(0)
    3848
  • c/src/lib/libbsp/mips/genmongoosev/console/conscfg.c

    reb6362dc r0c0181d  
    1 /*
     1/**
     2 *  @file
     3 * 
    24 *  This file contains the libchip configuration information
    35 *  to instantiate the libchip driver for the on-CPU DUART
    46 *  and any other serial ports in the system.
    5  *
    6  *  COPYRIGHT (c) 1989-2001.
     7 */
     8
     9/*
     10 *  COPYRIGHT (c) 1989-2012.
    711 *  On-Line Applications Research Corporation (OAR).
    812 *
     
    1014 *  found in the file LICENSE in this distribution or at
    1115 *  http://www.rtems.com/license/LICENSE.
    12  *
     16 * 
    1317 *  $Id$
    1418 */
     
    1721
    1822#include <bsp.h>
     23#include <bsp/irq.h>
    1924
    2025#include <libchip/serial.h>
  • c/src/lib/libbsp/mips/genmongoosev/include/bsp.h

    reb6362dc r0c0181d  
    1 /*  bsp.h
    2  *
     1/**
     2 *  @file
     3 * 
    34 *  This include file contains some definitions specific to a board
    45 *  based upon the generic capabilities of a Mongoose-V.
    5  *
    6  *  COPYRIGHT (c) 1989-2001.
     6 */
     7
     8/*
     9 *  COPYRIGHT (c) 1989-2012.
    710 *  On-Line Applications Research Corporation (OAR).
    811 *
     
    2831#include <rtems/clockdrv.h>
    2932#include <libcpu/mongoose-v.h>
     33
     34#define BSP_FEATURE_IRQ_EXTENSION
     35#define BSP_SHARED_HANDLER_SUPPORT      1
    3036
    3137#ifndef CPU_CLOCK_RATE
  • c/src/lib/libbsp/mips/genmongoosev/preinstall.am

    reb6362dc r0c0181d  
    5050PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/regs.h
    5151
     52$(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     53        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
     54PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h
     55
     56$(PROJECT_INCLUDE)/bsp/irq-info.h: ../../shared/include/irq-info.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     57        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-info.h
     58PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-info.h
     59
     60$(PROJECT_INCLUDE)/bsp/irq.h: include/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     61        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h
     62PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h
     63
    5264$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
    5365        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
  • c/src/lib/libbsp/mips/genmongoosev/startup/bspstart.c

    reb6362dc r0c0181d  
    1 /*
     1/**
     2 *  @file
     3 * 
    24 *  This routine starts the application.  It includes application,
    35 *  board, and monitor specific initialization and configuration.
     
    57 *  before this routine is invoked.
    68 *
    7  *  COPYRIGHT (c) 1989-2001.
     9 *  Modification History:
     10 *        12/10/01  A.Ferrer, NASA/GSFC, Code 582
     11 *           Set interrupt mask to 0xAF00 (Line 139).
     12 */
     13
     14/*
     15 *  COPYRIGHT (c) 1989-2012.
    816 *  On-Line Applications Research Corporation (OAR).
    917 *
     
    1119 *  found in the file LICENSE in this distribution or at
    1220 *  http://www.rtems.com/license/LICENSE.
    13  *
     21 * 
    1422 *  $Id$
    15  *
    16  * Modification History:
    17  *        12/10/01  A.Ferrer, NASA/GSFC, Code 582
    18  *           Set interrupt mask to 0xAF00 (Line 139).
    1923 */
    20 
     24 
    2125#include <string.h>
    2226
     
    2428#include <libcpu/mongoose-v.h>
    2529#include <libcpu/isr_entries.h>
     30#include <bsp/irq-generic.h>
    2631
     32void bsp_start( void );
     33void clear_cache( void );
    2734extern void _sys_exit(int);
    2835extern void mips_gdb_stub_install(void);
     
    8390  mips_set_sr( (SR_CU0 | 0x400) );
    8491
    85   mips_install_isr_entries();
     92  bsp_interrupt_initialize();
    8693}
    8794
  • c/src/lib/libbsp/mips/hurricane/ChangeLog

    reb6362dc r0c0181d  
     12012-03-08      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     2
     3        * include/bsp.h: Added define for BSP_SHARED_HANDLER_SUPPORT.
     4
     52012-03-06      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     6
     7        PR 1993/bsps
     8        * include/bsp.h, include/irq.h,
     9        irq/vectorisrs.c, startup/bspstart.c:
     10        Changed interrupt call, removed warnings and did cleanup.
     11
     122012-02-23      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     13
     14        PR 1993/bsps
     15        * Makefile.am, clock/ckinit.c, include/irq.h,
     16        irq/vectorisrs.c, preinstall.am, startup/bspstart.c:
     17        Mips conversion to PIC IRQ model.
     18        * include/irq.h, irq/vectorisrs.c: New files.
     19
    1202011-02-02      Ralf Corsépius <ralf.corsepius@rtems.org>
    221
  • c/src/lib/libbsp/mips/hurricane/Makefile.am

    reb6362dc r0c0181d  
    1515include_HEADERS += include/usc.h
    1616include_bsp_HEADERS = ../shared/liblnk/regs.h
     17#isr
     18include_bsp_HEADERS += ../../shared/include/irq-generic.h
     19include_bsp_HEADERS += ../../shared/include/irq-info.h
     20include_bsp_HEADERS += include/irq.h
    1721
    1822nodist_include_HEADERS = include/bspopts.h
     
    3236
    3337# startup
    34 libbsp_a_SOURCES += ../../shared/bspclean.c \
    35     ../../shared/bsplibc.c ../../shared/bsppost.c \
    36    ../../shared/bsppretaskinghook.c ../../shared/bspgetworkarea.c \
    37     ../../shared/bsppredriverhook.c startup/bspstart.c \
    38     ../../shared/bootcard.c ../../shared/sbrk.c \
    39     ../../shared/gnatinstallhandler.c ../../shared/setvec.c \
    40     startup/inittlb.c ../shared/startup/idtmem.S ../shared/startup/idttlb.S \
    41     ../shared/irq/exception.S startup/usc.S
     38libbsp_a_SOURCES += ../../shared/bspclean.c
     39libbsp_a_SOURCES += ../../shared/bsplibc.c
     40libbsp_a_SOURCES += ../../shared/bsppost.c
     41libbsp_a_SOURCES += ../../shared/bsppretaskinghook.c
     42libbsp_a_SOURCES += ../../shared/bspgetworkarea.c
     43libbsp_a_SOURCES += ../../shared/bsppredriverhook.c
     44libbsp_a_SOURCES += startup/bspstart.c
     45libbsp_a_SOURCES += ../../shared/bootcard.c
     46libbsp_a_SOURCES += ../../shared/sbrk.c
     47libbsp_a_SOURCES += startup/inittlb.c
     48libbsp_a_SOURCES += ../shared/startup/idtmem.S
     49libbsp_a_SOURCES += ../shared/startup/idttlb.S
     50libbsp_a_SOURCES += ../shared/irq/exception.S
     51libbsp_a_SOURCES += startup/usc.S
    4252# clock
    4353libbsp_a_SOURCES += clock/ckinit.c
     54libbsp_a_SOURCES += clock/clock.h
     55
    4456# console
    4557libbsp_a_SOURCES += console/console.c
    4658# liblnk
    47 libbsp_a_SOURCES += ../shared/liblnk/lnklib.S ../shared/liblnk/pmon.S \
    48     ../shared/liblnk/regs.h
     59libbsp_a_SOURCES += ../shared/liblnk/lnklib.S
     60libbsp_a_SOURCES += ../shared/liblnk/pmon.S
     61libbsp_a_SOURCES += ../shared/liblnk/regs.h
     62#isr
     63libbsp_a_SOURCES += ../../shared/src/irq-generic.c
     64libbsp_a_SOURCES += ../../shared/src/irq-legacy.c
     65libbsp_a_SOURCES += ../../shared/src/irq-info.c
     66libbsp_a_SOURCES += ../../shared/src/irq-shell.c
     67libbsp_a_SOURCES += ../../shared/src/irq-server.c
     68libbsp_a_SOURCES += ../shared/irq/vectorexceptions.c
     69libbsp_a_SOURCES += ../shared/irq/irq.c
     70libbsp_a_SOURCES += ../shared/irq/maxvectors.c
     71libbsp_a_SOURCES += irq/vectorisrs.c
     72libbsp_a_SOURCES += ../shared/irq/interruptmask.c
    4973
    50 libbsp_a_LIBADD = \
    51     ../../../libcpu/@RTEMS_CPU@/shared/cache.rel \
    52     ../../../libcpu/@RTEMS_CPU@/shared/interrupts.rel \
    53     ../../../libcpu/@RTEMS_CPU@/rm52xx/timer.rel \
    54     ../../../libcpu/@RTEMS_CPU@/rm52xx/vectorisrs.rel
     74libbsp_a_LIBADD  = ../../../libcpu/@RTEMS_CPU@/shared/cache.rel
     75libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/shared/interrupts.rel
     76libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/rm52xx/timer.rel
    5577
    5678include $(srcdir)/preinstall.am
  • c/src/lib/libbsp/mips/hurricane/clock/ckinit.c

    reb6362dc r0c0181d  
    1 
    2 /*  ckinit.c
    3  *
     1/**
     2 *  @file
     3 * 
    44 *  This file contains the clock driver initialization for the Hurricane BSP.
    5  *
     5 */
     6
     7/*
    68 *  Author:     Craig Lebakken <craigl@transition.com>
    79 *
     
    1921 *      of this software for any purpose.
    2022 *
    21  *  Derived from c/src/lib/libbsp/no_cpu/no_bsp/clock/ckinit.c:
    22  *
    23  *  COPYRIGHT (c) 1989-1999.
     23 *  Derived from c/src/lib/libbsp/no_cpu/no_bsp/clock/ckinit.c
     24 *
     25 *  COPYRIGHT (c) 1989-2012.
    2426 *  On-Line Applications Research Corporation (OAR).
    2527 *
     
    2729 *  found in the file LICENSE in this distribution or at
    2830 *  http://www.rtems.com/license/LICENSE.
    29  *
     31 * 
    3032 *  $Id$
    3133 */
     
    4244
    4345#include <rtems.h>
     46#include <bsp.h>
     47#include <bsp/irq.h>
    4448
    4549extern uint32_t bsp_clicks_per_microsecond;
     
    4953#include "clock.h"
    5054
    51 /* to avoid including the bsp */
    52 mips_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int );
    53 
    54 void USC_isr( void );
     55rtems_isr USC_isr(void *unused);
     56
    5557void reset_wdt(void);
    5658void enable_wdi(void);
     
    5961void disable_hbi(void);
    6062
    61 void Clock_exit( void );
    62 rtems_isr Clock_isr( rtems_vector_number vector );
     63void Clock_exit(void);
     64rtems_isr Clock_isr(rtems_vector_number vector);
     65rtems_isr User_Clock_isr(rtems_vector_number vector);
     66void Install_clock(rtems_isr_entry clock_isr);
    6367
    6468
     
    8993
    9094/*
    91  * These are set by clock driver during its init
    92  */
    93 
    94 rtems_device_major_number rtems_clock_major = ~0;
    95 rtems_device_minor_number rtems_clock_minor;
    96 
    97 /*
    9895 *  The previous ISR on this clock tick interrupt vector.
    9996 */
     
    168165  disable_hbi();      /* Disable heartbeat interrupt in USC */
    169166
    170               /* Install interrupt handler */
    171   Old_ticker = (rtems_isr_entry) set_vector( USC_isr, CLOCK_VECTOR, 1 );
     167  /* Install interrupt handler */
     168  rtems_interrupt_handler_install(
     169    CLOCK_VECTOR,
     170    "clock",
     171    0,
     172    USC_isr,
     173    NULL
     174  );
    172175
    173176  init_hbt();        /* Initialize heartbeat timer */
     
    213216  Install_clock( Clock_isr );
    214217
    215   /*
    216    * make major/minor avail to others such as shared memory driver
    217    */
    218 
    219   rtems_clock_major = major;
    220   rtems_clock_minor = minor;
    221 
    222218  return RTEMS_SUCCESSFUL;
    223219}
  • c/src/lib/libbsp/mips/hurricane/include/bsp.h

    reb6362dc r0c0181d  
     1/**
     2 *  @file
     3 * 
     4 */
     5
    16/*
    2  *  COPYRIGHT (c) 1989-2008.
     7 *  COPYRIGHT (c) 1989-2012.
    38 *  On-Line Applications Research Corporation (OAR).
    49 *
     
    2833
    2934extern uint32_t mips_get_timer( void );
     35
     36#define BSP_FEATURE_IRQ_EXTENSION
     37#define BSP_SHARED_HANDLER_SUPPORT      1
    3038
    3139#define CPU_CLOCK_RATE_MHZ     (200)
  • c/src/lib/libbsp/mips/hurricane/preinstall.am

    reb6362dc r0c0181d  
    5454PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/regs.h
    5555
     56$(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     57        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
     58PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h
     59
     60$(PROJECT_INCLUDE)/bsp/irq-info.h: ../../shared/include/irq-info.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     61        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-info.h
     62PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-info.h
     63
     64$(PROJECT_INCLUDE)/bsp/irq.h: include/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     65        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h
     66PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h
     67
    5668$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
    5769        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
  • c/src/lib/libbsp/mips/hurricane/startup/bspstart.c

    reb6362dc r0c0181d  
    1 /*
     1/**
     2 *  @file
     3 * 
    24 *  This routine starts the application.  It includes application,
    35 *  board, and monitor specific initialization and configuration.
    46 *  The generic CPU dependent initialization has been performed
    57 *  before this routine is invoked.
    6  *
    7  *  COPYRIGHT (c) 1989-1999.
     8 */
     9
     10/*
     11 *  COPYRIGHT (c) 1989-2012.
    812 *  On-Line Applications Research Corporation (OAR).
    913 *
     
    1115 *  found in the file LICENSE in this distribution or at
    1216 *  http://www.rtems.com/license/LICENSE.
    13  *
     17 * 
    1418 *  $Id$
    1519 */
     
    1923#include <bsp.h>
    2024#include <libcpu/isr_entries.h>
     25#include <bsp/irq-generic.h>
    2126
     27void bsp_start( void );
    2228uint32_t bsp_clicks_per_microsecond;
    2329
     
    3238  bsp_clicks_per_microsecond = CPU_CLOCK_RATE_MHZ;
    3339
    34   mips_install_isr_entries(); /* Install generic MIPS exception handler */
     40  bsp_interrupt_initialize();
    3541}
  • c/src/lib/libbsp/mips/jmr3904/ChangeLog

    reb6362dc r0c0181d  
     12012-03-08      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     2
     3        * include/bsp.h: Added define for BSP_SHARED_HANDLER_SUPPORT.
     4
     52012-03-06      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     6
     7        PR 1993/bsps
     8        * clock/clockdrv.c, include/bsp.h,
     9        include/irq.h, irq/vectorisrs.c, startup/bspstart.c:
     10        Changed interrupt call, removed warnings and did cleanup.
     11
     122012-02-23      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     13
     14        PR 1993/bsps
     15        * Makefile.am, clock/clockdrv.c, include/irq.h,
     16        irq/vectorisrs.c, preinstall.am, startup/bspstart.c:
     17        Mips conversion to PIC IRQ model.
     18        * include/irq.h, irq/vectorisrs.c: New files.
     19
    1202011-12-14      Joel Sherrill <joel.sherrilL@OARcorp.com>
    221
  • c/src/lib/libbsp/mips/jmr3904/Makefile.am

    reb6362dc r0c0181d  
    1414include_HEADERS += include/tm27.h
    1515include_bsp_HEADERS = ../shared/liblnk/regs.h
     16#isr
     17include_bsp_HEADERS += ../../shared/include/irq-generic.h
     18include_bsp_HEADERS += ../../shared/include/irq-info.h
     19include_bsp_HEADERS += include/irq.h
    1620
    1721nodist_include_HEADERS = include/bspopts.h
     
    4044libbsp_a_SOURCES += ../../shared/bootcard.c
    4145libbsp_a_SOURCES += ../../shared/sbrk.c
    42 libbsp_a_SOURCES += ../../shared/gnatinstallhandler.c
    43 libbsp_a_SOURCES += ../../shared/setvec.c
    4446libbsp_a_SOURCES += ../../shared/bspreset.c
    4547# clock
     
    5153# timer
    5254libbsp_a_SOURCES += timer/timer.c
     55#isr
     56libbsp_a_SOURCES += ../../shared/src/irq-generic.c
     57libbsp_a_SOURCES += ../../shared/src/irq-legacy.c
     58libbsp_a_SOURCES += ../../shared/src/irq-info.c
     59libbsp_a_SOURCES += ../../shared/src/irq-shell.c
     60libbsp_a_SOURCES += ../../shared/src/irq-server.c
     61libbsp_a_SOURCES += ../shared/irq/vectorexceptions.c
     62libbsp_a_SOURCES += ../shared/irq/irq.c
     63libbsp_a_SOURCES += ../shared/irq/maxvectors.c
     64libbsp_a_SOURCES += irq/vectorisrs.c
     65libbsp_a_SOURCES += ../shared/irq/interruptmask.c
    5366
    5467libbsp_a_LIBADD  = ../../../libcpu/@RTEMS_CPU@/shared/cache.rel
    5568libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/shared/interrupts.rel
    56 libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/tx39/vectorisrs.rel
    57 libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/shared/cache.rel
    5869
    5970include $(srcdir)/preinstall.am
  • c/src/lib/libbsp/mips/jmr3904/clock/clockdrv.c

    reb6362dc r0c0181d  
    1 /*
     1/**
     2 *  @file
     3 * 
    24 *  Instantiate the clock driver shell.
    35 *
    46 *  The TX3904 simulator in gdb counts instructions.
    5  *
    6  *  COPYRIGHT (c) 1989-2009.
     7 */
     8
     9/*
     10 *  COPYRIGHT (c) 1989-2012.
    711 *  On-Line Applications Research Corporation (OAR).
    812 *
     
    1014 *  found in the file LICENSE in this distribution or at
    1115 *  http://www.rtems.com/license/LICENSE.
    12  *
     16 * 
    1317 *  $Id$
    1418 */
    1519
    1620#include <rtems.h>
    17 #include <libcpu/tx3904.h>
     21#include <bsp/irq.h>
    1822#include <bsp.h>
    1923
     
    2731
    2832#define CLICKS 5000
     33
    2934#define Clock_driver_support_install_isr( _new, _old ) \
    3035  do { \
    31     _old = set_vector( _new, CLOCK_VECTOR, 1 ); \
    32   } while(0)
     36    rtems_interrupt_handler_install( \
     37      CLOCK_VECTOR, \
     38      "clock", \
     39      0, \
     40      _new, \
     41      NULL \
     42    ); \
     43 } while(0)
    3344
    3445#define Clock_driver_support_initialize_hardware() \
  • c/src/lib/libbsp/mips/jmr3904/include/bsp.h

    reb6362dc r0c0181d  
    1 /*  bsp.h
    2  *
     1/**
     2 *  @file
     3 * 
    34 *  This include file contains some definitions specific to the
    45 *  JMR3904 simulator in gdb.
    5  *
    6  *  COPYRIGHT (c) 1989-2000.
     6 */
     7
     8/*
     9 *  COPYRIGHT (c) 1989-2012.
    710 *  On-Line Applications Research Corporation (OAR).
    811 *
     
    2932#include <libcpu/tx3904.h>
    3033
     34#define BSP_FEATURE_IRQ_EXTENSION
     35#define BSP_SHARED_HANDLER_SUPPORT      1
     36
    3137/* functions */
    3238
  • c/src/lib/libbsp/mips/jmr3904/preinstall.am

    reb6362dc r0c0181d  
    5050PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/regs.h
    5151
     52$(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     53        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
     54PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h
     55
     56$(PROJECT_INCLUDE)/bsp/irq-info.h: ../../shared/include/irq-info.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     57        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-info.h
     58PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-info.h
     59
     60$(PROJECT_INCLUDE)/bsp/irq.h: include/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     61        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h
     62PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h
     63
    5264$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
    5365        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
  • c/src/lib/libbsp/mips/jmr3904/startup/bspstart.c

    reb6362dc r0c0181d  
    1 /*
     1/**
     2 *  @file
     3 * 
    24 *  This routine starts the application.  It includes application,
    35 *  board, and monitor specific initialization and configuration.
    46 *  The generic CPU dependent initialization has been performed
    57 *  before this routine is invoked.
    6  *
    7  *  COPYRIGHT (c) 1989-2009.
     8 */
     9
     10/*
     11 *  COPYRIGHT (c) 1989-2012.
    812 *  On-Line Applications Research Corporation (OAR).
    913 *
     
    1115 *  found in the file LICENSE in this distribution or at
    1216 *  http://www.rtems.com/license/LICENSE.
    13  *
     17 * 
    1418 *  $Id$
    1519 */
     
    1822#include <libcpu/isr_entries.h>
    1923#include <bsp/bootcard.h>
    20 
    21 /*
    22  *  bsp_start
    23  *
    24  *  This routine does the bulk of the system initialization.
    25  */
    26 void bsp_start( void )
    27 {
    28   mips_set_sr( 0xff00 );  /* all interrupts unmasked but globally off */
    29                           /* depend on the IRC to take care of things */
    30   mips_install_isr_entries();
    31 }
    32 
    33 /*
    34  *  Required routine by some gcc run-times.
    35  */
    36 void clear_cache( void *address, size_t n )
    37 {
    38 }
     24#include <bsp/irq-generic.h>
     25#include <bsp/irq.h>
     26#include <bsp/irq-generic.h>
    3927
    4028/* Structure filled in by get_mem_info.  Only the size field is
     
    4836};
    4937
     38void bsp_start( void );
     39void clear_cache( void *address, size_t n );
     40void get_mem_info( struct s_mem *mem );
     41
     42/*
     43 *  bsp_start
     44 *
     45 *  This routine does the bulk of the system initialization.
     46 */
     47void bsp_start( void )
     48{
     49  mips_set_sr( 0xff00 );  /* all interrupts unmasked but globally off */
     50                          /* depend on the IRC to take care of things */
     51  bsp_interrupt_initialize();
     52}
     53
     54/*
     55 *  Required routine by some gcc run-times.
     56 */
     57void clear_cache( void *address, size_t n )
     58{
     59}
     60
     61
    5062void get_mem_info(
    5163  struct s_mem *mem
  • c/src/lib/libbsp/mips/rbtx4925/ChangeLog

    reb6362dc r0c0181d  
     12012-03-08      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     2
     3        * include/bsp.h: Added define for BSP_SHARED_HANDLER_SUPPORT.
     4
     52012-03-06      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     6
     7        PR 1993/bsps
     8        * clock/clockdrv.c, include/bsp.h,
     9        include/irq.h, irq/vectorisrs.c, startup/bspstart.c:
     10        Changed interrupt call, removed warnings and did cleanup.
     11
     122012-02-23      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     13
     14        PR 1993/bsps
     15        * Makefile.am, clock/clockdrv.c, include/irq.h,
     16        irq/vectorisrs.c, preinstall.am, startup/bspstart.c:
     17        Mips conversion to PIC IRQ model.
     18        * include/irq.h, irq/vectorisrs.c: New files.
     19
    1202011-12-14      Joel Sherrill <joel.sherrilL@OARcorp.com>
    221
  • c/src/lib/libbsp/mips/rbtx4925/Makefile.am

    reb6362dc r0c0181d  
    1414include_HEADERS += ../../shared/include/tm27.h
    1515include_bsp_HEADERS = ../shared/liblnk/regs.h
     16#isr
     17include_bsp_HEADERS += ../../shared/include/irq-generic.h
     18include_bsp_HEADERS += ../../shared/include/irq-info.h
     19include_bsp_HEADERS += include/irq.h
    1620
    1721nodist_include_HEADERS = include/bspopts.h
     
    4246libbsp_a_SOURCES += ../../shared/bootcard.c
    4347libbsp_a_SOURCES += ../../shared/sbrk.c
    44 libbsp_a_SOURCES += ../../shared/gnatinstallhandler.c
    45 libbsp_a_SOURCES += ../../shared/setvec.c
    4648libbsp_a_SOURCES += startup/inittlb.c
    4749libbsp_a_SOURCES += ../shared/startup/idttlb.S
     
    5759libbsp_a_SOURCES += ../shared/liblnk/pmon.S
    5860libbsp_a_SOURCES += ../shared/liblnk/regs.h
     61#isr
     62libbsp_a_SOURCES += ../../shared/src/irq-generic.c
     63libbsp_a_SOURCES += ../../shared/src/irq-legacy.c
     64libbsp_a_SOURCES += ../../shared/src/irq-info.c
     65libbsp_a_SOURCES += ../../shared/src/irq-shell.c
     66libbsp_a_SOURCES += ../../shared/src/irq-server.c
     67libbsp_a_SOURCES += ../shared/irq/vectorexceptions.c
     68libbsp_a_SOURCES += ../shared/irq/irq.c
     69libbsp_a_SOURCES += ../shared/irq/maxvectors.c
     70libbsp_a_SOURCES += irq/vectorisrs.c
     71libbsp_a_SOURCES += ../shared/irq/interruptmask_TX49.c
    5972
    6073libbsp_a_LIBADD  = ../../../libcpu/@RTEMS_CPU@/shared/cache.rel
    6174libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/shared/interrupts.rel
    6275libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/tx49/timer.rel
    63 libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/tx49/vectorisrs.rel
    6476
    6577include $(srcdir)/preinstall.am
  • c/src/lib/libbsp/mips/rbtx4925/clock/clockdrv.c

    reb6362dc r0c0181d  
     1/**
     2 *  @file
     3 * 
     4 *  Instantiate the clock driver shell.
     5 */
     6
    17/*
    2  *  Instantiate the clock driver shell.
     8 *  COPYRIGHT (c) 1989-2012.
     9 *  On-Line Applications Research Corporation (OAR).
    310 *
    4  *  clockdrv.c,v 1.5 2001/01/09 17:05:57 joel Exp
     11 *  The license and distribution terms for this file may be
     12 *  found in the file LICENSE in this distribution or at
     13 *  http://www.rtems.com/license/LICENSE.
     14 *
     15 *  $Id$
    516 */
    617
    718#include <rtems.h>
    8 #include <libcpu/tx4925.h>
     19#include <bsp/irq.h>
    920#include <bsp.h>
    1021
     
    3243#define Clock_driver_support_install_isr( _new, _old ) \
    3344  do { \
    34     _old = set_vector( _new, CLOCK_VECTOR, 1 ); \
    35   } while(0)
     45    rtems_interrupt_handler_install( \
     46      CLOCK_VECTOR, \
     47      "clock", \
     48      0, \
     49      _new, \
     50      NULL \
     51    ); \
     52 } while(0)
    3653
    3754
  • c/src/lib/libbsp/mips/rbtx4925/include/bsp.h

    reb6362dc r0c0181d  
    1 /*  bsp.h
    2  *
     1/**
     2 *  @file
     3 * 
    34 *  This include file contains some definitions specific to the RBTX4925.
    4  *
    5  *  COPYRIGHT (c) 1989-2000.
     5 */
     6
     7/*
     8 *  COPYRIGHT (c) 1989-2012.
    69 *  On-Line Applications Research Corporation (OAR).
    710 *
     
    1013 *  http://www.rtems.com/license/LICENSE.
    1114 *
    12  *  bsp.h,v 1.7.6.1 2003/09/04 18:44:49 joel Exp
     15 *  $Id$
    1316 */
    1417
     
    2831#include <libcpu/tx4925.h>
    2932
     33#define BSP_FEATURE_IRQ_EXTENSION
     34#define BSP_SHARED_HANDLER_SUPPORT      1
     35
    3036/* functions */
    3137
  • c/src/lib/libbsp/mips/rbtx4925/preinstall.am

    reb6362dc r0c0181d  
    5050PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/regs.h
    5151
     52$(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     53        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
     54PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h
     55
     56$(PROJECT_INCLUDE)/bsp/irq-info.h: ../../shared/include/irq-info.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     57        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-info.h
     58PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-info.h
     59
     60$(PROJECT_INCLUDE)/bsp/irq.h: include/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     61        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h
     62PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h
     63
    5264$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
    5365        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
  • c/src/lib/libbsp/mips/rbtx4925/startup/bspstart.c

    reb6362dc r0c0181d  
    1 /*
     1/**
     2 *  @file
     3 * 
    24 *  This routine starts the application.  It includes application,
    35 *  board, and monitor specific initialization and configuration.
    46 *  The generic CPU dependent initialization has been performed
    57 *  before this routine is invoked.
    6  *
    7  *  COPYRIGHT (c) 1989-2000.
     8 */
     9
     10/*
     11 *  COPYRIGHT (c) 1989-2012.
    812 *  On-Line Applications Research Corporation (OAR).
    913 *
     
    1115 *  found in the file LICENSE in this distribution or at
    1216 *  http://www.rtems.com/license/LICENSE.
    13  *
    14  *  bspstart.c,v 1.4.2.1 2003/09/04 18:44:49 joel Exp
     17 * 
     18 *  $Id$
    1519 */
    1620
    1721#include <bsp.h>
    1822#include <libcpu/isr_entries.h>
     23#include <bsp/irq-generic.h>
     24
     25void bsp_start( void );
    1926
    2027/*
     
    2532void bsp_start( void )
    2633{
    27   mips_install_isr_entries();  /* Install generic MIPS exception handler */
     34  bsp_interrupt_initialize();
    2835}
    2936
  • c/src/lib/libbsp/mips/rbtx4938/ChangeLog

    reb6362dc r0c0181d  
     12012-03-08      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     2
     3        * include/bsp.h: Added define for BSP_SHARED_HANDLER_SUPPORT.
     4
     52012-03-06      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     6
     7        PR 1993/bsps
     8        * clock/clockdrv.c, include/bsp.h, include/irq.h,
     9        irq/vectorisrs.c, startup/bspstart.c:
     10        Changed interrupt call, removed warnings and did cleanup.
     11
     122012-02-23      Jennifer Averett <Jennifer.Averett@OARcorp.com>
     13
     14        PR 1993/bsps
     15        * Makefile.am, clock/clockdrv.c, include/irq.h,
     16        irq/vectorisrs.c, preinstall.am, startup/bspstart.c,
     17        Mips conversion to PIC IRQ model.
     18        * include/irq.h, irq/vectorisrs.c: New files.
     19
    1202011-12-14      Joel Sherrill <joel.sherrilL@OARcorp.com>
    221
  • c/src/lib/libbsp/mips/rbtx4938/Makefile.am

    reb6362dc r0c0181d  
    1414include_HEADERS += ../../shared/include/tm27.h
    1515include_bsp_HEADERS = ../shared/liblnk/regs.h
     16#isr
     17include_bsp_HEADERS += ../../shared/include/irq-generic.h
     18include_bsp_HEADERS += ../../shared/include/irq-info.h
     19include_bsp_HEADERS += include/irq.h
    1620
    1721nodist_include_HEADERS = include/bspopts.h
     
    4246libbsp_a_SOURCES += ../../shared/bootcard.c
    4347libbsp_a_SOURCES += ../../shared/sbrk.c
    44 libbsp_a_SOURCES += ../../shared/gnatinstallhandler.c
    45 libbsp_a_SOURCES += ../../shared/setvec.c
    4648libbsp_a_SOURCES += startup/inittlb.c
    4749libbsp_a_SOURCES += ../shared/startup/idttlb.S
     
    5759libbsp_a_SOURCES += ../shared/liblnk/pmon.S
    5860libbsp_a_SOURCES += ../shared/liblnk/regs.h
     61#isr
     62libbsp_a_SOURCES += ../../shared/src/irq-generic.c
     63libbsp_a_SOURCES += ../../shared/src/irq-legacy.c
     64libbsp_a_SOURCES += ../../shared/src/irq-info.c
     65libbsp_a_SOURCES += ../../shared/src/irq-shell.c
     66libbsp_a_SOURCES += ../../shared/src/irq-server.c
     67libbsp_a_SOURCES += ../shared/irq/vectorexceptions.c
     68libbsp_a_SOURCES += ../shared/irq/irq.c
     69libbsp_a_SOURCES += ../shared/irq/maxvectors.c
     70libbsp_a_SOURCES += irq/vectorisrs.c
     71libbsp_a_SOURCES += ../shared/irq/interruptmask_TX49.c
    5972
    6073libbsp_a_LIBADD  = ../../../libcpu/@RTEMS_CPU@/shared/cache.rel
    6174libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/shared/interrupts.rel
    6275libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/tx49/timer.rel
    63 libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/tx49/vectorisrs.rel
    6476
    6577include $(srcdir)/preinstall.am
  • c/src/lib/libbsp/mips/rbtx4938/clock/clockdrv.c

    reb6362dc r0c0181d  
     1/**
     2 *  @file
     3 * 
     4 *  Instantiate the clock driver shell.
     5 */
     6
    17/*
    2  *  Instantiate the clock driver shell.
     8 *  COPYRIGHT (c) 1989-2012.
     9 *  On-Line Applications Research Corporation (OAR).
    310 *
    4  *  clockdrv.c,v 1.5 2001/01/09 17:05:57 joel Exp
     11 *  The license and distribution terms for this file may be
     12 *  found in the file LICENSE in this distribution or at
     13 *  http://www.rtems.com/license/LICENSE.
     14 *
     15 *  $Id$
    516 */
    617
    718#include <rtems.h>
    8 #include <libcpu/tx4938.h>
     19#include <bsp/irq.h>
    920#include <bsp.h>
    1021
     
    3142#endif
    3243
     44void new_brk_esr(void);
    3345
    3446t_yamon_retfunc esr_retfunc = 0;
     
    5062#define Clock_driver_support_install_isr( _new, _old ) \
    5163  do { \
    52     _old = set_vector( _new, CLOCK_VECTOR, 1 ); \
    53         YAMON_FUNC_REGISTER_IC_ISR(17,(t_yamon_isr)_new,0,&original_tmr0_isr); /* Call Yamon to enable interrupt */ \
     64    rtems_interrupt_handler_install( \
     65      CLOCK_VECTOR, \
     66      "clock", \
     67      0, \
     68      _new, \
     69      NULL \
     70    ); \
     71    YAMON_FUNC_REGISTER_IC_ISR(17,(t_yamon_isr)_new,0,&original_tmr0_isr); /* Call Yamon to enable interrupt */ \
    5472  } while(0)
    5573
  • c/src/lib/libbsp/mips/rbtx4938/include/bsp.h

    reb6362dc r0c0181d  
    1 /*  bsp.h
    2  *
     1/**
     2 *  @file
     3 * 
    34 *  This include file contains some definitions specific to the RBTX4938.
    4  *
    5  *  COPYRIGHT (c) 1989-2000.
     5 */
     6
     7/*
     8 *  COPYRIGHT (c) 1989-2012.
    69 *  On-Line Applications Research Corporation (OAR).
    710 *
     
    1013 *  http://www.rtems.com/license/LICENSE.
    1114 *
    12  *  bsp.h,v 1.7.6.1 2003/09/04 18:44:49 joel Exp
     15 *  $Id$
    1316 */
    1417
     
    2831#include <libcpu/tx4938.h>
    2932
     33#define BSP_FEATURE_IRQ_EXTENSION
     34#define BSP_SHARED_HANDLER_SUPPORT      1
     35
    3036/* functions */
    3137
  • c/src/lib/libbsp/mips/rbtx4938/preinstall.am

    reb6362dc r0c0181d  
    5050PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/regs.h
    5151
     52$(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     53        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
     54PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h
     55
     56$(PROJECT_INCLUDE)/bsp/irq-info.h: ../../shared/include/irq-info.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     57        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-info.h
     58PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-info.h
     59
     60$(PROJECT_INCLUDE)/bsp/irq.h: include/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     61        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h
     62PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h
     63
    5264$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
    5365        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
  • c/src/lib/libbsp/mips/rbtx4938/startup/bspstart.c

    reb6362dc r0c0181d  
    1 /*
     1/**
     2 *  @file
     3 * 
    24 *  This routine starts the application.  It includes application,
    35 *  board, and monitor specific initialization and configuration.
    46 *  The generic CPU dependent initialization has been performed
    57 *  before this routine is invoked.
    6  *
    7  *  COPYRIGHT (c) 1989-2000.
     8 */
     9
     10/*
     11 *  COPYRIGHT (c) 1989-2012.
    812 *  On-Line Applications Research Corporation (OAR).
    913 *
     
    1115 *  found in the file LICENSE in this distribution or at
    1216 *  http://www.rtems.com/license/LICENSE.
    13  *
    14  *  bspstart.c,v 1.4.2.1 2003/09/04 18:44:49 joel Exp
     17 * 
     18 *  $Id$
    1519 */
    1620
    1721#include <bsp.h>
    1822#include <libcpu/isr_entries.h>
     23#include <bsp/irq-generic.h>
     24
     25void bsp_start( void );
    1926
    2027/*
     
    2532void bsp_start( void )
    2633{
    27   mips_install_isr_entries();  /* Install generic MIPS exception handler */
     34  bsp_interrupt_initialize();
    2835}
  • c/src/lib/libbsp/mips/shared/irq/maxvectors.c

    reb6362dc r0c0181d  
    1 /*
     1/**
     2 *  @file
     3 * 
    24 *  This file contains the maximum number of vectors.  This can not
    35 *  be determined without knowing the RTEMS CPU model.
    4  *
    5  *  COPYRIGHT (c) 1989-2000.
     6 */
     7
     8/*
     9 *  COPYRIGHT (c) 1989-2012.
    610 *  On-Line Applications Research Corporation (OAR).
    711 *
     
    913 *  found in the file LICENSE in this distribution or at
    1014 *  http://www.rtems.com/license/LICENSE.
    11  *
     15 * 
    1216 *  $Id$
    1317 */
    1418
    15 /*
    16  *  Reserve first 32 for exceptions.
    17  */
     19#include <rtems.h>
     20#include <bsp/irq.h>
    1821
    19 unsigned int mips_interrupt_number_of_vectors = 32 + 8;
     22unsigned int mips_interrupt_number_of_vectors = BSP_INTERRUPT_VECTOR_MAX;
  • c/src/lib/libbsp/mips/shared/irq/vectorexceptions.c

    reb6362dc r0c0181d  
    1 /*
     1/**
     2 *  @file
     3 * 
    24 *  Common Code for Vectoring MIPS Exceptions
    35 *
    46 *  The actual decoding of the cause register and vector number assignment
    57 *  is CPU model specific.
     8 */
     9
     10/*
     11 *  COPYRIGHT (c) 1989-2012.
     12 *  On-Line Applications Research Corporation (OAR).
    613 *
     14 *  The license and distribution terms for this file may be
     15 *  found in the file LICENSE in this distribution or at
     16 *  http://www.rtems.com/license/LICENSE.
     17 *
    718 *  $Id$
    819 */
     
    1425#include <rtems/mips/idtcpu.h>
    1526#include <rtems/bspIo.h>
     27#include <bsp/irq-generic.h>
     28
     29void mips_vector_exceptions( CPU_Interrupt_frame *frame );
    1630
    1731static const char *cause_strings[32] =
     
    88102}
    89103
    90 static void mips_default_exception_code_handler( int exc, CPU_Interrupt_frame *frame )
    91 {
    92   uint32_t sr;
    93   uint32_t cause;
    94 
    95   mips_get_sr( sr );
    96   mips_get_cause( cause );
    97 
    98   printk( "Unhandled exception %d\n", exc );
    99   printk( "sr: 0x%08x  cause: 0x%08x --> %s\n", sr, cause,
    100      cause_strings[(cause >> 2) &0x1f] );
    101   mips_dump_exception_frame( frame );
    102 
    103   rtems_fatal_error_occurred(1);
    104 }
    105 
    106 #define CALL_EXC(_vector,_frame) \
    107    do { \
    108         if ( _ISR_Vector_table[_vector] ) \
    109              (_ISR_Vector_table[_vector])(_vector,_frame); \
    110           else \
    111              mips_default_exception_code_handler( _vector, _frame ); \
    112    } while(0)
    113 
    114104/*
    115105 *  There are constants defined for these but they should basically
     
    125115  exc = (cause >> 2) & 0x1f;
    126116
    127   CALL_EXC( exc, frame );
     117  bsp_interrupt_handler_dispatch( exc );
    128118}
  • c/src/lib/libbsp/shared/clockdrv_shell.h

    reb6362dc r0c0181d  
     1/**
     2 *  @file
     3 * 
     4 *  Clock Tick Device Driver Shell
     5 */
     6
    17/*
    2  *  Clock Tick Device Driver Shell
    3  *
    4  *  COPYRIGHT (c) 1989-2009.
     8 *  COPYRIGHT (c) 1989-2012.
    59 *  On-Line Applications Research Corporation (OAR).
    610 *
     
    5357 *  Return values:      NONE
    5458 */
     59#ifdef BSP_FEATURE_IRQ_EXTENSION
     60rtems_isr Clock_isr(void *arg);
     61rtems_isr Clock_isr(void *arg)
     62{
     63#else
     64rtems_isr Clock_isr(rtems_vector_number vector);
    5565rtems_isr Clock_isr(
    5666  rtems_vector_number vector
    5767)
    5868{
     69#endif
    5970  /*
    6071   *  Accurate count of ISRs
Note: See TracChangeset for help on using the changeset viewer.