source: rtems/c/src/lib/libbsp/arm/gba/irq/irq_init.c @ f3343c6e

4.104.114.84.95
Last change on this file since f3343c6e was f3343c6e, checked in by Joel Sherrill <joel.sherrill@…>, on 09/12/07 at 15:15:32

2007-09-12 Joel Sherrill <joel.sherrill@…>

PR 1257/bsps

  • csb336/network/lan91c11x.c, csb337/startup/bspstart.c, edb7312/irq/irq.c, gba/irq/irq.c, gba/irq/irq_init.c, gp32/startup/bspstart.c, rtl22xx/startup/bspstart.c, shared/abort/abort.c, shared/abort/simple_abort.c, shared/irq/irq_init.c: Code outside of cpukit should use the public API for rtems_interrupt_disable/rtems_interrupt_enable. By bypassing the public API and directly accessing _CPU_ISR_Disable and _CPU_ISR_Enable, they were bypassing the compiler memory barrier directive which could lead to problems. This patch also changes the type of the variable passed into these routines and addresses minor style issues.
  • Property mode set to 100644
File size: 1.8 KB
Line 
1/**
2 *  @file irq_init.c
3 *
4 *  This file contains the implementation of rtems initialization
5 *  related to interrupt handling.
6 */
7/*
8 *  RTEMS GBA BSP
9 *
10 *  CopyRight (C) 2000 Canon Research Centre France SA.
11 *      Emmanuel Raguet, mailto:raguet@crf.canon.fr
12 *
13 *  Copyright (c) 2004  Markku Puro <markku.puro@kopteri.net>
14 *
15 *  The license and distribution terms for this file may be
16 *  found in found in the file LICENSE in this distribution or at
17 *  http://www.rtems.com/license/LICENSE.
18 *
19 *  $Id$
20 */
21#include <stdint.h>
22#include <bsp.h>
23#include <irq.h>
24#include <rtems/bspIo.h>
25
26/**  default int vector */
27extern void _ISR_Handler(void);
28
29/** max number of vectors, defined in linkcmds  */
30extern  void _irq_max_vector;
31
32/**
33 *  @brief default_int_handler BSP routine is default int_handler
34 *
35 *  @param  None
36 *  @return None
37 */
38void default_int_handler(void)
39{
40    printk("raw_idt_notify has been called \n");
41}
42
43/**
44 *  @brief rtems_irq_mngt_init BSP routine initialize rtems_irq_mngt
45 *
46 *  @param  None
47 *  @return None
48 */
49void  rtems_irq_mngt_init(void)
50{
51    int   i;
52    uint32_t              *vectorTable;
53    rtems_interrupt_level  level;
54
55    vectorTable = (uint32_t *)VECTOR_TABLE;
56
57    rtems_interrupt_disable(level);
58
59    /* @todo Can't use exception vectors in GBA because they are already in GBA ROM BIOS */
60    /* First, connect the ISR_Handler for IRQ and FIQ interrupts */
61    /*_CPU_ISR_install_vector(ARM_EXCEPTION_IRQ, _ISR_Handler, NULL);*/
62    /*_CPU_ISR_install_vector(ARM_EXCEPTION_FIQ, _ISR_Handler, NULL);*/
63
64    /* Initialize the vector table contents with default handler */
65    for (i=0 ; i < (uint32_t)&_irq_max_vector ; i++) {
66       *(vectorTable + i) = (uint32_t)(default_int_handler);
67    }
68    /* Initialize the INT at the BSP level */
69    BSP_rtems_irq_mngt_init();
70}
71
Note: See TracBrowser for help on using the repository browser.