📄 processor.h
字号:
#define XER SPRN_XER#define DECAR SPRN_DECAR#define CSRR0 SPRN_CSRR0#define CSRR1 SPRN_CSRR1#define IVPR SPRN_IVPR#define USPRG0 SPRN_USPRG#define SPRG4R SPRN_SPRG4R#define SPRG5R SPRN_SPRG5R#define SPRG6R SPRN_SPRG6R#define SPRG7R SPRN_SPRG7R#define SPRG4W SPRN_SPRG4W#define SPRG5W SPRN_SPRG5W#define SPRG6W SPRN_SPRG6W#define SPRG7W SPRN_SPRG7W#define DEAR SPRN_DEAR#define DBCR2 SPRN_DBCR2#define IAC3 SPRN_IAC3#define IAC4 SPRN_IAC4#define DVC1 SPRN_DVC1#define DVC2 SPRN_DVC2#define IVOR0 SPRN_IVOR0#define IVOR1 SPRN_IVOR1#define IVOR2 SPRN_IVOR2#define IVOR3 SPRN_IVOR3#define IVOR4 SPRN_IVOR4#define IVOR5 SPRN_IVOR5#define IVOR6 SPRN_IVOR6#define IVOR7 SPRN_IVOR7#define IVOR8 SPRN_IVOR8#define IVOR9 SPRN_IVOR9#define IVOR10 SPRN_IVOR10#define IVOR11 SPRN_IVOR11#define IVOR12 SPRN_IVOR12#define IVOR13 SPRN_IVOR13#define IVOR14 SPRN_IVOR14#define IVOR15 SPRN_IVOR15#define IVOR32 SPRN_IVOR32#define IVOR33 SPRN_IVOR33#define IVOR34 SPRN_IVOR34#define IVOR35 SPRN_IVOR35#define MCSRR0 SPRN_MCSRR0#define MCSRR1 SPRN_MCSRR1#define L1CSR0 SPRN_L1CSR0#define L1CSR1 SPRN_L1CSR1#define MCSR SPRN_MCSR#define MMUCSR0 SPRN_MMUCSR0#define BUCSR SPRN_BUCSR#define PID0 SPRN_PID#define PID1 SPRN_PID1#define PID2 SPRN_PID2#define MAS0 SPRN_MAS0#define MAS1 SPRN_MAS1#define MAS2 SPRN_MAS2#define MAS3 SPRN_MAS3#define MAS4 SPRN_MAS4#define MAS5 SPRN_MAS5#define MAS6 SPRN_MAS6#define MAS7 SPRN_MAS7/* Device Control Registers */#define DCRN_BEAR 0x090 /* Bus Error Address Register */#define DCRN_BESR 0x091 /* Bus Error Syndrome Register */#define BESR_DSES 0x80000000 /* Data-Side Error Status */#define BESR_DMES 0x40000000 /* DMA Error Status */#define BESR_RWS 0x20000000 /* Read/Write Status */#define BESR_ETMASK 0x1C000000 /* Error Type */#define ET_PROT 0#define ET_PARITY 1#define ET_NCFG 2#define ET_BUSERR 4#define ET_BUSTO 6#define DCRN_DMACC0 0x0C4 /* DMA Chained Count Register 0 */#define DCRN_DMACC1 0x0CC /* DMA Chained Count Register 1 */#define DCRN_DMACC2 0x0D4 /* DMA Chained Count Register 2 */#define DCRN_DMACC3 0x0DC /* DMA Chained Count Register 3 */#define DCRN_DMACR0 0x0C0 /* DMA Channel Control Register 0 */#define DCRN_DMACR1 0x0C8 /* DMA Channel Control Register 1 */#define DCRN_DMACR2 0x0D0 /* DMA Channel Control Register 2 */#define DCRN_DMACR3 0x0D8 /* DMA Channel Control Register 3 */#define DCRN_DMACT0 0x0C1 /* DMA Count Register 0 */#define DCRN_DMACT1 0x0C9 /* DMA Count Register 1 */#define DCRN_DMACT2 0x0D1 /* DMA Count Register 2 */#define DCRN_DMACT3 0x0D9 /* DMA Count Register 3 */#define DCRN_DMADA0 0x0C2 /* DMA Destination Address Register 0 */#define DCRN_DMADA1 0x0CA /* DMA Destination Address Register 1 */#define DCRN_DMADA2 0x0D2 /* DMA Destination Address Register 2 */#define DCRN_DMADA3 0x0DA /* DMA Destination Address Register 3 */#define DCRN_DMASA0 0x0C3 /* DMA Source Address Register 0 */#define DCRN_DMASA1 0x0CB /* DMA Source Address Register 1 */#define DCRN_DMASA2 0x0D3 /* DMA Source Address Register 2 */#define DCRN_DMASA3 0x0DB /* DMA Source Address Register 3 */#define DCRN_DMASR 0x0E0 /* DMA Status Register */#define DCRN_EXIER 0x042 /* External Interrupt Enable Register */#define EXIER_CIE 0x80000000 /* Critical Interrupt Enable */#define EXIER_SRIE 0x08000000 /* Serial Port Rx Int. Enable */#define EXIER_STIE 0x04000000 /* Serial Port Tx Int. Enable */#define EXIER_JRIE 0x02000000 /* JTAG Serial Port Rx Int. Enable */#define EXIER_JTIE 0x01000000 /* JTAG Serial Port Tx Int. Enable */#define EXIER_D0IE 0x00800000 /* DMA Channel 0 Interrupt Enable */#define EXIER_D1IE 0x00400000 /* DMA Channel 1 Interrupt Enable */#define EXIER_D2IE 0x00200000 /* DMA Channel 2 Interrupt Enable */#define EXIER_D3IE 0x00100000 /* DMA Channel 3 Interrupt Enable */#define EXIER_E0IE 0x00000010 /* External Interrupt 0 Enable */#define EXIER_E1IE 0x00000008 /* External Interrupt 1 Enable */#define EXIER_E2IE 0x00000004 /* External Interrupt 2 Enable */#define EXIER_E3IE 0x00000002 /* External Interrupt 3 Enable */#define EXIER_E4IE 0x00000001 /* External Interrupt 4 Enable */#define DCRN_EXISR 0x040 /* External Interrupt Status Register */#define DCRN_IOCR 0x0A0 /* Input/Output Configuration Register */#define IOCR_E0TE 0x80000000#define IOCR_E0LP 0x40000000#define IOCR_E1TE 0x20000000#define IOCR_E1LP 0x10000000#define IOCR_E2TE 0x08000000#define IOCR_E2LP 0x04000000#define IOCR_E3TE 0x02000000#define IOCR_E3LP 0x01000000#define IOCR_E4TE 0x00800000#define IOCR_E4LP 0x00400000#define IOCR_EDT 0x00080000#define IOCR_SOR 0x00040000#define IOCR_EDO 0x00008000#define IOCR_2XC 0x00004000#define IOCR_ATC 0x00002000#define IOCR_SPD 0x00001000#define IOCR_BEM 0x00000800#define IOCR_PTD 0x00000400#define IOCR_ARE 0x00000080#define IOCR_DRC 0x00000020#define IOCR_RDM(x) (((x) & 0x3) << 3)#define IOCR_TCS 0x00000004#define IOCR_SCS 0x00000002#define IOCR_SPC 0x00000001/* System-On-Chip Version Register *//* System-On-Chip Version Register (SVR) field extraction */#define SVR_VER(svr) (((svr) >> 16) & 0xFFFF) /* Version field */#define SVR_REV(svr) (((svr) >> 0) & 0xFFFF) /* Revision field */#define SVR_CID(svr) (((svr) >> 28) & 0x0F) /* Company or manufacturer ID */#define SVR_SOCOP(svr) (((svr) >> 22) & 0x3F) /* SOC integration options */#define SVR_SID(svr) (((svr) >> 16) & 0x3F) /* SOC ID */#define SVR_PROC(svr) (((svr) >> 12) & 0x0F) /* Process revision field */#define SVR_MFG(svr) (((svr) >> 8) & 0x0F) /* Manufacturing revision */#define SVR_MJREV(svr) (((svr) >> 4) & 0x0F) /* Major SOC design revision indicator */#define SVR_MNREV(svr) (((svr) >> 0) & 0x0F) /* Minor SOC design revision indicator *//* System-On-Chip Version Numbers (version field only) */#define SVR_MPC5200 0x8011/* Processor Version Register *//* Processor Version Register (PVR) field extraction */#define PVR_VER(pvr) (((pvr) >> 16) & 0xFFFF) /* Version field */#define PVR_REV(pvr) (((pvr) >> 0) & 0xFFFF) /* Revison field *//* * AMCC has further subdivided the standard PowerPC 16-bit version and * revision subfields of the PVR for the PowerPC 403s into the following: */#define PVR_FAM(pvr) (((pvr) >> 20) & 0xFFF) /* Family field */#define PVR_MEM(pvr) (((pvr) >> 16) & 0xF) /* Member field */#define PVR_CORE(pvr) (((pvr) >> 12) & 0xF) /* Core field */#define PVR_CFG(pvr) (((pvr) >> 8) & 0xF) /* Configuration field */#define PVR_MAJ(pvr) (((pvr) >> 4) & 0xF) /* Major revision field */#define PVR_MIN(pvr) (((pvr) >> 0) & 0xF) /* Minor revision field *//* Processor Version Numbers */#define PVR_403GA 0x00200000#define PVR_403GB 0x00200100#define PVR_403GC 0x00200200#define PVR_403GCX 0x00201400#define PVR_405GP 0x40110000#define PVR_405GP_RB 0x40110040#define PVR_405GP_RC 0x40110082#define PVR_405GP_RD 0x401100C4#define PVR_405GP_RE 0x40110145 /* same as pc405cr rev c */#define PVR_405CR_RA 0x40110041#define PVR_405CR_RB 0x401100C5#define PVR_405CR_RC 0x40110145 /* same as pc405gp rev e */#define PVR_405EP_RA 0x51210950#define PVR_405GPR_RB 0x50910951#define PVR_440GP_RB 0x40120440#define PVR_440GP_RC 0x40120481#define PVR_440EP_RA 0x42221850#define PVR_440EP_RB 0x422218D3 /* 440EP rev B and 440GR rev A have same PVR */#define PVR_440EP_RC 0x422218D4 /* 440EP rev C and 440GR rev B have same PVR */#define PVR_440GR_RA 0x422218D3 /* 440EP rev B and 440GR rev A have same PVR */#define PVR_440GR_RB 0x422218D4 /* 440EP rev C and 440GR rev B have same PVR */#define PVR_440EPX1_RA 0x216218D0 /* 440EPX rev A with Security / Kasumi */#define PVR_440EPX2_RA 0x216218D4 /* 440EPX rev A without Security / Kasumi */#define PVR_440GRX1_RA 0x216218D8 /* 440GRX rev A with Security / Kasumi */#define PVR_440GRX2_RA 0x216218DC /* 440GRX rev A without Security / Kasumi */#define PVR_440GX_RA 0x51B21850#define PVR_440GX_RB 0x51B21851#define PVR_440GX_RC 0x51B21892#define PVR_440GX_RF 0x51B21894#define PVR_405EP_RB 0x51210950#define PVR_440SP_RA 0x53221850#define PVR_440SP_RB 0x53221891#define PVR_440SPe_RA 0x53421890#define PVR_440SPe_RB 0x53421891#define PVR_601 0x00010000#define PVR_602 0x00050000#define PVR_603 0x00030000#define PVR_603e 0x00060000#define PVR_603ev 0x00070000#define PVR_603r 0x00071000#define PVR_604 0x00040000#define PVR_604e 0x00090000#define PVR_604r 0x000A0000#define PVR_620 0x00140000#define PVR_740 0x00080000#define PVR_750 PVR_740#define PVR_740P 0x10080000#define PVR_750P PVR_740P#define PVR_7400 0x000C0000#define PVR_7410 0x800C0000#define PVR_7450 0x80000000#define PVR_85xx 0x80200000#define PVR_85xx_REV1 (PVR_85xx | 0x0010)#define PVR_85xx_REV2 (PVR_85xx | 0x0020)#define PVR_86xx 0x80040000#define PVR_86xx_REV1 (PVR_86xx | 0x0010)/* * For the 8xx processors, all of them report the same PVR family for * the PowerPC core. The various versions of these processors must be * differentiated by the version number in the Communication Processor * Module (CPM). */#define PVR_821 0x00500000#define PVR_823 PVR_821#define PVR_850 PVR_821#define PVR_860 PVR_821#define PVR_7400 0x000C0000#define PVR_8240 0x00810100/* * PowerQUICC II family processors report different PVR values depending * on silicon process (HiP3, HiP4, HiP7, etc.) */#define PVR_8260 PVR_8240#define PVR_8260_HIP3 0x00810101#define PVR_8260_HIP4 0x80811014#define PVR_8260_HIP7 0x80822011#define PVR_8260_HIP7R1 0x80822013#define PVR_8260_HIP7RA 0x80822014/* * System Version Register *//* System Version Register (SVR) field extraction */#define SVR_VER(svr) (((svr) >> 16) & 0xFFFF) /* Version field */#define SVR_REV(svr) (((svr) >> 0) & 0xFFFF) /* Revison field */#define SVR_SUBVER(svr) (((svr) >> 8) & 0xFF) /* Process/MFG sub-version */#define SVR_FAM(svr) (((svr) >> 20) & 0xFFF) /* Family field */#define SVR_MEM(svr) (((svr) >> 16) & 0xF) /* Member field */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -