aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/reg.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc/reg.h')
-rw-r--r--include/asm-powerpc/reg.h58
1 files changed, 46 insertions, 12 deletions
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h
index eb392d038ed7..12ecc9b9f285 100644
--- a/include/asm-powerpc/reg.h
+++ b/include/asm-powerpc/reg.h
@@ -145,6 +145,10 @@
145#define SPRN_CTR 0x009 /* Count Register */ 145#define SPRN_CTR 0x009 /* Count Register */
146#define SPRN_CTRLF 0x088 146#define SPRN_CTRLF 0x088
147#define SPRN_CTRLT 0x098 147#define SPRN_CTRLT 0x098
148#define CTRL_CT 0xc0000000 /* current thread */
149#define CTRL_CT0 0x80000000 /* thread 0 */
150#define CTRL_CT1 0x40000000 /* thread 1 */
151#define CTRL_TE 0x00c00000 /* thread enable */
148#define CTRL_RUNLATCH 0x1 152#define CTRL_RUNLATCH 0x1
149#define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */ 153#define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */
150#define DABR_TRANSLATION (1UL << 2) 154#define DABR_TRANSLATION (1UL << 2)
@@ -257,11 +261,11 @@
257#define SPRN_HID6 0x3F9 /* BE HID 6 */ 261#define SPRN_HID6 0x3F9 /* BE HID 6 */
258#define HID6_LB (0x0F<<12) /* Concurrent Large Page Modes */ 262#define HID6_LB (0x0F<<12) /* Concurrent Large Page Modes */
259#define HID6_DLP (1<<20) /* Disable all large page modes (4K only) */ 263#define HID6_DLP (1<<20) /* Disable all large page modes (4K only) */
260#define SPRN_TSCR 0x399 /* Thread switch control on BE */ 264#define SPRN_TSC_CELL 0x399 /* Thread switch control on Cell */
261#define SPRN_TTR 0x39A /* Thread switch timeout on BE */ 265#define TSC_CELL_DEC_ENABLE_0 0x400000 /* Decrementer Interrupt */
262#define TSCR_DEC_ENABLE 0x200000 /* Decrementer Interrupt */ 266#define TSC_CELL_DEC_ENABLE_1 0x200000 /* Decrementer Interrupt */
263#define TSCR_EE_ENABLE 0x100000 /* External Interrupt */ 267#define TSC_CELL_EE_ENABLE 0x100000 /* External Interrupt */
264#define TSCR_EE_BOOST 0x080000 /* External Interrupt Boost */ 268#define TSC_CELL_EE_BOOST 0x080000 /* External Interrupt Boost */
265#define SPRN_TSC 0x3FD /* Thread switch control on others */ 269#define SPRN_TSC 0x3FD /* Thread switch control on others */
266#define SPRN_TST 0x3FC /* Thread switch timeout on others */ 270#define SPRN_TST 0x3FC /* Thread switch timeout on others */
267#if !defined(SPRN_IAC1) && !defined(SPRN_IAC2) 271#if !defined(SPRN_IAC1) && !defined(SPRN_IAC2)
@@ -375,6 +379,14 @@
375#define SPRN_SPRG7 0x117 /* Special Purpose Register General 7 */ 379#define SPRN_SPRG7 0x117 /* Special Purpose Register General 7 */
376#define SPRN_SRR0 0x01A /* Save/Restore Register 0 */ 380#define SPRN_SRR0 0x01A /* Save/Restore Register 0 */
377#define SPRN_SRR1 0x01B /* Save/Restore Register 1 */ 381#define SPRN_SRR1 0x01B /* Save/Restore Register 1 */
382#define SRR1_WAKEMASK 0x00380000 /* reason for wakeup */
383#define SRR1_WAKERESET 0x00380000 /* System reset */
384#define SRR1_WAKESYSERR 0x00300000 /* System error */
385#define SRR1_WAKEEE 0x00200000 /* External interrupt */
386#define SRR1_WAKEMT 0x00280000 /* mtctrl */
387#define SRR1_WAKEDEC 0x00180000 /* Decrementer interrupt */
388#define SRR1_WAKETHERM 0x00100000 /* Thermal management interrupt */
389
378#ifndef SPRN_SVR 390#ifndef SPRN_SVR
379#define SPRN_SVR 0x11E /* System Version Register */ 391#define SPRN_SVR 0x11E /* System Version Register */
380#endif 392#endif
@@ -443,12 +455,35 @@
443#define SPRN_SDAR 781 455#define SPRN_SDAR 781
444 456
445#else /* 32-bit */ 457#else /* 32-bit */
446#define SPRN_MMCR0 0x3B8 /* Monitor Mode Control Register 0 */ 458#define SPRN_MMCR0 952 /* Monitor Mode Control Register 0 */
447#define SPRN_MMCR1 0x3BC /* Monitor Mode Control Register 1 */ 459#define MMCR0_FC 0x80000000UL /* freeze counters */
448#define SPRN_PMC1 0x3B9 /* Performance Counter Register 1 */ 460#define MMCR0_FCS 0x40000000UL /* freeze in supervisor state */
449#define SPRN_PMC2 0x3BA /* Performance Counter Register 2 */ 461#define MMCR0_FCP 0x20000000UL /* freeze in problem state */
450#define SPRN_PMC3 0x3BD /* Performance Counter Register 3 */ 462#define MMCR0_FCM1 0x10000000UL /* freeze counters while MSR mark = 1 */
451#define SPRN_PMC4 0x3BE /* Performance Counter Register 4 */ 463#define MMCR0_FCM0 0x08000000UL /* freeze counters while MSR mark = 0 */
464#define MMCR0_PMXE 0x04000000UL /* performance monitor exception enable */
465#define MMCR0_FCECE 0x02000000UL /* freeze ctrs on enabled cond or event */
466#define MMCR0_TBEE 0x00400000UL /* time base exception enable */
467#define MMCR0_PMC1CE 0x00008000UL /* PMC1 count enable*/
468#define MMCR0_PMCnCE 0x00004000UL /* count enable for all but PMC 1*/
469#define MMCR0_TRIGGER 0x00002000UL /* TRIGGER enable */
470#define MMCR0_PMC1SEL 0x00001fc0UL /* PMC 1 Event */
471#define MMCR0_PMC2SEL 0x0000003fUL /* PMC 2 Event */
472
473#define SPRN_MMCR1 956
474#define MMCR1_PMC3SEL 0xf8000000UL /* PMC 3 Event */
475#define MMCR1_PMC4SEL 0x07c00000UL /* PMC 4 Event */
476#define MMCR1_PMC5SEL 0x003e0000UL /* PMC 5 Event */
477#define MMCR1_PMC6SEL 0x0001f800UL /* PMC 6 Event */
478#define SPRN_MMCR2 944
479#define SPRN_PMC1 953 /* Performance Counter Register 1 */
480#define SPRN_PMC2 954 /* Performance Counter Register 2 */
481#define SPRN_PMC3 957 /* Performance Counter Register 3 */
482#define SPRN_PMC4 958 /* Performance Counter Register 4 */
483#define SPRN_PMC5 945 /* Performance Counter Register 5 */
484#define SPRN_PMC6 946 /* Performance Counter Register 6 */
485
486#define SPRN_SIAR 955 /* Sampled Instruction Address Register */
452 487
453/* Bit definitions for MMCR0 and PMC1 / PMC2. */ 488/* Bit definitions for MMCR0 and PMC1 / PMC2. */
454#define MMCR0_PMC1_CYCLES (1 << 7) 489#define MMCR0_PMC1_CYCLES (1 << 7)
@@ -458,7 +493,6 @@
458#define MMCR0_PMC2_CYCLES 0x1 493#define MMCR0_PMC2_CYCLES 0x1
459#define MMCR0_PMC2_ITLB 0x7 494#define MMCR0_PMC2_ITLB 0x7
460#define MMCR0_PMC2_LOADMISSTIME 0x5 495#define MMCR0_PMC2_LOADMISSTIME 0x5
461#define MMCR0_PMXE (1 << 26)
462#endif 496#endif
463 497
464/* Processor Version Register (PVR) field extraction */ 498/* Processor Version Register (PVR) field extraction */