diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-07-23 19:15:34 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-08-19 20:25:06 -0400 |
commit | 0257c99cdfaca53a881339e1cbca638c61569b05 (patch) | |
tree | 6289d39bc76cc56cd4e08b987d4c7a31dfc2b0ef /arch | |
parent | c7cc58a1ad8dfe3c199d3b6ce50412b86dd3edaf (diff) |
powerpc: Add SPR definitions for new 64-bit BookE
This adds various SPRs defined on 64-bit BookE, along with changes
to the definition of the base MSR values to add the values needed
for 64-bit Book3E.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/include/asm/reg.h | 10 | ||||
-rw-r--r-- | arch/powerpc/include/asm/reg_booke.h | 42 |
2 files changed, 42 insertions, 10 deletions
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 2cedbb427618..c8715331e1b0 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h | |||
@@ -98,19 +98,15 @@ | |||
98 | #define MSR_RI __MASK(MSR_RI_LG) /* Recoverable Exception */ | 98 | #define MSR_RI __MASK(MSR_RI_LG) /* Recoverable Exception */ |
99 | #define MSR_LE __MASK(MSR_LE_LG) /* Little Endian */ | 99 | #define MSR_LE __MASK(MSR_LE_LG) /* Little Endian */ |
100 | 100 | ||
101 | #ifdef CONFIG_PPC64 | 101 | #if defined(CONFIG_PPC_BOOK3S_64) |
102 | /* Server variant */ | ||
102 | #define MSR_ MSR_ME | MSR_RI | MSR_IR | MSR_DR | MSR_ISF |MSR_HV | 103 | #define MSR_ MSR_ME | MSR_RI | MSR_IR | MSR_DR | MSR_ISF |MSR_HV |
103 | #define MSR_KERNEL MSR_ | MSR_SF | 104 | #define MSR_KERNEL MSR_ | MSR_SF |
104 | |||
105 | #define MSR_USER32 MSR_ | MSR_PR | MSR_EE | 105 | #define MSR_USER32 MSR_ | MSR_PR | MSR_EE |
106 | #define MSR_USER64 MSR_USER32 | MSR_SF | 106 | #define MSR_USER64 MSR_USER32 | MSR_SF |
107 | 107 | #elif defined(CONFIG_PPC_BOOK3S_32) || defined(CONFIG_8xx) | |
108 | #else /* 32-bit */ | ||
109 | /* Default MSR for kernel mode. */ | 108 | /* Default MSR for kernel mode. */ |
110 | #ifndef MSR_KERNEL /* reg_booke.h also defines this */ | ||
111 | #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_IR|MSR_DR) | 109 | #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_IR|MSR_DR) |
112 | #endif | ||
113 | |||
114 | #define MSR_USER (MSR_KERNEL|MSR_PR|MSR_EE) | 110 | #define MSR_USER (MSR_KERNEL|MSR_PR|MSR_EE) |
115 | #endif | 111 | #endif |
116 | 112 | ||
diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h index 6bcf364cbb2f..2c9c706e6448 100644 --- a/arch/powerpc/include/asm/reg_booke.h +++ b/arch/powerpc/include/asm/reg_booke.h | |||
@@ -18,18 +18,26 @@ | |||
18 | #define MSR_IS MSR_IR /* Instruction Space */ | 18 | #define MSR_IS MSR_IR /* Instruction Space */ |
19 | #define MSR_DS MSR_DR /* Data Space */ | 19 | #define MSR_DS MSR_DR /* Data Space */ |
20 | #define MSR_PMM (1<<2) /* Performance monitor mark bit */ | 20 | #define MSR_PMM (1<<2) /* Performance monitor mark bit */ |
21 | #define MSR_CM (1<<31) /* Computation Mode (0=32-bit, 1=64-bit) */ | ||
21 | 22 | ||
22 | /* Default MSR for kernel mode. */ | 23 | #if defined(CONFIG_PPC_BOOK3E_64) |
23 | #if defined (CONFIG_40x) | 24 | #define MSR_ MSR_ME | MSR_CE |
25 | #define MSR_KERNEL MSR_ | MSR_CM | ||
26 | #define MSR_USER32 MSR_ | MSR_PR | MSR_EE | ||
27 | #define MSR_USER64 MSR_USER32 | MSR_CM | ||
28 | #elif defined (CONFIG_40x) | ||
24 | #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_IR|MSR_DR|MSR_CE) | 29 | #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_IR|MSR_DR|MSR_CE) |
25 | #elif defined(CONFIG_BOOKE) | 30 | #define MSR_USER (MSR_KERNEL|MSR_PR|MSR_EE) |
31 | #else | ||
26 | #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_CE) | 32 | #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_CE) |
33 | #define MSR_USER (MSR_KERNEL|MSR_PR|MSR_EE) | ||
27 | #endif | 34 | #endif |
28 | 35 | ||
29 | /* Special Purpose Registers (SPRNs)*/ | 36 | /* Special Purpose Registers (SPRNs)*/ |
30 | #define SPRN_DECAR 0x036 /* Decrementer Auto Reload Register */ | 37 | #define SPRN_DECAR 0x036 /* Decrementer Auto Reload Register */ |
31 | #define SPRN_IVPR 0x03F /* Interrupt Vector Prefix Register */ | 38 | #define SPRN_IVPR 0x03F /* Interrupt Vector Prefix Register */ |
32 | #define SPRN_USPRG0 0x100 /* User Special Purpose Register General 0 */ | 39 | #define SPRN_USPRG0 0x100 /* User Special Purpose Register General 0 */ |
40 | #define SPRN_SPRG3R 0x103 /* Special Purpose Register General 3 Read */ | ||
33 | #define SPRN_SPRG4R 0x104 /* Special Purpose Register General 4 Read */ | 41 | #define SPRN_SPRG4R 0x104 /* Special Purpose Register General 4 Read */ |
34 | #define SPRN_SPRG5R 0x105 /* Special Purpose Register General 5 Read */ | 42 | #define SPRN_SPRG5R 0x105 /* Special Purpose Register General 5 Read */ |
35 | #define SPRN_SPRG6R 0x106 /* Special Purpose Register General 6 Read */ | 43 | #define SPRN_SPRG6R 0x106 /* Special Purpose Register General 6 Read */ |
@@ -38,11 +46,18 @@ | |||
38 | #define SPRN_SPRG5W 0x115 /* Special Purpose Register General 5 Write */ | 46 | #define SPRN_SPRG5W 0x115 /* Special Purpose Register General 5 Write */ |
39 | #define SPRN_SPRG6W 0x116 /* Special Purpose Register General 6 Write */ | 47 | #define SPRN_SPRG6W 0x116 /* Special Purpose Register General 6 Write */ |
40 | #define SPRN_SPRG7W 0x117 /* Special Purpose Register General 7 Write */ | 48 | #define SPRN_SPRG7W 0x117 /* Special Purpose Register General 7 Write */ |
49 | #define SPRN_EPCR 0x133 /* Embedded Processor Control Register */ | ||
41 | #define SPRN_DBCR2 0x136 /* Debug Control Register 2 */ | 50 | #define SPRN_DBCR2 0x136 /* Debug Control Register 2 */ |
42 | #define SPRN_IAC3 0x13A /* Instruction Address Compare 3 */ | 51 | #define SPRN_IAC3 0x13A /* Instruction Address Compare 3 */ |
43 | #define SPRN_IAC4 0x13B /* Instruction Address Compare 4 */ | 52 | #define SPRN_IAC4 0x13B /* Instruction Address Compare 4 */ |
44 | #define SPRN_DVC1 0x13E /* Data Value Compare Register 1 */ | 53 | #define SPRN_DVC1 0x13E /* Data Value Compare Register 1 */ |
45 | #define SPRN_DVC2 0x13F /* Data Value Compare Register 2 */ | 54 | #define SPRN_DVC2 0x13F /* Data Value Compare Register 2 */ |
55 | #define SPRN_MAS8 0x155 /* MMU Assist Register 8 */ | ||
56 | #define SPRN_TLB0PS 0x158 /* TLB 0 Page Size Register */ | ||
57 | #define SPRN_MAS5_MAS6 0x15c /* MMU Assist Register 5 || 6 */ | ||
58 | #define SPRN_MAS8_MAS1 0x15d /* MMU Assist Register 8 || 1 */ | ||
59 | #define SPRN_MAS7_MAS3 0x174 /* MMU Assist Register 7 || 3 */ | ||
60 | #define SPRN_MAS0_MAS1 0x175 /* MMU Assist Register 0 || 1 */ | ||
46 | #define SPRN_IVOR0 0x190 /* Interrupt Vector Offset Register 0 */ | 61 | #define SPRN_IVOR0 0x190 /* Interrupt Vector Offset Register 0 */ |
47 | #define SPRN_IVOR1 0x191 /* Interrupt Vector Offset Register 1 */ | 62 | #define SPRN_IVOR1 0x191 /* Interrupt Vector Offset Register 1 */ |
48 | #define SPRN_IVOR2 0x192 /* Interrupt Vector Offset Register 2 */ | 63 | #define SPRN_IVOR2 0x192 /* Interrupt Vector Offset Register 2 */ |
@@ -425,6 +440,27 @@ | |||
425 | #define SGR_NORMAL 0 /* Speculative fetching allowed. */ | 440 | #define SGR_NORMAL 0 /* Speculative fetching allowed. */ |
426 | #define SGR_GUARDED 1 /* Speculative fetching disallowed. */ | 441 | #define SGR_GUARDED 1 /* Speculative fetching disallowed. */ |
427 | 442 | ||
443 | /* Bit definitions for EPCR */ | ||
444 | #define SPRN_EPCR_EXTGS 0x80000000 /* External Input interrupt | ||
445 | * directed to Guest state */ | ||
446 | #define SPRN_EPCR_DTLBGS 0x40000000 /* Data TLB Error interrupt | ||
447 | * directed to guest state */ | ||
448 | #define SPRN_EPCR_ITLBGS 0x20000000 /* Instr. TLB error interrupt | ||
449 | * directed to guest state */ | ||
450 | #define SPRN_EPCR_DSIGS 0x10000000 /* Data Storage interrupt | ||
451 | * directed to guest state */ | ||
452 | #define SPRN_EPCR_ISIGS 0x08000000 /* Instr. Storage interrupt | ||
453 | * directed to guest state */ | ||
454 | #define SPRN_EPCR_DUVD 0x04000000 /* Disable Hypervisor Debug */ | ||
455 | #define SPRN_EPCR_ICM 0x02000000 /* Interrupt computation mode | ||
456 | * (copied to MSR:CM on intr) */ | ||
457 | #define SPRN_EPCR_GICM 0x01000000 /* Guest Interrupt Comp. mode */ | ||
458 | #define SPRN_EPCR_DGTMI 0x00800000 /* Disable TLB Guest Management | ||
459 | * instructions */ | ||
460 | #define SPRN_EPCR_DMIUH 0x00400000 /* Disable MAS Interrupt updates | ||
461 | * for hypervisor */ | ||
462 | |||
463 | |||
428 | /* | 464 | /* |
429 | * The IBM-403 is an even more odd special case, as it is much | 465 | * The IBM-403 is an even more odd special case, as it is much |
430 | * older than the IBM-405 series. We put these down here incase someone | 466 | * older than the IBM-405 series. We put these down here incase someone |