Changeset ead311b in rtems


Ignore:
Timestamp:
Jul 18, 2007, 6:07:20 PM (13 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
793dd46
Parents:
02a3b35
Message:

2007-07-18 Joel Sherrill <joel.sherrill@…>

  • Makefile.am, vectors/vectors_init.c: Print stack trace on exception.
Location:
c/src/lib/libbsp/powerpc/gen5200
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/gen5200/ChangeLog

    r02a3b35 read311b  
     12007-07-18      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * Makefile.am, vectors/vectors_init.c: Print stack trace on exception.
     4
    152007-07-12      Joel Sherrill <joel.sherrill@OARcorp.com>
    26
  • c/src/lib/libbsp/powerpc/gen5200/Makefile.am

    r02a3b35 read311b  
    147147libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/shared/cpuIdent.rel \
    148148    ../../../libcpu/@RTEMS_CPU@/shared/cache.rel \
     149    ../../../libcpu/@RTEMS_CPU@/shared/stack.rel \
    149150    ../../../libcpu/@RTEMS_CPU@/@exceptions@/rtems-cpu.rel \
    150151    ../../../libcpu/@RTEMS_CPU@/mpc6xx/mmu.rel \
  • c/src/lib/libbsp/powerpc/gen5200/vectors/vectors_init.c

    r02a3b35 read311b  
    139139    recoverable = 0;
    140140#endif
    141     if (!recoverable) {
    142       printk("unrecoverable exception!!! Push reset button\n");
    143       while(1);
    144 
     141#endif
     142
     143  CPU_print_stack();
     144  if (!recoverable) {
     145    printk("unrecoverable exception!!! Push reset button\n");
     146    bsp_cleanup();
    145147  }
    146 #endif
    147 
    148 
    149148}
    150149
     
    152151{
    153152}
     153
    154154int except_always_enabled(const rtems_raw_except_connect_data* ptr)
    155155{
     
    158158
    159159void initialize_exceptions()
    160   {
     160{
    161161  int i;
    162162
     
    164164   * Initialize pointer used by low level execption handling
    165165   */
    166   globalExceptHdl                               = C_exception_handler;
     166  globalExceptHdl                               = C_exception_handler;
    167167  /*
    168168   * Put  default_exception_vector_code_prolog at relevant exception
    169169   * code entry addresses
    170170   */
    171   exception_config.exceptSize                           = LAST_VALID_EXC + 1;
    172   exception_config.rawExceptHdlTbl                      = &exception_table[0];
    173   exception_config.defaultRawEntry.exceptIndex  = 0;
    174   exception_config.defaultRawEntry.hdl.vector   = 0;
    175   exception_config.defaultRawEntry.hdl.raw_hdl  = default_exception_vector_code_prolog;
     171  exception_config.exceptSize                   = LAST_VALID_EXC + 1;
     172  exception_config.rawExceptHdlTbl              = &exception_table[0];
     173  exception_config.defaultRawEntry.exceptIndex  = 0;
     174  exception_config.defaultRawEntry.hdl.vector   = 0;
     175  exception_config.defaultRawEntry.hdl.raw_hdl  = default_exception_vector_code_prolog;
    176176  /*
    177177   * Note that next line the '&' before default_exception_vector_code_prolog_size
    178178   * is not a bug as it is defined a .set directly in asm...
    179179   */
    180   exception_config.defaultRawEntry.hdl.raw_hdl_size = (unsigned) &default_exception_vector_code_prolog_size;
    181 
    182 
    183   for (i=0; i <= exception_config.exceptSize; i++)
    184         {
     180  exception_config.defaultRawEntry.hdl.raw_hdl_size =
     181       (unsigned) &default_exception_vector_code_prolog_size;
     182
     183
     184  for (i=0; i <= exception_config.exceptSize; i++) {
    185185
    186186    #if defined(SHOW_MORE_INIT_SETTINGS)
     
    188188    #endif
    189189
    190         if (!ppc_vector_is_valid(i))
    191         continue;
    192 
    193     exception_table[i].exceptIndex      = i;
    194     exception_table[i].hdl                  = exception_config.defaultRawEntry.hdl;
    195     exception_table[i].hdl.vector       = i;
    196     exception_table[i].on                   = nop_except_enable;
    197     exception_table[i].off                  = nop_except_enable;
    198     exception_table[i].isOn                 = except_always_enabled;
     190    if (!ppc_vector_is_valid(i))
     191      continue;
     192
     193    exception_table[i].exceptIndex = i;
     194    exception_table[i].hdl         = exception_config.defaultRawEntry.hdl;
     195    exception_table[i].hdl.vector  = i;
     196    exception_table[i].on          = nop_except_enable;
     197    exception_table[i].off         = nop_except_enable;
     198    exception_table[i].isOn        = except_always_enabled;
    199199  }
    200200
     
    203203  else
    204204    printk("Exception handling initialization done\n");
    205 
    206   }
     205}
Note: See TracChangeset for help on using the changeset viewer.