Ignore:
Timestamp:
Mar 2, 2016, 3:08:27 PM (8 years ago)
Author:
meunier
Message:
  • Bug fixes in Rosenfeld
File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_kernel/exc_handler.c

    r709 r798  
    1616///////////////////////////////////////////////////////////////////////////////////
    1717
    18 static void _cause_ukn();
    19 static void _cause_adel();
    20 static void _cause_ades();
    21 static void _cause_ibe();
    22 static void _cause_dbe();
    23 static void _cause_bp();
    24 static void _cause_ri();
    25 static void _cause_cpu();
    26 static void _cause_ovf();
     18static void _cause_ukn(unsigned int * regs_table);
     19static void _cause_adel(unsigned int * regs_table);
     20static void _cause_ades(unsigned int * regs_table);
     21static void _cause_ibe(unsigned int * regs_table);
     22static void _cause_dbe(unsigned int * regs_table);
     23static void _cause_bp(unsigned int * regs_table);
     24static void _cause_ri(unsigned int * regs_table);
     25static void _cause_cpu(unsigned int * regs_table);
     26static void _cause_ovf(unsigned int * regs_table);
    2727
    2828extern void _int_handler();
     
    5555
    5656///////////////////////////////////////////////
    57 static void _display_cause( unsigned int type )
     57static void _display_cause( unsigned int type, unsigned int * regs_table )
    5858{
    5959    unsigned int gpid       = _get_procid();
    6060    unsigned int cluster_xy = gpid >> P_WIDTH;
    6161    unsigned int x          = cluster_xy >> Y_WIDTH;
    62     unsigned int y          = cluster_xy & ((1<<Y_WIDTH)-1);
    63     unsigned int p          = gpid & ((1<<P_WIDTH)-1);
     62    unsigned int y          = cluster_xy & ((1 << Y_WIDTH) - 1);
     63    unsigned int p          = gpid & ((1 << P_WIDTH) - 1);
    6464    unsigned int trdid      = _get_thread_trdid();
    6565    unsigned int ltid       = _get_thread_ltid();
     
    8585            mips32_exc_str[type], _get_epc(), _get_bvar() );
    8686
     87    _printf("Registers:\n");
     88    _printf("CR:   %X\tEPC:  %X\tSR:   %X\tCO_HI %X\tC0_LO  %X\n",
     89            regs_table[33], regs_table[32], regs_table[34], regs_table[36], regs_table[35]);
     90    _printf("at_1  %X\tv0_2  %X\tv1_3  %X\ta0_4  %X\ta1_5   %X\n",
     91            regs_table[1], regs_table[2], regs_table[3], regs_table[4], regs_table[5]);
     92    _printf("a2_6  %X\ta3_7  %X\tt0_8  %X\tt1_9  %X\tt2_10  %X\n",
     93            regs_table[6], regs_table[7], regs_table[8], regs_table[9], regs_table[10]);
     94    _printf("t3_11 %X\tt4_12 %X\tt5_13 %X\tt6_14 %X\tt7_15  %X\n",
     95            regs_table[11], regs_table[12], regs_table[13], regs_table[14], regs_table[15]);
     96    _printf("s0_16 %X\ts1_17 %X\ts2_18 %X\ts3_19 %X\ts4_20  %X\n",
     97            regs_table[16], regs_table[17], regs_table[18], regs_table[19], regs_table[20]);
     98    _printf("s5_21 %X\ts6_22 %X\ts7_23 %X\tt8_24 %X\tt9_25  %X\n",
     99            regs_table[21], regs_table[22], regs_table[23], regs_table[24], regs_table[25]);
     100    _printf("gp_28 %X\tsp_29 %X\tfp_30 %X\tra_31 %X\n\n",
     101            regs_table[28], regs_table[29], regs_table[30], regs_table[31]);
     102
     103
    87104    // register KILL signal
    88105    _atomic_or( &psched->context[ltid].slot[CTX_SIGS_ID] , SIGS_MASK_KILL );
     
    95112}  // end display_cause()
    96113
    97 static void _cause_ukn()  { _display_cause(0); }
    98 static void _cause_adel() { _display_cause(1); }
    99 static void _cause_ades() { _display_cause(2); }
    100 static void _cause_ibe()  { _display_cause(3); }
    101 static void _cause_dbe()  { _display_cause(4); }
    102 static void _cause_bp()   { _display_cause(5); }
    103 static void _cause_ri()   { _display_cause(6); }
    104 static void _cause_cpu()  { _display_cause(7); }
    105 static void _cause_ovf()  { _display_cause(8); }
     114static void _cause_ukn(unsigned int * regs_table)  { _display_cause(0, regs_table); }
     115static void _cause_adel(unsigned int * regs_table) { _display_cause(1, regs_table); }
     116static void _cause_ades(unsigned int * regs_table) { _display_cause(2, regs_table); }
     117static void _cause_ibe(unsigned int * regs_table)  { _display_cause(3, regs_table); }
     118static void _cause_dbe(unsigned int * regs_table)  { _display_cause(4, regs_table); }
     119static void _cause_bp(unsigned int * regs_table)   { _display_cause(5, regs_table); }
     120static void _cause_ri(unsigned int * regs_table)   { _display_cause(6, regs_table); }
     121static void _cause_cpu(unsigned int * regs_table)  { _display_cause(7, regs_table); }
     122static void _cause_ovf(unsigned int * regs_table)  { _display_cause(8, regs_table); }
    106123
    107124// Local Variables:
Note: See TracChangeset for help on using the changeset viewer.