⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ppc.h

📁 RTEMS (Real-Time Executive for Multiprocessor Systems) is a free open source real-time operating sys
💻 H
📖 第 1 页 / 共 2 页
字号:
/*  ppc.h * *  This file contains definitions for the IBM/Motorola PowerPC *  family members. * *  Author:	Andrew Bray <andy@i-cubed.co.uk> * *  COPYRIGHT (c) 1995 by i-cubed ltd. * *  MPC860 support code was added by Jay Monkman <jmonkman@frasca.com> *  MPC8260 support added by Andy Dachs <a.dachs@sstl.co.uk> *  Surrey Satellite Technology Limited * *  To anyone who acknowledges that this file is provided "AS IS" *  without any express or implied warranty: *      permission to use, copy, modify, and distribute this file *      for any purpose is hereby granted without fee, provided that *      the above copyright notice and this notice appears in all *      copies, and that the name of i-cubed limited not be used in *      advertising or publicity pertaining to distribution of the *      software without specific, written prior permission. *      i-cubed limited makes no representations about the suitability *      of this software for any purpose. * *  Derived from c/src/exec/cpu/no_cpu/no_cpu.h: * *  COPYRIGHT (c) 1989-1997. *  On-Line Applications Research Corporation (OAR). * *  The license and distribution terms for this file may in *  the file LICENSE in this distribution or at *  http://www.rtems.com/license/LICENSE. * * * Note: *      This file is included by both C and assembler code ( -DASM ) * *  $Id: ppc.h,v 1.15.2.1 2003/09/04 18:47:36 joel Exp $ */#ifndef _INCLUDE_PPC_h#define _INCLUDE_PPC_h#ifdef __cplusplusextern "C" {#endif#include <rtems/score/types.h>/* *  Define the name of the CPU family. */#define CPU_NAME "PowerPC"/* *  This file contains the information required to build *  RTEMS for a particular member of the PowerPC family.  It does *  this by setting variables to indicate which implementation *  dependent features are present in a particular member *  of the family. * *  The following architectural feature definitions are defaulted *  unless specifically set by the model definition: * *    + PPC_INTERRUPT_MAX        - 16 *    + PPC_CACHE_ALIGNMENT      - 32 *    + PPC_LOW_POWER_MODE       - PPC_LOW_POWER_MODE_NONE *    + PPC_HAS_EXCEPTION_PREFIX - 1 *    + PPC_HAS_FPU              - 1 *    + PPC_HAS_DOUBLE           - 1 if PPC_HAS_FPU,  *                               - 0 otherwise *    + PPC_USE_MULTIPLE         - 0 */ /* *  Define the low power mode models * *  Standard:   as defined for 603e *  Nap Mode:   nap mode only (604) *  XXX 403GB, 603, 603e, 604, 821 */#define PPC_LOW_POWER_MODE_NONE      0#define PPC_LOW_POWER_MODE_STANDARD  1/* *  Figure out all CPU Model Feature Flags based upon compiler *  predefines. */#if defined(ppc403) || defined(ppc405)/* *  IBM 403 * *  Developed for 403GA.  Book checked for 403GB. * *  Does not have user mode. */ #if defined(ppc403)#define CPU_MODEL_NAME "PowerPC 403"#elif defined (ppc405)#define CPU_MODEL_NAME "PowerPC 405"#endif#define PPC_ALIGNMENT		4  #define PPC_CACHE_ALIGNMENT	16#define PPC_HAS_RFCI    	1#define PPC_HAS_FPU     	0#define PPC_USE_MULTIPLE	1#define PPC_I_CACHE		2048#define PPC_D_CACHE		1024#define PPC_HAS_EXCEPTION_PREFIX 0#define PPC_HAS_EVPR             1#elif defined(mpc555)#define CPU_MODEL_NAME  "PowerPC 555"/* Copied from mpc505 */#define PPC_ALIGNMENT		4#define PPC_CACHE_ALIGNMENT	16/* Based on comments by Sergei Organov <osv@Javad.RU> */#define PPC_I_CACHE        	0 #define PPC_D_CACHE        	0 #elif defined(mpc505) || defined(mpc509)/* *  Submitted by Sergei Organov <osv@Javad.RU> as a patch against *  3.6.0 long after 4.0 was released.   This is just an attempt *  to get the setting correct. */#define CPU_MODEL_NAME  "PowerPC 505/509"#define PPC_ALIGNMENT           4#define PPC_CACHE_ALIGNMENT     16#define PPC_I_CACHE             4096#define PPC_D_CACHE             0#elif defined(ppc601)/* *  Submitted with original port -- book checked only. */ #define CPU_MODEL_NAME  "PowerPC 601"#define PPC_ALIGNMENT		8#define PPC_USE_MULTIPLE	1#define PPC_I_CACHE		0#define PPC_D_CACHE		32768#elif defined(ppc602)/* *  Submitted with original port -- book checked only. */ #define CPU_MODEL_NAME  "PowerPC 602"#define PPC_ALIGNMENT		4#define PPC_HAS_DOUBLE		0#define PPC_I_CACHE		4096#define PPC_D_CACHE		4096#elif defined(ppc603)/* *  Submitted with original port -- book checked only. */ #define CPU_MODEL_NAME  "PowerPC 603"#define PPC_ALIGNMENT		8#define PPC_I_CACHE		8192#define PPC_D_CACHE		8192#elif defined(ppc603e) #define CPU_MODEL_NAME  "PowerPC 603e"/* *  Submitted with original port. * *  Known to work on real hardware. */#define PPC_ALIGNMENT		8#define PPC_I_CACHE		16384#define PPC_D_CACHE		16384#define PPC_LOW_POWER_MODE PPC_LOW_POWER_MODE_STANDARD#elif defined(mpc604)/* *  Submitted with original port -- book checked only. */ #define CPU_MODEL_NAME  "PowerPC 604"#define PPC_ALIGNMENT		8#define PPC_I_CACHE		16384#define PPC_D_CACHE		16384 #elif defined(mpc860)/*  *  Added by Jay Monkman (jmonkman@frasca.com) 6/28/98  *  with some changes by Darlene Stewart (Darlene.Stewart@iit.nrc.ca) */ #define CPU_MODEL_NAME  "PowerPC MPC860"#define PPC_ALIGNMENT		4#define PPC_I_CACHE             4096#define PPC_D_CACHE             4096#define PPC_CACHE_ALIGNMENT	16#define PPC_INTERRUPT_MAX       71#define PPC_HAS_FPU     	0#define PPC_HAS_DOUBLE		0#define PPC_USE_MULTIPLE	1#define PPC_MSR_0		0x00009000#define PPC_MSR_1		0x00001000#define PPC_MSR_2		0x00001000#define PPC_MSR_3		0x00000000#elif defined(mpc821)/*  *  Added by Andrew Bray <andy@chaos.org.uk> 6/April/1999 */ #define CPU_MODEL_NAME  "PowerPC MPC821"#define PPC_ALIGNMENT		4#define PPC_I_CACHE             4096#define PPC_D_CACHE             4096#define PPC_CACHE_ALIGNMENT	16#define PPC_INTERRUPT_MAX       71#define PPC_HAS_FPU     	0#define PPC_HAS_DOUBLE		0#define PPC_MSR_0		0x00009000#define PPC_MSR_1		0x00001000#define PPC_MSR_2		0x00001000#define PPC_MSR_3		0x00000000#elif defined(mpc750)#define CPU_MODEL_NAME  "PowerPC 750"#define PPC_ALIGNMENT		8#define PPC_I_CACHE		16384#define PPC_D_CACHE		16384#elif defined(mpc7400)#define CPU_MODEL_NAME  "PowerPC 7400"#define PPC_ALIGNMENT		8#define PPC_I_CACHE		32768#define PPC_D_CACHE		32768#elif defined(mpc8260)/* *  Added by Andy Dachs <a.dachs@sstl.co.uk> 23/11/2000 */#define CPU_MODEL_NAME  "PowerPC MPC8260"#define PPC_ALIGNMENT		4#define PPC_I_CACHE         	16384#define PPC_D_CACHE         	16384#define PPC_CACHE_ALIGNMENT	32#define PPC_INTERRUPT_MAX       125/*#define PPC_HAS_FPU     	0 */ 	/* my 8260 is one the few with no FPU */#define PPC_HAS_FPU		1	/* the rest do have one */#define PPC_HAS_DOUBLE		1#define PPC_USE_MULTIPLE	1#else #error "Unsupported CPU Model" #endif/* *  Application binary interfaces. * *  PPC_ABI MUST be defined as one of these. *  Only PPC_ABI_POWEROPEN is currently fully supported. *  Only EABI will be supported in the end when *  the tools are there. *  Only big endian is currently supported. *//* *  PowerOpen ABI.  This is Andy's hack of the *  PowerOpen ABI to ELF.  ELF rather than a *  XCOFF assembler is used.  This may work *  if PPC_ASM == PPC_ASM_XCOFF is defined. */#define PPC_ABI_POWEROPEN	0/* *  GCC 2.7.0 munched version of EABI, with *  PowerOpen calling convention and stack frames, *  but EABI style indirect function calls. */#define PPC_ABI_GCC27		1/* *  SVR4 ABI */#define PPC_ABI_SVR4		2/* *  Embedded ABI */#define PPC_ABI_EABI		3/* *  Default to the EABI used by current GNU tools */#ifndef PPC_ABI#define PPC_ABI PPC_ABI_EABI#endif#if (PPC_ABI == PPC_ABI_POWEROPEN)#define PPC_STACK_ALIGNMENT	8#elif (PPC_ABI == PPC_ABI_GCC27)#define PPC_STACK_ALIGNMENT	8#elif (PPC_ABI == PPC_ABI_SVR4)#define PPC_STACK_ALIGNMENT	16#elif (PPC_ABI == PPC_ABI_EABI)#define PPC_STACK_ALIGNMENT	8#else#error  "PPC_ABI is not properly defined"#endif#ifndef PPC_ABI#error  "PPC_ABI is not properly defined"#endif/* *  Assemblers. *  PPC_ASM MUST be defined as one of these. * *  PPC_ASM_ELF:   ELF assembler. Currently used for all ABIs. *  PPC_ASM_XCOFF: XCOFF assembler. May be needed for PowerOpen ABI. * *  NOTE: Only PPC_ABI_ELF is currently fully supported. */#define PPC_ASM_ELF   0#define PPC_ASM_XCOFF 1/* *  Default to the assembler format used by the current GNU tools. */#ifndef PPC_ASM#define PPC_ASM PPC_ASM_ELF#endif/* *  If the maximum number of exception sources has not been defined, *  then default it to 16. */#ifndef PPC_INTERRUPT_MAX#define PPC_INTERRUPT_MAX	16#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -