Changeset dd8df59 in rtems


Ignore:
Timestamp:
Nov 14, 2012, 12:59:27 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
b1e8a58
Parents:
b9bc399
git-author:
Sebastian Huber <sebastian.huber@…> (11/14/12 12:59:27)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/15/12 14:33:13)
Message:

bsps: Interrupt initialization error is fatal

Location:
c/src/lib/libbsp
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/csb336/startup/bspstart.c

    rb9bc399 rdd8df59  
    6464   * Init rtems interrupt management
    6565   */
    66   if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
    67     _CPU_Fatal_halt(0xe);
    68   }
     66  bsp_interrupt_initialize();
    6967} /* bsp_start */
    7068
  • c/src/lib/libbsp/arm/csb337/startup/bspstart.c

    rb9bc399 rdd8df59  
    6363   * Init rtems interrupt management
    6464   */
    65   if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
    66     _CPU_Fatal_halt(0xe);
    67   }
     65  bsp_interrupt_initialize();
    6866
    6967} /* bsp_start */
  • c/src/lib/libbsp/arm/edb7312/startup/bspstart.c

    rb9bc399 rdd8df59  
    4444   * Init rtems interrupt management
    4545   */
    46   if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
    47     _CPU_Fatal_halt(0xe);
    48   }
     46  bsp_interrupt_initialize();
    4947} /* bsp_start */
    5048
  • c/src/lib/libbsp/arm/gba/startup/bspstart.c

    rb9bc399 rdd8df59  
    4747
    4848  /* Init rtems interrupt management */
    49   if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
    50     _CPU_Fatal_halt(0xe);
    51   }
     49  bsp_interrupt_initialize();
    5250}
    5351
  • c/src/lib/libbsp/arm/gp32/startup/bspstart.c

    rb9bc399 rdd8df59  
    9393   * Init rtems interrupt management
    9494   */
    95   if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
    96     _CPU_Fatal_halt(0xe);
    97   }
     95  bsp_interrupt_initialize();
    9896}
    9997
  • c/src/lib/libbsp/arm/gumstix/startup/bspstart.c

    rb9bc399 rdd8df59  
    3535  XSCALE_INT_ICMR = 0x0;
    3636  rtems_exception_init_mngt();
    37   if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
    38     _CPU_Fatal_halt(0xe);
    39   }
     37  bsp_interrupt_initialize();
    4038} /* bsp_start */
    4139
  • c/src/lib/libbsp/arm/lm3s69xx/startup/bspstart.c

    rb9bc399 rdd8df59  
    2121void bsp_start(void)
    2222{
    23   if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
    24     _CPU_Fatal_halt(0xe);
    25   }
     23  bsp_interrupt_initialize();
    2624}
  • c/src/lib/libbsp/arm/lpc24xx/startup/bspstart.c

    rb9bc399 rdd8df59  
    8888
    8989  /* Interrupts */
    90   if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
    91     _CPU_Fatal_halt(0xe);
    92   }
     90  bsp_interrupt_initialize();
    9391
    9492  /* DMA */
  • c/src/lib/libbsp/arm/lpc32xx/startup/bspstart.c

    rb9bc399 rdd8df59  
    3030void bsp_start(void)
    3131{
    32   if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
    33     _CPU_Fatal_halt(0xe);
    34   }
     32  bsp_interrupt_initialize();
    3533}
  • c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c

    rb9bc399 rdd8df59  
    8686   * Init rtems interrupt management
    8787   */
    88   if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
    89     _CPU_Fatal_halt(0xe);
    90   }
     88  bsp_interrupt_initialize();
    9189} /* bsp_start */
    9290
  • c/src/lib/libbsp/arm/stm32f4/startup/bspstart.c

    rb9bc399 rdd8df59  
    2323  stm32f4_gpio_set_config_array(&stm32f4_start_config_gpio [0]);
    2424
    25   if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
    26     _CPU_Fatal_halt(0xe);
    27   }
     25  bsp_interrupt_initialize();
    2826}
  • c/src/lib/libbsp/i386/shared/irq/irq_init.c

    rb9bc399 rdd8df59  
    159159     * Init initial Interrupt management config
    160160     */
    161     if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
    162       /*
    163        * put something here that will show the failure...
    164        */
    165       printk("Unable to initialize RTEMS interrupt Management!!! System locked\n");
    166       while (1);
    167     }
     161    bsp_interrupt_initialize();
    168162
    169163    /*
  • c/src/lib/libbsp/powerpc/gen5200/startup/bspstart.c

    rb9bc399 rdd8df59  
    185185
    186186  /* Initalize interrupt support */
    187   sc = bsp_interrupt_initialize();
    188   if (sc != RTEMS_SUCCESSFUL) {
    189     BSP_panic("cannot intitialize interrupts");
    190   }
     187  bsp_interrupt_initialize();
    191188
    192189  /*
  • c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c

    rb9bc399 rdd8df59  
    151151
    152152  /* Initalize interrupt support */
    153   sc = bsp_interrupt_initialize();
    154   if (sc != RTEMS_SUCCESSFUL) {
    155     BSP_panic("cannot intitialize interrupts\n");
    156   }
     153  bsp_interrupt_initialize();
    157154
    158155#ifdef SHOW_MORE_INIT_SETTINGS
  • c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c

    rb9bc399 rdd8df59  
    124124
    125125  /* Initalize interrupt support */
    126   sc = bsp_interrupt_initialize();
    127   if ( sc != RTEMS_SUCCESSFUL ) {
    128     BSP_panic( "cannot initialize interrupts" );
    129   }
     126  bsp_interrupt_initialize();
    130127
    131128  /*
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c

    rb9bc399 rdd8df59  
    131131
    132132        /* Initialize interrupts */
    133         sc = bsp_interrupt_initialize();
    134         if (sc != RTEMS_SUCCESSFUL) {
    135                 BSP_panic( "Cannot initialize interrupts");
    136         }
     133        bsp_interrupt_initialize();
    137134
    138135        mpc55xx_edma_init();
  • c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c

    rb9bc399 rdd8df59  
    184184
    185185  /* Initalize interrupt support */
    186   sc = bsp_interrupt_initialize();
    187   if (sc != RTEMS_SUCCESSFUL) {
    188     BSP_panic("cannot intitialize interrupts");
    189   }
    190 
     186  bsp_interrupt_initialize();
    191187
    192188/*
  • c/src/lib/libbsp/powerpc/qemuppc/startup/bspstart.c

    rb9bc399 rdd8df59  
    108108
    109109  /* Initalize interrupt support */
    110   sc = bsp_interrupt_initialize();
    111   if (sc != RTEMS_SUCCESSFUL) {
    112     BSP_panic("cannot intitialize interrupts");
    113   }
     110  bsp_interrupt_initialize();
    114111
    115112#if 0
  • c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c

    rb9bc399 rdd8df59  
    127127
    128128  /* Initalize interrupt support */
    129   sc = bsp_interrupt_initialize();
    130   if (sc != RTEMS_SUCCESSFUL) {
    131     BSP_panic("cannot intitialize interrupts\n");
    132   }
     129  bsp_interrupt_initialize();
    133130
    134131  /* Disable boot page translation */
  • c/src/lib/libbsp/powerpc/t32mppc/startup/bspstart.c

    rb9bc399 rdd8df59  
    7878
    7979  /* Initalize interrupt support */
    80   sc = bsp_interrupt_initialize();
    81   if (sc != RTEMS_SUCCESSFUL) {
    82     BSP_panic("cannot initialize interrupts\n");
    83   }
     80  bsp_interrupt_initialize();
    8481}
  • c/src/lib/libbsp/powerpc/tqm8xx/startup/bspstart.c

    rb9bc399 rdd8df59  
    193193
    194194  /* Initalize interrupt support */
    195   sc = bsp_interrupt_initialize();
    196   if (sc != RTEMS_SUCCESSFUL) {
    197     BSP_panic("cannot intitialize interrupts");
    198   }
     195  bsp_interrupt_initialize();
    199196
    200197#ifdef SHOW_MORE_INIT_SETTINGS
  • c/src/lib/libbsp/shared/include/bootcard.h

    rb9bc399 rdd8df59  
    5050 * @{
    5151 */
     52
     53/**
     54 * @brief Generic BSP fatal error codes.
     55 */
     56typedef enum {
     57  BSP_GENERIC_FATAL_INTERRUPT_INITIALIZATION
     58} bsp_generic_fatal_code;
    5259
    5360/**
  • c/src/lib/libbsp/shared/include/irq-generic.h

    rb9bc399 rdd8df59  
    1010 * Based on concepts of Pavel Pisa, Till Straumann and Eric Valette.
    1111 *
    12  * Copyright (c) 2008, 2009, 2010
    13  * embedded brains GmbH
    14  * Obere Lagerstr. 30
    15  * D-82178 Puchheim
    16  * Germany
    17  * <rtems@embedded-brains.de>
     12 * Copyright (c) 2008-2012 embedded brains GmbH.
     13 *
     14 *  embedded brains GmbH
     15 *  Obere Lagerstr. 30
     16 *  82178 Puchheim
     17 *  Germany
     18 *  <rtems@embedded-brains.de>
    1819 *
    1920 * The license and distribution terms for this file may be
     
    164165 *
    165166 * You must call this function before you can install, remove and dispatch
    166  * interrupt handlers.  The BSP specific bsp_interrupt_facility_initialize()
    167  * function will be called after all internals are initialized.  Initialization
    168  * is complete if everything was successful.
    169  */
    170 rtems_status_code bsp_interrupt_initialize(void);
     167 * interrupt handlers.  There is no protection against concurrent
     168 * initialization.  This function must be called at most once.  The BSP
     169 * specific bsp_interrupt_facility_initialize() function will be called after
     170 * all internals are initialized.  If the BSP specific initialization fails,
     171 * then this is a fatal error.  The fatal error source is
     172 * RTEMS_FATAL_SOURCE_BSP_GENERIC and the fatal error code is
     173 * BSP_GENERIC_FATAL_INTERRUPT_INITIALIZATION.
     174 */
     175void bsp_interrupt_initialize(void);
    171176
    172177/**
  • c/src/lib/libbsp/shared/src/irq-generic.c

    rb9bc399 rdd8df59  
    1010 * Based on concepts of Pavel Pisa, Till Straumann and Eric Valette.
    1111 *
    12  * Copyright (c) 2008, 2009
    13  * embedded brains GmbH
    14  * Obere Lagerstr. 30
    15  * D-82178 Puchheim
    16  * Germany
    17  * <rtems@embedded-brains.de>
     12 * Copyright (c) 2008-2012 embedded brains GmbH.
     13 *
     14 *  embedded brains GmbH
     15 *  Obere Lagerstr. 30
     16 *  82178 Puchheim
     17 *  Germany
     18 *  <rtems@embedded-brains.de>
    1819 *
    1920 * The license and distribution terms for this file may be
     
    2324
    2425#include <bsp/irq-generic.h>
     26#include <bsp/bootcard.h>
    2527
    2628#include <stdlib.h>
     
    156158}
    157159
    158 rtems_status_code bsp_interrupt_initialize(void)
     160void bsp_interrupt_initialize(void)
    159161{
    160162  rtems_status_code sc = RTEMS_SUCCESSFUL;
    161163  size_t i = 0;
    162 
    163   bsp_interrupt_lock();
    164 
    165   if (bsp_interrupt_is_initialized()) {
    166     bsp_interrupt_unlock();
    167     return RTEMS_INTERNAL_ERROR;
    168   }
    169164
    170165  /* Initialize handler table */
     
    176171  sc = bsp_interrupt_facility_initialize();
    177172  if (sc != RTEMS_SUCCESSFUL) {
    178     bsp_interrupt_unlock();
    179     return sc;
     173    rtems_fatal(
     174      RTEMS_FATAL_SOURCE_BSP_GENERIC,
     175      BSP_GENERIC_FATAL_INTERRUPT_INITIALIZATION
     176    );
    180177  }
    181178
    182179  bsp_interrupt_set_initialized();
    183 
    184   bsp_interrupt_unlock();
    185 
    186   return RTEMS_SUCCESSFUL;
    187180}
    188181
  • c/src/lib/libbsp/sparc/erc32/include/bsp.h

    rb9bc399 rdd8df59  
    9494
    9595/* Initializes the Shared System Interrupt service */
    96 extern int BSP_shared_interrupt_init(void);
     96extern void BSP_shared_interrupt_init(void);
    9797
    9898/* Registers a shared IRQ handler, and enable it at IRQ controller. Multiple
  • c/src/lib/libbsp/sparc/leon2/include/bsp.h

    rb9bc399 rdd8df59  
    114114
    115115/* Initializes the Shared System Interrupt service */
    116 extern int BSP_shared_interrupt_init(void);
     116extern void BSP_shared_interrupt_init(void);
    117117
    118118/* Registers a shared IRQ handler, and enable it at IRQ controller. Multiple
  • c/src/lib/libbsp/sparc/leon3/include/bsp.h

    rb9bc399 rdd8df59  
    127127
    128128/* Initializes the Shared System Interrupt service */
    129 extern int BSP_shared_interrupt_init(void);
     129extern void BSP_shared_interrupt_init(void);
    130130
    131131/* Registers a shared IRQ handler, and enable it at IRQ controller. Multiple
  • c/src/lib/libbsp/sparc/shared/irq/irq-shared.c

    rb9bc399 rdd8df59  
    2626
    2727/* Initialize interrupts */
    28 int BSP_shared_interrupt_init(void)
     28void BSP_shared_interrupt_init(void)
    2929{
    3030       rtems_vector_number vector;
     
    3838
    3939       /* Initalize interrupt support */
    40        sc = bsp_interrupt_initialize();
    41        if (sc != RTEMS_SUCCESSFUL)
    42                return -1;
    43 
    44        return 0;
     40       bsp_interrupt_initialize();
    4541}
    4642
Note: See TracChangeset for help on using the changeset viewer.