Changeset 9a66caae in rtems


Ignore:
Timestamp:
Apr 7, 2010, 2:18:53 PM (10 years ago)
Author:
Thomas Doerfler <Thomas.Doerfler@…>
Branches:
4.10, 4.11, master
Children:
88919d0
Parents:
232cdcb
Message:

skip version nibble when detecting e200 processor version

Location:
c/src/lib/libcpu/powerpc/shared/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/powerpc/shared/include/cpuIdent.c

    r232cdcb r9a66caae  
    7676ppc_cpu_id_t get_ppc_cpu_type(void)
    7777{
     78  /*
     79   * cpu types listed here have the lowermost nibble as a version identifier
     80   * we will tweak them to the starndard version
     81   */
     82  const uint32_t ppc_cpu_id_version_nibble[] = {
     83    PPC_e200z6,
     84    PPC_e200z0,
     85    PPC_e200z1};
     86
    7887  unsigned int pvr;
     88  int i;
    7989
    8090  if ( PPC_UNKNOWN != current_ppc_cpu )
     
    8292
    8393  pvr = (_read_PVR() >> 16);
     94  /*
     95   * apply tweaks to ignore version
     96   */
     97  for (i = 0;
     98       i < (sizeof(ppc_cpu_id_version_nibble)
     99            /sizeof(ppc_cpu_id_version_nibble[0]));
     100       i++) {
     101    if ((pvr & 0xfff0) == (ppc_cpu_id_version_nibble[i] & 0xfff0)) {
     102      pvr = ppc_cpu_id_version_nibble[i];
     103      break;
     104    }
     105  }
     106
    84107  current_ppc_cpu = (ppc_cpu_id_t) pvr;
    85108
    86109  switch (pvr) {
    87110    case PPC_405:
    88         case PPC_405GP:
    89         case PPC_405EX:
     111    case PPC_405GP:
     112    case PPC_405EX:
    90113    case PPC_601:
    91114    case PPC_5XX:
  • c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h

    r232cdcb r9a66caae  
    5858  PPC_e200z0  = 0x8171,
    5959  PPC_e200z1  = 0x8144,
    60   PPC_e200z6  = 0x8115,
     60  PPC_e200z6  = 0x8112,
     61  PPC_e200z6v5= 0x8115,
    6162  PPC_PSIM    = 0xfffe,  /* GDB PowerPC simulator -- fake version */
    6263  PPC_UNKNOWN = 0xffff
Note: See TracChangeset for help on using the changeset viewer.