Changeset b1e8a58 in rtems


Ignore:
Timestamp:
Nov 14, 2012, 8:57:55 AM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
a0c7aa55
Parents:
dd8df59
git-author:
Sebastian Huber <sebastian.huber@…> (11/14/12 08:57:55)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/15/12 14:33:13)
Message:

bsps/powerpc: Exception initialization error is fatal

Location:
c/src/lib
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c

    rdd8df59 rb1e8a58  
    276276void bsp_start( void )
    277277{
    278   rtems_status_code sc = RTEMS_SUCCESSFUL;
    279278  uintptr_t intrStackStart;
    280279  uintptr_t intrStackSize;
     
    321320   * Initialize default raw exception hanlders.
    322321   */
    323   sc = ppc_exc_initialize(
     322  ppc_exc_initialize(
    324323    PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
    325324    intrStackStart,
    326325    intrStackSize
    327326  );
    328   if (sc != RTEMS_SUCCESSFUL) {
    329     BSP_panic("cannot initialize exceptions");
    330   }
    331327
    332328  /*
  • c/src/lib/libbsp/powerpc/gen5200/startup/bspstart.c

    rdd8df59 rb1e8a58  
    126126void bsp_start(void)
    127127{
    128   rtems_status_code sc = RTEMS_SUCCESSFUL;
    129128  ppc_cpu_id_t myCpu;
    130129  ppc_cpu_revision_t myCpuRevision;
     
    174173  /* Initialize exception handler */
    175174  ppc_exc_cache_wb_check = 0;
    176   sc = ppc_exc_initialize(
     175  ppc_exc_initialize(
    177176    PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
    178177    (uintptr_t) bsp_interrupt_stack_start,
    179178    (uintptr_t) bsp_interrupt_stack_size
    180179  );
    181   if (sc != RTEMS_SUCCESSFUL) {
    182     BSP_panic("cannot initialize exceptions");
    183   }
    184180  ppc_exc_set_handler(ASM_ALIGN_VECTOR, ppc_exc_alignment_handler);
    185181
  • c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c

    rdd8df59 rb1e8a58  
    135135  ppc_exc_cache_wb_check = 0;
    136136#endif
    137   sc = ppc_exc_initialize(
     137  ppc_exc_initialize(
    138138    PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
    139139    interrupt_stack_start,
    140140    interrupt_stack_size
    141141  );
    142   if (sc != RTEMS_SUCCESSFUL) {
    143     BSP_panic("cannot initialize exceptions");
    144   }
    145142
    146143  /* Install default handler for the decrementer exception */
  • c/src/lib/libbsp/powerpc/haleakala/startup/bspstart.c

    rdd8df59 rb1e8a58  
    171171void bsp_start( void )
    172172{
    173   rtems_status_code sc = RTEMS_SUCCESSFUL;
    174173  ppc_cpu_id_t myCpu;
    175174  ppc_cpu_revision_t myCpuRevision;
     
    204203   * Initialize default raw exception handlers.
    205204   */
    206   sc = ppc_exc_initialize(
     205  ppc_exc_initialize(
    207206    PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
    208207    (uintptr_t) intrStack_start,
    209208    (uintptr_t) intrStack_size
    210209  );
    211   if (sc != RTEMS_SUCCESSFUL) {
    212     BSP_panic("cannot initialize exceptions");
    213   }
    214210
    215211  /*
  • c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c

    rdd8df59 rb1e8a58  
    8383void bsp_start(void)
    8484{
    85   rtems_status_code sc = RTEMS_SUCCESSFUL;
    8685  ppc_cpu_id_t myCpu;
    8786  ppc_cpu_revision_t myCpuRevision;
     
    114113
    115114  /* Initialize exception handler */
    116   sc = ppc_exc_initialize(
     115  ppc_exc_initialize(
    117116    PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
    118117    (uintptr_t) IntrStack_start,
    119118    (uintptr_t) intrStack - (uintptr_t) IntrStack_start
    120119  );
    121   if ( sc != RTEMS_SUCCESSFUL ) {
    122     BSP_panic( "cannot initialize exceptions" );
    123   }
    124120
    125121  /* Initalize interrupt support */
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c

    rdd8df59 rb1e8a58  
    9191void bsp_start(void)
    9292{
    93         rtems_status_code sc = RTEMS_SUCCESSFUL;
    9493        ppc_cpu_id_t myCpu;
    9594        ppc_cpu_revision_t myCpuRevision;
     
    120119        /* Initialize exceptions */
    121120        ppc_exc_vector_base = (uint32_t) mpc55xx_exc_vector_base;
    122         sc = ppc_exc_initialize(
     121        ppc_exc_initialize(
    123122                PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
    124123                (uintptr_t) bsp_section_work_begin,
    125124                rtems_configuration_get_interrupt_stack_size()
    126125        );
    127         if (sc != RTEMS_SUCCESSFUL) {
    128                 BSP_panic( "Cannot initialize exceptions");
    129         }
    130126        ppc_exc_set_handler(ASM_ALIGN_VECTOR, ppc_exc_alignment_handler);
    131127
  • c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c

    rdd8df59 rb1e8a58  
    149149void bsp_start(void)
    150150{
    151   rtems_status_code sc = RTEMS_SUCCESSFUL;
    152151  ppc_cpu_id_t myCpu;
    153152  ppc_cpu_revision_t myCpuRevision;
     
    174173  /* Initialize exception handler */
    175174  /* FIXME: Interrupt stack begin and size */
    176   sc = ppc_exc_initialize(
     175  ppc_exc_initialize(
    177176    PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
    178177    (uintptr_t) IntrStack_start,
    179178    (uintptr_t) intrStack - (uintptr_t) IntrStack_start
    180179  );
    181   if (sc != RTEMS_SUCCESSFUL) {
    182     BSP_panic("cannot intitialize exceptions");
    183   }
    184180
    185181  /* Initalize interrupt support */
  • c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c

    rdd8df59 rb1e8a58  
    218218void bsp_start( void )
    219219{
    220 rtems_status_code   sc;
    221220unsigned char       *stack;
    222221uintptr_t           intrStackStart;
     
    271270         * Initialize default raw exception handlers.
    272271         */
    273         sc = ppc_exc_initialize(
     272        ppc_exc_initialize(
    274273                PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
    275274                intrStackStart,
    276275                intrStackSize
    277276        );
    278         if (sc != RTEMS_SUCCESSFUL) {
    279                 BSP_panic("cannot initialize exceptions");
    280         }
    281277
    282278        printk("CPU 0x%x - rev 0x%x\n", myCpu, myCpuRevision);
  • c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c

    rdd8df59 rb1e8a58  
    188188void bsp_start( void )
    189189{
    190   rtems_status_code sc = RTEMS_SUCCESSFUL;
    191190#ifdef CONF_VPD
    192191  int i;
     
    246245   * Initialize default raw exception handlers.
    247246   */
    248   sc = ppc_exc_initialize(
     247  ppc_exc_initialize(
    249248    PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
    250249    intrStackStart,
    251250    intrStackSize
    252251  );
    253   if (sc != RTEMS_SUCCESSFUL) {
    254     BSP_panic("cannot initialize exceptions");
    255   }
    256252
    257253  /*
  • c/src/lib/libbsp/powerpc/psim/startup/bspstart.c

    rdd8df59 rb1e8a58  
    7878void bsp_start( void )
    7979{
    80   rtems_status_code sc = RTEMS_SUCCESSFUL;
    8180  uintptr_t intrStackStart;
    8281  uintptr_t intrStackSize;
     
    111110   * Initialize default raw exception handlers.
    112111   */
    113   sc = ppc_exc_initialize(
     112  ppc_exc_initialize(
    114113    PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
    115114    intrStackStart,
    116115    intrStackSize
    117116  );
    118   if (sc != RTEMS_SUCCESSFUL) {
    119     BSP_panic("cannot initialize exceptions");
    120   }
    121117
    122118  /*
  • c/src/lib/libbsp/powerpc/qemuppc/startup/bspstart.c

    rdd8df59 rb1e8a58  
    9292   * Initialize default raw exception handlers.
    9393   */
    94   sc = ppc_exc_initialize(
     94  ppc_exc_initialize(
    9595    PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
    9696    intrStackStart,
    9797    intrStackSize
    9898  );
    99   if (sc != RTEMS_SUCCESSFUL) {
    100     BSP_panic("cannot initialize exceptions");
    101   }
    10299
    103100  /* Install default handler for the decrementer exception */
  • c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c

    rdd8df59 rb1e8a58  
    7373void bsp_start(void)
    7474{
    75   rtems_status_code sc = RTEMS_SUCCESSFUL;
    7675  unsigned long i = 0;
    7776
     
    110109  /* Initialize exception handler */
    111110  ppc_exc_vector_base = (uint32_t) bsp_exc_vector_base;
    112   sc = ppc_exc_initialize(
     111  ppc_exc_initialize(
    113112    PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
    114113    (uintptr_t) bsp_section_work_begin,
    115114    rtems_configuration_get_interrupt_stack_size()
    116115  );
    117   if (sc != RTEMS_SUCCESSFUL) {
    118     BSP_panic("cannot initialize exceptions");
    119   }
    120116
    121117  /* Now it is possible to make the code execute only */
  • c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c

    rdd8df59 rb1e8a58  
    151151void bsp_start( void )
    152152{
    153   rtems_status_code sc = RTEMS_SUCCESSFUL;
    154153  unsigned int         msr_value = 0x0000;
    155154  uintptr_t            intrStackStart;
     
    195194   * Initialize default raw exception handlers.
    196195   */
    197   sc = ppc_exc_initialize(
     196  ppc_exc_initialize(
    198197    PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
    199198    intrStackStart,
    200199    intrStackSize
    201200  );
    202   if (sc != RTEMS_SUCCESSFUL) {
    203     BSP_panic("cannot initialize exceptions");
    204   }
    205201
    206202  msr_value = 0x2030;
  • c/src/lib/libbsp/powerpc/shared/startup/bspstart.c

    rdd8df59 rb1e8a58  
    136136void bsp_start( void )
    137137{
    138   rtems_status_code sc = RTEMS_SUCCESSFUL;
    139138#if !defined(mvme2100)
    140139  unsigned l2cr;
     
    233232   * Initialize default raw exception handlers.
    234233   */
    235   sc = ppc_exc_initialize(
     234  ppc_exc_initialize(
    236235    PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
    237236    intrStackStart,
    238237    intrStackSize
    239238  );
    240   if (sc != RTEMS_SUCCESSFUL) {
    241     BSP_panic("cannot initialize exceptions");
    242   }
    243239
    244240  boardManufacturer   =  checkPrepBoardType(&residualCopy);
  • c/src/lib/libbsp/powerpc/t32mppc/startup/bspstart.c

    rdd8df59 rb1e8a58  
    6161void bsp_start(void)
    6262{
    63   rtems_status_code sc;
    64 
    6563  get_ppc_cpu_type();
    6664  get_ppc_cpu_revision();
     
    6866  /* Initialize exception handler */
    6967  ppc_exc_vector_base = (uint32_t) bsp_exc_vector_base;
    70   sc = ppc_exc_initialize(
     68  ppc_exc_initialize(
    7169    PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
    7270    (uintptr_t) bsp_section_work_begin,
    7371    rtems_configuration_get_interrupt_stack_size()
    7472  );
    75   if (sc != RTEMS_SUCCESSFUL) {
    76     BSP_panic("cannot initialize exceptions");
    77   }
    7873
    7974  /* Initalize interrupt support */
  • c/src/lib/libbsp/powerpc/tqm8xx/startup/bspstart.c

    rdd8df59 rb1e8a58  
    130130void bsp_start( void)
    131131{
    132   rtems_status_code sc = RTEMS_SUCCESSFUL;
    133132  ppc_cpu_id_t myCpu;
    134133  ppc_cpu_revision_t myCpuRevision;
     
    183182
    184183  /* Initialize exception handler */
    185   sc = ppc_exc_initialize(
     184  ppc_exc_initialize(
    186185    PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
    187186    interrupt_stack_start,
    188187    interrupt_stack_size
    189188  );
    190   if (sc != RTEMS_SUCCESSFUL) {
    191     BSP_panic("cannot initialize exceptions");
    192   }
    193189
    194190  /* Initalize interrupt support */
  • c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c

    rdd8df59 rb1e8a58  
    105105void bsp_start( void )
    106106{
    107   rtems_status_code sc = RTEMS_SUCCESSFUL;
    108107  ppc_cpu_id_t myCpu;
    109108  ppc_cpu_revision_t myCpuRevision;
     
    135134   * Initialize default raw exception handlers.
    136135   */
    137   sc = ppc_exc_initialize(
     136  ppc_exc_initialize(
    138137    PPC_INTERRUPT_DISABLE_MASK_DEFAULT,
    139138    (uint32_t)IntrStack_start,
    140139    IntrStack_end - IntrStack_start
    141140  );
    142   if (sc != RTEMS_SUCCESSFUL) {
    143     BSP_panic("cannot initialize exceptions");
    144   }
    145141
    146142  /*
  • c/src/lib/libbsp/powerpc/virtex4/startup/bspstart.c

    rdd8df59 rb1e8a58  
    105105static void _bsp_start(void)
    106106{
    107   rtems_status_code sc             = RTEMS_SUCCESSFUL;
    108107  uintptr_t         intrStackStart = CPU_UP_ALIGN((uint32_t)__bsp_ram_start);
    109108  uintptr_t         intrStackSize  = rtems_configuration_get_interrupt_stack_size();
     
    116115   * spurious interrupts.
    117116   */
    118   sc = ppc_exc_initialize(PPC_INTERRUPT_DISABLE_MASK_DEFAULT & ~MSR_EE,
    119                           intrStackStart,
    120                           intrStackSize);
    121   if (sc != RTEMS_SUCCESSFUL)  BSP_panic("Cannot initialize exceptions");
     117  ppc_exc_initialize(PPC_INTERRUPT_DISABLE_MASK_DEFAULT & ~MSR_EE,
     118                     intrStackStart,
     119                     intrStackSize);
    122120
    123121  /* Install our own set of exception vectors */
  • c/src/lib/libbsp/powerpc/virtex5/startup/bspstart.c

    rdd8df59 rb1e8a58  
    105105static void _bsp_start(void)
    106106{
    107   rtems_status_code sc             = RTEMS_SUCCESSFUL;
    108107  uintptr_t         intrStackStart = CPU_UP_ALIGN((uint32_t)__bsp_ram_start);
    109108  uintptr_t         intrStackSize  = rtems_configuration_get_interrupt_stack_size();
     
    116115   * spurious interrupts.
    117116   */
    118   sc = ppc_exc_initialize(PPC_INTERRUPT_DISABLE_MASK_DEFAULT & ~MSR_EE,
    119                           intrStackStart,
    120                           intrStackSize);
    121   if (sc != RTEMS_SUCCESSFUL)  BSP_panic("Cannot initialize exceptions");
     117  ppc_exc_initialize(PPC_INTERRUPT_DISABLE_MASK_DEFAULT & ~MSR_EE,
     118                     intrStackStart,
     119                     intrStackSize);
    122120
    123121  /* Install our own set of exception vectors */
  • c/src/lib/libbsp/shared/include/bootcard.h

    rdd8df59 rb1e8a58  
    5555 */
    5656typedef enum {
     57  BSP_GENERIC_FATAL_EXCEPTION_INITIALIZATION,
    5758  BSP_GENERIC_FATAL_INTERRUPT_INITIALIZATION
    5859} bsp_generic_fatal_code;
  • c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_initialize.c

    rdd8df59 rb1e8a58  
    1313 * Copyright (C) 2007 Till Straumann <strauman@slac.stanford.edu>
    1414 *
    15  * Copyright (C) 2009 embedded brains GmbH.
     15 * Copyright (C) 2009-2012 embedded brains GmbH.
    1616 *
    1717 * Derived from file "libcpu/powerpc/new-exceptions/bspsupport/vectors_init.c".
     
    2626
    2727#include <bsp/vectors.h>
     28#include <bsp/bootcard.h>
    2829
    2930uint32_t ppc_exc_cache_wb_check = 1;
     
    7273}
    7374
    74 rtems_status_code ppc_exc_initialize(
     75static void ppc_exc_fatal_error(void)
     76{
     77  rtems_fatal(
     78    RTEMS_FATAL_SOURCE_BSP_GENERIC,
     79    BSP_GENERIC_FATAL_EXCEPTION_INITIALIZATION
     80  );
     81}
     82
     83void ppc_exc_initialize(
    7584  uint32_t interrupt_disable_mask,
    7685  uintptr_t interrupt_stack_begin,
     
    8796
    8897  if (categories == NULL) {
    89     return RTEMS_NOT_IMPLEMENTED;
     98    ppc_exc_fatal_error();
    9099  }
    91100
     
    101110
    102111  if (sda_base != r13) {
    103     return RTEMS_NOT_CONFIGURED;
     112    ppc_exc_fatal_error();
    104113  }
    105114
     
    138147      sc = ppc_exc_make_prologue(vector, category, prologue, &prologue_size);
    139148      if (sc != RTEMS_SUCCESSFUL) {
    140         return RTEMS_INTERNAL_ERROR;
     149        ppc_exc_fatal_error();
    141150      }
    142151
     
    176185    /* If we make it thru here then things seem to be OK */
    177186  }
    178 
    179   return RTEMS_SUCCESSFUL;
    180187}
  • c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/vectors.h

    rdd8df59 rb1e8a58  
    429429 * @brief Initializes the exception handling.
    430430 *
    431  * @retval RTEMS_SUCCESSFUL Successful initialization.
    432  * @retval RTEMS_NOT_IMPLEMENTED No category set available for the current CPU.
    433  * @retval RTEMS_NOT_CONFIGURED Register r13 does not point to the small data
    434  * area anchor required by SVR4/EABI.
    435  * @retval RTEMS_INTERNAL_ERROR Minimal prologue creation failed.
    436  */
    437 rtems_status_code ppc_exc_initialize(
     431 * If the initialization fails, then this is a fatal error.  The fatal error
     432 * source is RTEMS_FATAL_SOURCE_BSP_GENERIC and the fatal error code is
     433 * BSP_GENERIC_FATAL_EXCEPTION_INITIALIZATION.
     434 *
     435 * Possible error reasons are
     436 * - no category set available for the current CPU,
     437 * - the register r13 does not point to the small data area anchor required by
     438 *   SVR4/EABI, or
     439 * - the minimal prologue creation failed.
     440 */
     441void ppc_exc_initialize(
    438442  uint32_t interrupt_disable_mask,
    439443  uintptr_t interrupt_stack_begin,
Note: See TracChangeset for help on using the changeset viewer.