1 | /* |
---|
2 | * This program is free software; you can redistribute it and/or modify |
---|
3 | * it under the terms of the GNU General Public License as published by |
---|
4 | * the Free Software Foundation; either version 2 of the License, or |
---|
5 | * (at your option) any later version. |
---|
6 | * |
---|
7 | * This program is distributed in the hope that it will be useful, |
---|
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
10 | * GNU General Public License for more details. |
---|
11 | * |
---|
12 | * You should have received a copy of the GNU General Public License |
---|
13 | * along with this program; if not, write to the Free Software |
---|
14 | * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
15 | * |
---|
16 | * Copyright (C) IBM Corp. 2005 |
---|
17 | * |
---|
18 | * Authors: Jimi Xenidis <jimix@watson.ibm.com> |
---|
19 | */ |
---|
20 | |
---|
21 | #ifndef _POWERPC_MSR_H |
---|
22 | #define _POWERPC_MSR_H |
---|
23 | |
---|
24 | #ifdef __ASSEMBLY__ |
---|
25 | #define ULL(x) x |
---|
26 | #else |
---|
27 | #define ULL(x) x ## ULL |
---|
28 | #endif |
---|
29 | |
---|
30 | /* Flags in MSR: */ |
---|
31 | #define MSR_SF ULL(0x8000000000000000) |
---|
32 | #define MSR_TA ULL(0x4000000000000000) |
---|
33 | #define MSR_ISF ULL(0x2000000000000000) |
---|
34 | #define MSR_HV ULL(0x1000000000000000) |
---|
35 | #define MSR_VMX ULL(0x0000000002000000) |
---|
36 | #define MSR_MER ULL(0x0000000000200000) |
---|
37 | #define MSR_POW ULL(0x0000000000040000) |
---|
38 | #define MSR_ILE ULL(0x0000000000010000) |
---|
39 | #define MSR_EE ULL(0x0000000000008000) |
---|
40 | #define MSR_PR ULL(0x0000000000004000) |
---|
41 | #define MSR_FP ULL(0x0000000000002000) |
---|
42 | #define MSR_ME ULL(0x0000000000001000) |
---|
43 | #define MSR_FE0 ULL(0x0000000000000800) |
---|
44 | #define MSR_SE ULL(0x0000000000000400) |
---|
45 | #define MSR_BE ULL(0x0000000000000200) |
---|
46 | #define MSR_FE1 ULL(0x0000000000000100) |
---|
47 | #define MSR_IP ULL(0x0000000000000040) |
---|
48 | #define MSR_IR ULL(0x0000000000000020) |
---|
49 | #define MSR_DR ULL(0x0000000000000010) |
---|
50 | #define MSR_PMM ULL(0x0000000000000004) |
---|
51 | #define MSR_RI ULL(0x0000000000000002) |
---|
52 | #define MSR_LE ULL(0x0000000000000001) |
---|
53 | |
---|
54 | /* MSR bits set on the systemsim simulator */ |
---|
55 | #define MSR_SIM ULL(0x0000000020000000) |
---|
56 | #define MSR_SYSTEMSIM ULL(0x0000000010000000) |
---|
57 | |
---|
58 | /* On a trap, srr1's copy of msr defines some bits as follows: */ |
---|
59 | #define MSR_TRAP_FE ULL(0x0000000000100000) /* Floating Point Exception */ |
---|
60 | #define MSR_TRAP_IOP ULL(0x0000000000080000) /* Illegal Instruction */ |
---|
61 | #define MSR_TRAP_PRIV ULL(0x0000000000040000) /* Privileged Instruction */ |
---|
62 | #define MSR_TRAP ULL(0x0000000000020000) /* Trap Instruction */ |
---|
63 | #define MSR_TRAP_NEXT ULL(0x0000000000010000) /* PC is next instruction */ |
---|
64 | #define MSR_TRAP_BITS (MSR_TRAP_FE|MSR_TRAP_IOP|MSR_TRAP_PRIV|MSR_TRAP) |
---|
65 | |
---|
66 | #endif /* _POWERPC_MSR_H */ |
---|