Changeset e1df032 in rtems


Ignore:
Timestamp:
Jul 10, 2008, 9:51:55 PM (11 years ago)
Author:
Till Straumann <strauman@…>
Branches:
4.10, 4.11, 4.9, master
Children:
dfe42ba5
Parents:
06aab39
Message:

2008-07-10 Till Straumann <strauman@…>

  • ChangeLog?, mpc8xx/clock/clock.c, ppc403/clock/clock.c, ppc403/irq/ictrl.h, rtems/powerpc/powerpc.h: Removed all macro definitions which depended on the compiler defining a PPC CPU-model dependent symbol from files in cpukit. Macros which were not used by cpukit have been moved to libcpu/powerpc/rtems/powerpc/powerpc.h.
Location:
c/src/lib/libcpu/powerpc
Files:
5 edited

Legend:

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

    r06aab39 re1df032  
     12008-07-10      Till Straumann <strauman@slac.stanford.edu>
     2
     3        * ChangeLog, mpc8xx/clock/clock.c, ppc403/clock/clock.c,
     4        ppc403/irq/ictrl.h, rtems/powerpc/powerpc.h:
     5        Removed all macro definitions which depended on
     6        the compiler defining a PPC CPU-model dependent
     7        symbol from files in cpukit.
     8        Macros which were not used by cpukit have been
     9        moved to libcpu/powerpc/rtems/powerpc/powerpc.h.
     10
    1112008-07-10      Till Straumann <strauman@slac.stanford.edu>
    212
  • c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c

    r06aab39 re1df032  
    3939#include <rtems/clockdrv.h>
    4040#include <rtems/libio.h>
     41#include <rtems/powerpc/powerpc.h>
    4142
    4243#include <stdlib.h>                     /* for atexit() */
  • c/src/lib/libcpu/powerpc/ppc403/clock/clock.c

    r06aab39 re1df032  
    4343#include <stdlib.h>                     /* for atexit() */
    4444#include <rtems/bspIo.h>
     45#include <rtems/powerpc/powerpc.h>
    4546/*
    4647 * check, which exception handling code is present
  • c/src/lib/libcpu/powerpc/ppc403/irq/ictrl.h

    r06aab39 re1df032  
    3131#include <rtems/system.h>
    3232#include <rtems/score/isr.h>
     33#include <rtems/powerpc/powerpc.h>
    3334#ifdef __cplusplus
    3435extern "C" {
  • c/src/lib/libcpu/powerpc/rtems/powerpc/powerpc.h

    r06aab39 re1df032  
    11/**
    2  * @file rtems/score/powerpc.h
     2 * @file rtems/powerpc/powerpc.h
    33 */
    44
     
    5050#endif
    5151
     52
     53/* Till S. 2008/07/10:
     54 *
     55 * Using the macros/definitions which depend on a preprocessor
     56 * symbol defining the CPU flavor is discouraged.
     57 * I recommend to not use definitions from this file and
     58 * in particular - not to add more bits and pieces.
     59 *
     60 * Instead, try to use run-time detection (see e.g. cpuIdent.c/cpuIdent.h)
     61 * of features etc.
     62 */
     63
    5264#include <rtems/score/powerpc.h>
    53 
    54 /*
    55  *  Define the name of the CPU family.
    56  */
    57 
    58 #define CPU_NAME "PowerPC"
    5965
    6066/*
     
    7278 *    + PPC_LOW_POWER_MODE       - PPC_LOW_POWER_MODE_NONE
    7379 *    + PPC_HAS_EXCEPTION_PREFIX - 1
    74  *    + PPC_HAS_FPU              - 1
    75  *    + PPC_HAS_DOUBLE           - 1 if PPC_HAS_FPU,
    76  *                               - 0 otherwise
    7780 *    + PPC_USE_MULTIPLE         - 0
    7881 */
     
    103106 */
    104107 
    105 #if defined(ppc403)
    106 #define CPU_MODEL_NAME "PowerPC 403"
    107 #elif defined (ppc405)
    108 #define CPU_MODEL_NAME "PowerPC 405"
    109 #endif
    110108#define PPC_CACHE_ALIGNMENT     16
    111109#define PPC_HAS_RI              0
     
    120118#elif defined(mpc555)
    121119
    122 #define CPU_MODEL_NAME  "PowerPC 555"
    123 
    124120/* Copied from mpc505 */
    125121#define PPC_CACHE_ALIGNMENT     16
     
    139135 */
    140136
    141 #define CPU_MODEL_NAME  "PowerPC 505/509"
    142 
    143137#define PPC_CACHE_ALIGNMENT     16
    144138#define PPC_I_CACHE             4096
     
    152146 */
    153147 
    154 #define CPU_MODEL_NAME  "PowerPC 601"
    155 
    156148#define PPC_USE_MULTIPLE        1
    157149#define PPC_I_CACHE             0
    158150#define PPC_D_CACHE             32768
    159151
    160 #elif defined(ppc602)
     152#elif defined(ppc603)
    161153/*
    162154 *  Submitted with original port -- book checked only.
    163155 */
    164156 
    165 #define CPU_MODEL_NAME  "PowerPC 602"
    166 
    167 #define PPC_HAS_DOUBLE          0
    168 #define PPC_I_CACHE             4096
    169 #define PPC_D_CACHE             4096
    170 
    171 #elif defined(ppc603)
    172 /*
    173  *  Submitted with original port -- book checked only.
    174  */
    175  
    176 #define CPU_MODEL_NAME  "PowerPC 603"
    177 
    178157#define PPC_I_CACHE             8192
    179158#define PPC_D_CACHE             8192
     
    181160#elif defined(ppc603e)
    182161 
    183 #define CPU_MODEL_NAME  "PowerPC 603e"
    184162/*
    185163 *  Submitted with original port.
     
    198176 */
    199177 
    200 #define CPU_MODEL_NAME  "PowerPC 604"
    201 
    202178#define PPC_I_CACHE             16384
    203179#define PPC_D_CACHE             16384
     
    208184 *  with some changes by Darlene Stewart (Darlene.Stewart@iit.nrc.ca)
    209185 */
    210 #define CPU_MODEL_NAME  "PowerPC MPC860"
    211 
    212186#define PPC_I_CACHE             4096
    213187#define PPC_D_CACHE             4096
     
    225199 *  Added by Andrew Bray <andy@chaos.org.uk> 6/April/1999
    226200 */
    227 #define CPU_MODEL_NAME  "PowerPC MPC821"
    228 
    229201#define PPC_I_CACHE             4096
    230202#define PPC_D_CACHE             4096
     
    239211#elif defined(mpc750)
    240212
    241 #define CPU_MODEL_NAME  "PowerPC 750"
    242 
    243213#define PPC_I_CACHE             16384
    244214#define PPC_D_CACHE             16384
     
    246216#elif defined(mpc7400)
    247217
    248 #define CPU_MODEL_NAME  "PowerPC 7400"
    249 
    250218#define PPC_I_CACHE             32768
    251219#define PPC_D_CACHE             32768
     
    255223 *  Added by S.K. Feng <feng1@bnl.gov> 10/03
    256224 */
    257 
    258 #define CPU_MODEL_NAME  "PowerPC 7455"
    259225
    260226#define PPC_CACHE_ALIGNMENT     32
     
    266232 *  Added by Andy Dachs <a.dachs@sstl.co.uk> 23/11/2000
    267233 */
    268 #define CPU_MODEL_NAME  "PowerPC MPC8260"
    269 
    270234#define PPC_I_CACHE             16384
    271235#define PPC_D_CACHE             16384
     
    275239
    276240#elif defined(__ppc_generic)
    277 /* PPC_INTERRUPT_MAX and PPC_CACHE_ALIGNMENT already defined by score/powerc.h */
    278 #ifndef PPC_ABI
    279 #define PPC_ABI PPC_ABI_SVR4
    280 #endif
     241#define PPC_CACHE_ALIGNMENT 32
     242
    281243#else
    282244 
    283245#error "Unsupported CPU Model"
    284246 
    285 #endif
    286 
    287 /*
    288  *  Application binary interfaces.
    289  *
    290  *  PPC_ABI MUST be defined as one of these.
    291  *  Only big endian is currently supported.
    292  */
    293 /*
    294  *  SVR4 ABI
    295  */
    296 #define PPC_ABI_SVR4            2
    297 /*
    298  *  Embedded ABI
    299  */
    300 #define PPC_ABI_EABI            3
    301 
    302 /*
    303  *  Default to the EABI used by current GNU tools
    304  */
    305 
    306 #ifndef PPC_ABI
    307 #define PPC_ABI PPC_ABI_EABI
    308 #endif
    309 
    310 #if (PPC_ABI == PPC_ABI_SVR4)
    311 #define PPC_STACK_ALIGNMENT     16
    312 #elif (PPC_ABI == PPC_ABI_EABI)
    313 #define PPC_STACK_ALIGNMENT     8
    314 #else
    315 #error  "PPC_ABI is not properly defined"
    316 #endif
    317 
    318 /*
    319  *  Assemblers.
    320  *  PPC_ASM MUST be defined as one of these.
    321  *
    322  *  PPC_ASM_ELF:   ELF assembler. Currently used for all ABIs.
    323  *
    324  *  NOTE: Only PPC_ABI_ELF is currently fully supported.
    325  */
    326 
    327 #define PPC_ASM_ELF   0
    328 
    329 /*
    330  *  Default to the assembler format used by the current GNU tools.
    331  */
    332 
    333 #ifndef PPC_ASM
    334 #define PPC_ASM PPC_ASM_ELF
    335247#endif
    336248
     
    394306#ifndef PPC_LOW_POWER_MODE
    395307#define PPC_LOW_POWER_MODE PPC_LOW_POWER_MODE_NONE
    396 #endif
    397 
    398 /*
    399  *  Unless specified above, assume PPC_HAS_FPU to be a synonym for _SOFT_FLOAT.
    400  *  FIXME: Should we tie PPC_HAS_FPU to _SOFT_FLOAT, directly
    401  *     and disallow explicitly setting PPC_HAS_FPU?
    402  */
    403 
    404 #ifndef PPC_HAS_FPU
    405 #ifdef _SOFT_FLOAT
    406 #define PPC_HAS_FPU 0
    407 #else
    408 #define PPC_HAS_FPU 1
    409 #endif
    410 #endif
    411 
    412 /*
    413  *  Unless specified above, If the model has FP support, it is assumed to
    414  *  support doubles (8-byte floating point numbers).
    415  *
    416  *  If the model does NOT have FP support, then the model does
    417  *  NOT have double length FP registers.
    418  */
    419 
    420 #ifndef PPC_HAS_DOUBLE
    421 #if (PPC_HAS_FPU)
    422 #define PPC_HAS_DOUBLE 1
    423 #else
    424 #define PPC_HAS_DOUBLE 0
    425 #endif
    426308#endif
    427309
     
    713595#define PPC_MSR_DISABLE_MASK (PPC_MSR_ME|PPC_MSR_EE|PPC_MSR_CE)
    714596
    715 /*
    716  *  Initial value for the FPSCR register
    717  */
    718 
    719 #define PPC_INIT_FPSCR          0x000000f8
    720 
    721 
    722597#define PPC_MINIMUM_STACK_FRAME_SIZE PPC_STACK_ALIGNMENT
    723598
Note: See TracChangeset for help on using the changeset viewer.