Changeset a84392d in rtems


Ignore:
Timestamp:
Nov 10, 2004, 11:51:57 PM (15 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
ac8f462
Parents:
e79a1947
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

    re79a1947 ra84392d  
     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-10-21      Ralf Corsepius <ralf_corsepius@rtems.org>
    210
  • c/src/lib/libcpu/powerpc/configure.ac

    re79a1947 ra84392d  
    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" )
     
    4345|| test "$RTEMS_CPU_MODEL" = "mpc7400" \
    4446|| test "$RTEMS_CPU_MODEL" = "mpc7455" \
    45 || test "$RTEMS_CPU_MODEL" = "mpc750" )
     47|| test "$RTEMS_CPU_MODEL" = "mpc750" \
     48|| test "$RTEMS_CPU_MODEL" = "mpc8240" \
     49|| test "$RTEMS_CPU_MODEL" = "mpc8245" )
    4650AM_CONDITIONAL(mpc8xx, test "$RTEMS_CPU_MODEL" = "mpc8xx" \
    4751|| test "$RTEMS_CPU_MODEL" = "mpc821" \
  • c/src/lib/libcpu/powerpc/mpc6xx/exceptions/raw_exception.c

    re79a1947 ra84392d  
    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
     
    135146        case PPC_603e:
    136147        case PPC_603ev:
     148        case PPC_8260:
     149        /* case PPC_8240: -- same value as 8260 */
     150        case PPC_8245:
    137151            if (!mpc603_vector_is_valid(vector)) {
    138152                return 0;
    139153            }
    140154            break;
    141         default:
    142             printk("Please complete libcpu/powerpc/mpc6xx/exceptions/raw_exception.c\n");
    143             printk("current_ppc_cpu = %x\n", current_ppc_cpu);
     155         default:
     156            printk("Please complete "
     157                   "libcpu/powerpc/mpc6xx/exceptions/raw_exception.c\n"
     158                   "current_ppc_cpu = %x\n", current_ppc_cpu);
    144159            return 0;
    145160     }
     
    152167
    153168    if (!mpc60x_vector_is_valid(except->exceptIndex)) {
     169      printk("mpc60x_set_exception: vector %d is not valid\n",
     170              except->exceptIndex);
    154171      return 0;
    155172    }
     
    161178     * to get the previous handler before accepting to disconnect.
    162179     */
    163     if (memcmp(mpc60x_get_vector_addr(except->exceptIndex), (void*)default_raw_except_entry.hdl.raw_hdl,default_raw_except_entry.hdl.raw_hdl_size)) {
     180
     181    if (memcmp(mpc60x_get_vector_addr(except->exceptIndex),
     182               (void*)default_raw_except_entry.hdl.raw_hdl,
     183               default_raw_except_entry.hdl.raw_hdl_size)) {
     184      printk("mpc60x_set_exception: raw vector not installed\n");
    164185      return 0;
    165186    }
  • c/src/lib/libcpu/powerpc/mpc6xx/exceptions/raw_exception.h

    re79a1947 ra84392d  
    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

    re79a1947 ra84392d  
    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

    re79a1947 ra84392d  
    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

    re79a1947 ra84392d  
    3939#define PPC_821   PPC_860
    4040#define PPC_8260  0x81
     41#define PPC_8240  PPC_8260
    4142
    4243/* ALTIVEC instructions (not recognized by off-the shelf gcc yet) */
     
    4849#ifndef MSSCR0
    4950#define MSSCR0   1014
    50 #else
    51 #warning MSSCR0 seems to be known, update __FILE__
    5251#endif
    5352
  • c/src/lib/libcpu/powerpc/shared/include/cpuIdent.c

    re79a1947 ra84392d  
    4343    case PPC_860:               return "MPC860";
    4444    case PPC_8260:              return "MPC8260";
     45    case PPC_8245:              return "MPC8245";
    4546    default:
    46       printk("Unknown CPU value of 0x%x. Please add it to <libcpu/powerpc/shared/include/cpuIdent.c>\n", cpu );
     47      printk("Unknown CPU value of 0x%x. Please add it to "
     48             "<libcpu/powerpc/shared/include/cpuIdent.c>\n", cpu );
    4749  }
    4850  return "UNKNOWN";
     
    6769    case PPC_860:
    6870    case PPC_8260:
     71    case PPC_8245:
    6972      return current_ppc_cpu;
    7073    default:
    71       printk("Unknown PVR value of 0x%x. Please add it to <libcpu/powerpc/shared/include/cpuIdent.c>\n", pvr );
     74      printk("Unknown PVR value of 0x%x. Please add it to "
     75             "<libcpu/powerpc/shared/include/cpuIdent.c>\n", pvr );
    7276    return PPC_UNKNOWN;
    7377  }
  • c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h

    re79a1947 ra84392d  
    3636  PPC_823 = PPC_860,
    3737  PPC_8260 = 0x81,
    38   PPC_UNKNOWN = 0xff
     38  PPC_8240 = PPC_8260,
     39  PPC_8245 = 0x8081,
     40  PPC_UNKNOWN = 0xffff
    3941} ppc_cpu_id_t;
    4042
Note: See TracChangeset for help on using the changeset viewer.