xref: /kvm-unit-tests/lib/powerpc/asm/reg.h (revision c76b0d0a3842ba312a2d8512f7a3728f4598bf94)
1 #ifndef _ASMPOWERPC_REG_H
2 #define _ASMPOWERPC_REG_H
3 
4 #include <linux/const.h>
5 
6 #define UL(x) _AC(x, UL)
7 
8 #define SPR_DSISR	0x012
9 #define SPR_DAR		0x013
10 #define SPR_DEC		0x016
11 #define SPR_SRR0	0x01a
12 #define SPR_SRR1	0x01b
13 #define   SRR1_PREFIX		UL(0x20000000)
14 #define SPR_FSCR	0x099
15 #define   FSCR_PREFIX		UL(0x2000)
16 #define SPR_HFSCR	0x0be
17 #define SPR_TB		0x10c
18 #define SPR_SPRG0	0x110
19 #define SPR_SPRG1	0x111
20 #define SPR_SPRG2	0x112
21 #define SPR_SPRG3	0x113
22 #define SPR_TBU40	0x11e
23 #define SPR_PVR		0x11f
24 #define   PVR_VERSION_MASK	UL(0xffff0000)
25 #define   PVR_VER_970		UL(0x00390000)
26 #define   PVR_VER_970FX		UL(0x003c0000)
27 #define   PVR_VER_970MP		UL(0x00440000)
28 #define   PVR_VER_POWER8E	UL(0x004b0000)
29 #define   PVR_VER_POWER8NVL	UL(0x004c0000)
30 #define   PVR_VER_POWER8	UL(0x004d0000)
31 #define   PVR_VER_POWER9	UL(0x004e0000)
32 #define   PVR_VER_POWER10	UL(0x00800000)
33 #define SPR_HDEC	0x136
34 #define SPR_HSRR0	0x13a
35 #define SPR_HSRR1	0x13b
36 #define SPR_LPCR	0x13e
37 #define   LPCR_HDICE		UL(0x1)
38 #define SPR_HEIR	0x153
39 #define SPR_MMCR0	0x31b
40 #define   MMCR0_FC		UL(0x80000000)
41 #define   MMCR0_PMAE		UL(0x04000000)
42 #define   MMCR0_PMAO		UL(0x00000080)
43 #define SPR_SIAR	0x31c
44 
45 /* Machine State Register definitions: */
46 #define MSR_LE_BIT	0
47 #define MSR_EE_BIT	15			/* External Interrupts Enable */
48 #define MSR_HV_BIT	60			/* Hypervisor mode */
49 #define MSR_SF_BIT	63			/* 64-bit mode */
50 
51 #define MSR_DR		UL(0x0010)
52 #define MSR_IR		UL(0x0020)
53 #define MSR_BE		UL(0x0200)		/* Branch Trace Enable */
54 #define MSR_SE		UL(0x0400)		/* Single Step Enable */
55 #define MSR_EE		UL(0x8000)
56 #define MSR_ME		UL(0x1000)
57 
58 #endif
59