Ignore:
Timestamp:
Jan 3, 2000, 2:06:42 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
db941670
Parents:
d5c4681e
Message:

Combination of coverhd.h cleanup and MVME23xx/MCP750 patch from Eric Valette
<valette@…> and Jay Kulpinski <jskulpin@…>.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/powerpc/mpc6xx/exceptions/raw_exception.c

    rd5c4681e r95273a6  
    1111 * Copyright (C) 1999  Eric Valette (valette@crf.canon.fr)
    1212 *                     Canon Centre Recherche France.
     13 *
     14 * Enhanced by Jay Kulpinski <jskulpin@eng01.gdds.com>
     15 * to support 603, 603e, 604, 604e exceptions
    1316 *
    1417 *  The license and distribution terms for this file may be
     
    5154}
    5255
     56int mpc603_vector_is_valid(rtems_vector vector)
     57{
     58  switch(vector) {
     59  case ASM_RESET_VECTOR: /* fall through */
     60  case ASM_MACH_VECTOR:
     61  case ASM_PROT_VECTOR:
     62  case ASM_ISI_VECTOR:
     63  case ASM_EXT_VECTOR:
     64  case ASM_ALIGN_VECTOR:
     65  case ASM_PROG_VECTOR:
     66  case ASM_FLOAT_VECTOR:
     67  case ASM_DEC_VECTOR:
     68  case ASM_SYS_VECTOR:
     69  case ASM_TRACE_VECTOR:
     70    return 1;
     71  case ASM_PERFMON_VECTOR:
     72    return 0;
     73  case ASM_IMISS_VECTOR: /* fall through */
     74  case ASM_DLMISS_VECTOR:
     75  case ASM_DSMISS_VECTOR:
     76  case ASM_ADDR_VECTOR:
     77  case ASM_SYSMGMT_VECTOR:
     78    return 1;
     79  case ASM_ITM_VECTOR:
     80    return 0;
     81  }
     82  return 0;
     83}
     84
    5385int mpc604_vector_is_valid(rtems_vector vector)
    5486{
    55   /*
    56    * Please fill this for MVME2307
    57    */
    58   printk("Please complete libcpu/powerpc/XXX/raw_exception.c\n");
     87  switch(vector) {
     88  case ASM_RESET_VECTOR: /* fall through */
     89  case ASM_MACH_VECTOR:
     90  case ASM_PROT_VECTOR:
     91  case ASM_ISI_VECTOR:
     92  case ASM_EXT_VECTOR:
     93  case ASM_ALIGN_VECTOR:
     94  case ASM_PROG_VECTOR:
     95  case ASM_FLOAT_VECTOR:
     96  case ASM_DEC_VECTOR:
     97  case ASM_SYS_VECTOR:
     98  case ASM_TRACE_VECTOR:
     99  case ASM_PERFMON_VECTOR:
     100    return 1;
     101  case ASM_IMISS_VECTOR: /* fall through */
     102  case ASM_DLMISS_VECTOR:
     103  case ASM_DSMISS_VECTOR:
     104    return 0;
     105  case ASM_ADDR_VECTOR: /* fall through */
     106  case ASM_SYSMGMT_VECTOR:
     107    return 1;
     108  case ASM_ITM_VECTOR:
     109    return 0;
     110  }
    59111  return 0;
    60112}
     
    64116    unsigned int level;
    65117
    66     if (current_ppc_cpu == PPC_750) {
    67       if (!mpc750_vector_is_valid(except->exceptIndex)){
    68         return 0;
    69       }
    70       goto exception_ok;
     118    switch (current_ppc_cpu) {
     119        case PPC_750:
     120            if (!mpc750_vector_is_valid(except->exceptIndex)) {
     121                return 0;
     122            }
     123            break;
     124        case PPC_604:
     125        case PPC_604e:
     126        case PPC_604r:
     127            if (!mpc604_vector_is_valid(except->exceptIndex)) {
     128                return 0;
     129            }
     130            break;
     131        case PPC_603:
     132        case PPC_603e:
     133            if (!mpc603_vector_is_valid(except->exceptIndex)) {
     134                return 0;
     135            }
     136            break;
     137        default:
     138            printk("Please complete libcpu/powerpc/mpc6xx/raw_exception.c\n");
     139            printk("current_ppc_cpu = %x\n", current_ppc_cpu);
     140            return 0;
    71141    }
    72     if (current_ppc_cpu == PPC_604) {
    73       if (!mpc604_vector_is_valid(except->exceptIndex)){
    74         return 0;
    75       }
    76       goto exception_ok;
    77     }
    78     printk("Please complete libcpu/powerpc/XXX/raw_exception.c\n");
    79     return 0;
    80    
    81 exception_ok:
     142
    82143    /*
    83144     * Check if default handler is actually connected. If not issue an error.
Note: See TracChangeset for help on using the changeset viewer.