xref: /openbmc/u-boot/arch/mips/include/asm/reg.h (revision d9b23e26)
1 /*
2  * Various register offset definitions for debuggers, core file
3  * examiners and whatnot.
4  *
5  * Copyright (C) 1995, 1999 by Ralf Baechle
6  * Copyright (C) 1995, 1999 Silicon Graphics
7  *
8  * SPDX-License-Identifier:	GPL-2.0
9  */
10 #ifndef __ASM_MIPS_REG_H
11 #define __ASM_MIPS_REG_H
12 
13 #if defined(CONFIG_32BIT) || defined(WANT_COMPAT_REG_H)
14 
15 #define EF_R0			6
16 #define EF_R1			7
17 #define EF_R2			8
18 #define EF_R3			9
19 #define EF_R4			10
20 #define EF_R5			11
21 #define EF_R6			12
22 #define EF_R7			13
23 #define EF_R8			14
24 #define EF_R9			15
25 #define EF_R10			16
26 #define EF_R11			17
27 #define EF_R12			18
28 #define EF_R13			19
29 #define EF_R14			20
30 #define EF_R15			21
31 #define EF_R16			22
32 #define EF_R17			23
33 #define EF_R18			24
34 #define EF_R19			25
35 #define EF_R20			26
36 #define EF_R21			27
37 #define EF_R22			28
38 #define EF_R23			29
39 #define EF_R24			30
40 #define EF_R25			31
41 
42 /*
43  * k0/k1 unsaved
44  */
45 #define EF_R26			32
46 #define EF_R27			33
47 
48 #define EF_R28			34
49 #define EF_R29			35
50 #define EF_R30			36
51 #define EF_R31			37
52 
53 /*
54  * Saved special registers
55  */
56 #define EF_LO			38
57 #define EF_HI			39
58 
59 #define EF_CP0_EPC		40
60 #define EF_CP0_BADVADDR		41
61 #define EF_CP0_STATUS		42
62 #define EF_CP0_CAUSE		43
63 #define EF_UNUSED0		44
64 
65 #define EF_SIZE			180
66 
67 #endif
68 
69 #ifdef CONFIG_64BIT
70 
71 #define EF_R0			 0
72 #define EF_R1			 1
73 #define EF_R2			 2
74 #define EF_R3			 3
75 #define EF_R4			 4
76 #define EF_R5			 5
77 #define EF_R6			 6
78 #define EF_R7			 7
79 #define EF_R8			 8
80 #define EF_R9			 9
81 #define EF_R10			10
82 #define EF_R11			11
83 #define EF_R12			12
84 #define EF_R13			13
85 #define EF_R14			14
86 #define EF_R15			15
87 #define EF_R16			16
88 #define EF_R17			17
89 #define EF_R18			18
90 #define EF_R19			19
91 #define EF_R20			20
92 #define EF_R21			21
93 #define EF_R22			22
94 #define EF_R23			23
95 #define EF_R24			24
96 #define EF_R25			25
97 
98 /*
99  * k0/k1 unsaved
100  */
101 #define EF_R26			26
102 #define EF_R27			27
103 
104 #define EF_R28			28
105 #define EF_R29			29
106 #define EF_R30			30
107 #define EF_R31			31
108 
109 /*
110  * Saved special registers
111  */
112 #define EF_LO			32
113 #define EF_HI			33
114 
115 #define EF_CP0_EPC		34
116 #define EF_CP0_BADVADDR		35
117 #define EF_CP0_STATUS		36
118 #define EF_CP0_CAUSE		37
119 
120 #define EF_SIZE			304	/* size in bytes */
121 
122 #endif /* CONFIG_64BIT */
123 
124 #endif /* __ASM_MIPS_REG_H */
125