Changeset d700909e in rtems


Ignore:
Timestamp:
Nov 10, 2004, 10:37:57 PM (15 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
70fefe6
Parents:
b90855c
Message:

2004-11-10 Richard Campbell <richard.campbell@…>

  • configure.ac, mpc6xx/exceptions/raw_exception.c, mpc6xx/exceptions/raw_exception.h, mpc6xx/mmu/bat.c, mpc6xx/mmu/bat.h, mpc6xx/mmu/mmuAsm.S, shared/include/cpuIdent.c, shared/include/cpuIdent.h: Add MPC8240 and MPC8245 support. There was also a significant amount of spelling and whitespace cleanup.
Location:
c/src/lib/libcpu/powerpc
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/powerpc/ChangeLog

    rb90855c rd700909e  
     12004-11-10      Richard Campbell <richard.campbell@oarcorp.com>
     2
     3        * configure.ac, mpc6xx/exceptions/raw_exception.c,
     4        mpc6xx/exceptions/raw_exception.h, mpc6xx/mmu/bat.c,
     5        mpc6xx/mmu/bat.h, mpc6xx/mmu/mmuAsm.S, shared/include/cpuIdent.c,
     6        shared/include/cpuIdent.h: Add MPC8240 and MPC8245 support. There was
     7        also a significant amount of spelling and whitespace cleanup.
     8
    192004-05-22      Till Strauman <strauman@slac.stanford.edu>
    210
  • c/src/lib/libcpu/powerpc/configure.ac

    rb90855c rd700909e  
    3232|| test "$RTEMS_CPU_MODEL" = "mpc821" \
    3333|| test "$RTEMS_CPU_MODEL" = "mpc860" \
     34|| test "$RTEMS_CPU_MODEL" = "mpc8240" \
     35|| test "$RTEMS_CPU_MODEL" = "mpc8245" \
    3436|| test "$RTEMS_CPU_MODEL" = "mpc8260" \
    3537|| test "$RTEMS_CPU_MODEL" = "mpc8xx" )
     
    4042|| test "$RTEMS_CPU_MODEL" = "mpc604" \
    4143|| test "$RTEMS_CPU_MODEL" = "mpc7400" \
    42 || test "$RTEMS_CPU_MODEL" = "mpc750" )
     44|| test "$RTEMS_CPU_MODEL" = "mpc750" \
     45|| test "$RTEMS_CPU_MODEL" = "mpc8240" \
     46|| test "$RTENS_CPU_MODEL" = "mpc8245" )
    4347AM_CONDITIONAL(mpc8xx, test "$RTEMS_CPU_MODEL" = "mpc8xx" \
    4448|| test "$RTEMS_CPU_MODEL" = "mpc821" \
  • c/src/lib/libcpu/powerpc/mpc6xx/exceptions/raw_exception.c

    rb90855c rd700909e  
    11/*
    22 * raw_exception.c  - This file contains implementation of C function to
    3  *                    Instanciate 60x ppc primary exception entries.
    4  *                    More detailled information can be found on motorola
     3 *                    Instantiate 60x ppc primary exception entries.
     4 *                    More detailed information can be found on motorola
    55 *                    site and more precisely in the following book :
    66 *
     
    3434
    3535void * codemove(void *, const void *, unsigned int, unsigned long);
     36
     37void* mpc60x_get_vector_addr(rtems_vector vector)
     38{
     39  extern rtems_cpu_table Cpu_table;
     40
     41  if ( Cpu_table.exceptions_in_RAM )
     42    return ((void*)  (((unsigned) vector) << 8));
     43
     44  return ((void*)  (((unsigned) vector) << 8) + 0xfff00000);
     45}
     46
    3647int mpc750_vector_is_valid(rtems_vector vector)
    3748
     
    134145        case PPC_603e:
    135146        case PPC_603ev:
     147        case PPC_8260:
     148        /* case PPC_8240: -- same value as 8260 */
     149        case PPC_8245:
    136150            if (!mpc603_vector_is_valid(vector)) {
    137151                return 0;
    138152            }
    139153            break;
    140         default:
    141             printk("Please complete libcpu/powerpc/mpc6xx/exceptions/raw_exception.c\n");
    142             printk("current_ppc_cpu = %x\n", current_ppc_cpu);
     154         default:
     155            printk("Please complete "
     156                   "libcpu/powerpc/mpc6xx/exceptions/raw_exception.c\n"
     157                   "current_ppc_cpu = %x\n", current_ppc_cpu);
    143158            return 0;
    144159     }
     
    151166
    152167    if (!mpc60x_vector_is_valid(except->exceptIndex)) {
     168      printk("mpc60x_set_exception: vector %d is not valid\n",
     169              except->exceptIndex);
    153170      return 0;
    154171    }
     
    160177     * to get the previous handler before accepting to disconnect.
    161178     */
    162     if (memcmp(mpc60x_get_vector_addr(except->exceptIndex), (void*)default_raw_except_entry.hdl.raw_hdl,default_raw_except_entry.hdl.raw_hdl_size)) {
     179
     180    if (memcmp(mpc60x_get_vector_addr(except->exceptIndex),
     181               (void*)default_raw_except_entry.hdl.raw_hdl,
     182               default_raw_except_entry.hdl.raw_hdl_size)) {
     183      printk("mpc60x_set_exception: raw vector not installed\n");
    163184      return 0;
    164185    }
  • c/src/lib/libcpu/powerpc/mpc6xx/exceptions/raw_exception.h

    rb90855c rd700909e  
    33 *
    44 *          This file contains implementation of C function to
    5  *          Instanciate 60x ppc primary exception entries.
    6  *          More detailled information can be found on motorola
     5 *          Instantiate 60x ppc primary exception entries.
     6 *          More detailed information can be found on motorola
    77 *          site and more precisely in the following book :
    88 *
     
    160160extern int mpc750_vector_is_valid(rtems_vector vector);
    161161
    162 inline static  void* mpc60x_get_vector_addr(rtems_vector vector)
    163 {
    164   return ((void*)  (((unsigned) vector) << 8));
    165 }
    166162/*
    167163 * Exception global init.
  • c/src/lib/libcpu/powerpc/mpc6xx/mmu/bat.c

    rb90855c rd700909e  
    33 *
    44 *          This file contains the implementation of C function to
    5  *          Instanciate 60x/7xx ppc Block Address Translation (BAT) registers.
    6  *          More detailled information can be found on motorola
     5 *          Instantiate 60x/7xx ppc Block Address Translation (BAT) registers.
     6 *          More detailed information can be found on motorola
    77 *          site and more precisely in the following book :
    88 *
  • c/src/lib/libcpu/powerpc/mpc6xx/mmu/bat.h

    rb90855c rd700909e  
    33 *
    44 *          This file contains declaration of C function to
    5  *          Instanciate 60x/7xx ppc Block Address Translation (BAT) registers.
    6  *          More detailled information can be found on motorola
     5 *          Instantiate 60x/7xx ppc Block Address Translation (BAT) registers.
     6 *          More detailed information can be found on motorola
    77 *          site and more precisely in the following book :
    88 *
  • c/src/lib/libcpu/powerpc/mpc6xx/mmu/mmuAsm.S

    rb90855c rd700909e  
    3636#define PPC_821   PPC_860
    3737#define PPC_8260  0x81
     38#define PPC_8240  PPC_8260
    3839
    3940/* ALTIVEC instructions (not recognized by off-the shelf gcc yet) */
  • c/src/lib/libcpu/powerpc/shared/include/cpuIdent.c

    rb90855c rd700909e  
    4141    case PPC_860:               return "MPC860";
    4242    case PPC_8260:              return "MPC8260";
     43    case PPC_8245:              return "MPC8245";
    4344    default:
    44       printk("Unknown CPU value of 0x%x. Please add it to <libcpu/powerpc/shared/include/cpuIdent.c>\n", cpu );
     45      printk("Unknown CPU value of 0x%x. Please add it to "
     46             "<libcpu/powerpc/shared/include/cpuIdent.c>\n", cpu );
    4547  }
    4648  return "UNKNOWN";
     
    6365    case PPC_860:
    6466    case PPC_8260:
     67    case PPC_8245:
    6568      return current_ppc_cpu;
    6669    default:
    67       printk("Unknown PVR value of 0x%x. Please add it to <libcpu/powerpc/shared/include/cpuIdent.c>\n", pvr );
     70      printk("Unknown PVR value of 0x%x. Please add it to "
     71             "<libcpu/powerpc/shared/include/cpuIdent.c>\n", pvr );
    6872    return PPC_UNKNOWN;
    6973  }
  • c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h

    rb90855c rd700909e  
    3333  PPC_821 = PPC_860,
    3434  PPC_8260 = 0x81,
    35   PPC_UNKNOWN = 0xff
     35  PPC_8240 = PPC_8260,
     36  PPC_8245 = 0x8081,
     37  PPC_UNKNOWN = 0xffff
    3638} ppc_cpu_id_t;
    3739
Note: See TracChangeset for help on using the changeset viewer.