xref: /openbmc/linux/arch/mips/include/asm/sn/sn0/kldir.h (revision aa2d74f9)
1aa2d74f9SThomas Bogendoerfer /* SPDX-License-Identifier: GPL-2.0 */
2aa2d74f9SThomas Bogendoerfer /*
3aa2d74f9SThomas Bogendoerfer  * Derived from IRIX <sys/SN/kldir.h>, revision 1.21.
4aa2d74f9SThomas Bogendoerfer  *
5aa2d74f9SThomas Bogendoerfer  * Copyright (C) 1992 - 1997, 1999, 2000 Silicon Graphics, Inc.
6aa2d74f9SThomas Bogendoerfer  * Copyright (C) 1999, 2000 by Ralf Baechle
7aa2d74f9SThomas Bogendoerfer  */
8aa2d74f9SThomas Bogendoerfer #ifndef _ASM_SN_SN0_KLDIR_H
9aa2d74f9SThomas Bogendoerfer #define _ASM_SN_SN0_KLDIR_H
10aa2d74f9SThomas Bogendoerfer 
11aa2d74f9SThomas Bogendoerfer 
12aa2d74f9SThomas Bogendoerfer /*
13aa2d74f9SThomas Bogendoerfer  * The kldir memory area resides at a fixed place in each node's memory and
14aa2d74f9SThomas Bogendoerfer  * provides pointers to most other IP27 memory areas.  This allows us to
15aa2d74f9SThomas Bogendoerfer  * resize and/or relocate memory areas at a later time without breaking all
16aa2d74f9SThomas Bogendoerfer  * firmware and kernels that use them.	Indices in the array are
17aa2d74f9SThomas Bogendoerfer  * permanently dedicated to areas listed below.	 Some memory areas (marked
18aa2d74f9SThomas Bogendoerfer  * below) reside at a permanently fixed location, but are included in the
19aa2d74f9SThomas Bogendoerfer  * directory for completeness.
20aa2d74f9SThomas Bogendoerfer  */
21aa2d74f9SThomas Bogendoerfer 
22aa2d74f9SThomas Bogendoerfer /*
23aa2d74f9SThomas Bogendoerfer  * The upper portion of the memory map applies during boot
24aa2d74f9SThomas Bogendoerfer  * only and is overwritten by IRIX/SYMMON.
25aa2d74f9SThomas Bogendoerfer  *
26aa2d74f9SThomas Bogendoerfer  *				      MEMORY MAP PER NODE
27aa2d74f9SThomas Bogendoerfer  *
28aa2d74f9SThomas Bogendoerfer  * 0x2000000 (32M)	   +-----------------------------------------+
29aa2d74f9SThomas Bogendoerfer  *			   |	  IO6 BUFFERS FOR FLASH ENET IOC3    |
30aa2d74f9SThomas Bogendoerfer  * 0x1F80000 (31.5M)	   +-----------------------------------------+
31aa2d74f9SThomas Bogendoerfer  *			   |	  IO6 TEXT/DATA/BSS/stack	     |
32aa2d74f9SThomas Bogendoerfer  * 0x1C00000 (30M)	   +-----------------------------------------+
33aa2d74f9SThomas Bogendoerfer  *			   |	  IO6 PROM DEBUG TEXT/DATA/BSS/stack |
34aa2d74f9SThomas Bogendoerfer  * 0x0800000 (28M)	   +-----------------------------------------+
35aa2d74f9SThomas Bogendoerfer  *			   |	  IP27 PROM TEXT/DATA/BSS/stack	     |
36aa2d74f9SThomas Bogendoerfer  * 0x1B00000 (27M)	   +-----------------------------------------+
37aa2d74f9SThomas Bogendoerfer  *			   |	  IP27 CFG			     |
38aa2d74f9SThomas Bogendoerfer  * 0x1A00000 (26M)	   +-----------------------------------------+
39aa2d74f9SThomas Bogendoerfer  *			   |	  Graphics PROM			     |
40aa2d74f9SThomas Bogendoerfer  * 0x1800000 (24M)	   +-----------------------------------------+
41aa2d74f9SThomas Bogendoerfer  *			   |	  3rd Party PROM drivers	     |
42aa2d74f9SThomas Bogendoerfer  * 0x1600000 (22M)	   +-----------------------------------------+
43aa2d74f9SThomas Bogendoerfer  *			   |					     |
44aa2d74f9SThomas Bogendoerfer  *			   |	  Free				     |
45aa2d74f9SThomas Bogendoerfer  *			   |					     |
46aa2d74f9SThomas Bogendoerfer  *			   +-----------------------------------------+
47aa2d74f9SThomas Bogendoerfer  *			   |	  UNIX DEBUG Version		     |
48aa2d74f9SThomas Bogendoerfer  * 0x190000 (2M--)	   +-----------------------------------------+
49aa2d74f9SThomas Bogendoerfer  *			   |	  SYMMON			     |
50aa2d74f9SThomas Bogendoerfer  *			   |	  (For UNIX Debug only)		     |
51aa2d74f9SThomas Bogendoerfer  * 0x34000 (208K)	   +-----------------------------------------+
52aa2d74f9SThomas Bogendoerfer  *			   |	  SYMMON STACK [NUM_CPU_PER_NODE]    |
53aa2d74f9SThomas Bogendoerfer  *			   |	  (For UNIX Debug only)		     |
54aa2d74f9SThomas Bogendoerfer  * 0x25000 (148K)	   +-----------------------------------------+
55aa2d74f9SThomas Bogendoerfer  *			   |	  KLCONFIG - II (temp)		     |
56aa2d74f9SThomas Bogendoerfer  *			   |					     |
57aa2d74f9SThomas Bogendoerfer  *			   |	----------------------------	     |
58aa2d74f9SThomas Bogendoerfer  *			   |					     |
59aa2d74f9SThomas Bogendoerfer  *			   |	  UNIX NON-DEBUG Version	     |
60aa2d74f9SThomas Bogendoerfer  * 0x19000 (100K)	   +-----------------------------------------+
61aa2d74f9SThomas Bogendoerfer  *
62aa2d74f9SThomas Bogendoerfer  *
63aa2d74f9SThomas Bogendoerfer  * The lower portion of the memory map contains information that is
64aa2d74f9SThomas Bogendoerfer  * permanent and is used by the IP27PROM, IO6PROM and IRIX.
65aa2d74f9SThomas Bogendoerfer  *
66aa2d74f9SThomas Bogendoerfer  * 0x19000 (100K)	   +-----------------------------------------+
67aa2d74f9SThomas Bogendoerfer  *			   |					     |
68aa2d74f9SThomas Bogendoerfer  *			   |	  PI Error Spools (32K)		     |
69aa2d74f9SThomas Bogendoerfer  *			   |					     |
70aa2d74f9SThomas Bogendoerfer  * 0x12000 (72K)	   +-----------------------------------------+
71aa2d74f9SThomas Bogendoerfer  *			   |	  Unused			     |
72aa2d74f9SThomas Bogendoerfer  * 0x11c00 (71K)	   +-----------------------------------------+
73aa2d74f9SThomas Bogendoerfer  *			   |	  CPU 1 NMI Eframe area		     |
74aa2d74f9SThomas Bogendoerfer  * 0x11a00 (70.5K)	   +-----------------------------------------+
75aa2d74f9SThomas Bogendoerfer  *			   |	  CPU 0 NMI Eframe area		     |
76aa2d74f9SThomas Bogendoerfer  * 0x11800 (70K)	   +-----------------------------------------+
77aa2d74f9SThomas Bogendoerfer  *			   |	  CPU 1 NMI Register save area	     |
78aa2d74f9SThomas Bogendoerfer  * 0x11600 (69.5K)	   +-----------------------------------------+
79aa2d74f9SThomas Bogendoerfer  *			   |	  CPU 0 NMI Register save area	     |
80aa2d74f9SThomas Bogendoerfer  * 0x11400 (69K)	   +-----------------------------------------+
81aa2d74f9SThomas Bogendoerfer  *			   |	  GDA (1k)			     |
82aa2d74f9SThomas Bogendoerfer  * 0x11000 (68K)	   +-----------------------------------------+
83aa2d74f9SThomas Bogendoerfer  *			   |	  Early cache Exception stack	     |
84aa2d74f9SThomas Bogendoerfer  *			   |		 and/or			     |
85aa2d74f9SThomas Bogendoerfer  *			   |	  kernel/io6prom nmi registers	     |
86aa2d74f9SThomas Bogendoerfer  * 0x10800  (66k)	   +-----------------------------------------+
87aa2d74f9SThomas Bogendoerfer  *			   |	  cache error eframe		     |
88aa2d74f9SThomas Bogendoerfer  * 0x10400 (65K)	   +-----------------------------------------+
89aa2d74f9SThomas Bogendoerfer  *			   |	  Exception Handlers (UALIAS copy)   |
90aa2d74f9SThomas Bogendoerfer  * 0x10000 (64K)	   +-----------------------------------------+
91aa2d74f9SThomas Bogendoerfer  *			   |					     |
92aa2d74f9SThomas Bogendoerfer  *			   |					     |
93aa2d74f9SThomas Bogendoerfer  *			   |	  KLCONFIG - I (permanent) (48K)     |
94aa2d74f9SThomas Bogendoerfer  *			   |					     |
95aa2d74f9SThomas Bogendoerfer  *			   |					     |
96aa2d74f9SThomas Bogendoerfer  *			   |					     |
97aa2d74f9SThomas Bogendoerfer  * 0x4000 (16K)		   +-----------------------------------------+
98aa2d74f9SThomas Bogendoerfer  *			   |	  NMI Handler (Protected Page)	     |
99aa2d74f9SThomas Bogendoerfer  * 0x3000 (12K)		   +-----------------------------------------+
100aa2d74f9SThomas Bogendoerfer  *			   |	  ARCS PVECTORS (master node only)   |
101aa2d74f9SThomas Bogendoerfer  * 0x2c00 (11K)		   +-----------------------------------------+
102aa2d74f9SThomas Bogendoerfer  *			   |	  ARCS TVECTORS (master node only)   |
103aa2d74f9SThomas Bogendoerfer  * 0x2800 (10K)		   +-----------------------------------------+
104aa2d74f9SThomas Bogendoerfer  *			   |	  LAUNCH [NUM_CPU]		     |
105aa2d74f9SThomas Bogendoerfer  * 0x2400 (9K)		   +-----------------------------------------+
106aa2d74f9SThomas Bogendoerfer  *			   |	  Low memory directory (KLDIR)	     |
107aa2d74f9SThomas Bogendoerfer  * 0x2000 (8K)		   +-----------------------------------------+
108aa2d74f9SThomas Bogendoerfer  *			   |	  ARCS SPB (1K)			     |
109aa2d74f9SThomas Bogendoerfer  * 0x1000 (4K)		   +-----------------------------------------+
110aa2d74f9SThomas Bogendoerfer  *			   |	  Early cache Exception stack	     |
111aa2d74f9SThomas Bogendoerfer  *			   |		 and/or			     |
112aa2d74f9SThomas Bogendoerfer  *			   |	  kernel/io6prom nmi registers	     |
113aa2d74f9SThomas Bogendoerfer  * 0x800  (2k)		   +-----------------------------------------+
114aa2d74f9SThomas Bogendoerfer  *			   |	  cache error eframe		     |
115aa2d74f9SThomas Bogendoerfer  * 0x400 (1K)		   +-----------------------------------------+
116aa2d74f9SThomas Bogendoerfer  *			   |	  Exception Handlers		     |
117aa2d74f9SThomas Bogendoerfer  * 0x0	 (0K)		   +-----------------------------------------+
118aa2d74f9SThomas Bogendoerfer  */
119aa2d74f9SThomas Bogendoerfer 
120aa2d74f9SThomas Bogendoerfer /*
121aa2d74f9SThomas Bogendoerfer  * This is defined here because IP27_SYMMON_STK_SIZE must be at least what
122aa2d74f9SThomas Bogendoerfer  * we define here.  Since it's set up in the prom.  We can't redefine it later
123aa2d74f9SThomas Bogendoerfer  * and expect more space to be allocated.  The way to find out the true size
124aa2d74f9SThomas Bogendoerfer  * of the symmon stacks is to divide SYMMON_STK_SIZE by SYMMON_STK_STRIDE
125aa2d74f9SThomas Bogendoerfer  * for a particular node.
126aa2d74f9SThomas Bogendoerfer  */
127aa2d74f9SThomas Bogendoerfer #define SYMMON_STACK_SIZE		0x8000
128aa2d74f9SThomas Bogendoerfer 
129aa2d74f9SThomas Bogendoerfer #if defined(PROM)
130aa2d74f9SThomas Bogendoerfer 
131aa2d74f9SThomas Bogendoerfer /*
132aa2d74f9SThomas Bogendoerfer  * These defines are prom version dependent.  No code other than the IP27
133aa2d74f9SThomas Bogendoerfer  * prom should attempt to use these values.
134aa2d74f9SThomas Bogendoerfer  */
135aa2d74f9SThomas Bogendoerfer #define IP27_LAUNCH_OFFSET		0x2400
136aa2d74f9SThomas Bogendoerfer #define IP27_LAUNCH_SIZE		0x400
137aa2d74f9SThomas Bogendoerfer #define IP27_LAUNCH_COUNT		2
138aa2d74f9SThomas Bogendoerfer #define IP27_LAUNCH_STRIDE		0x200
139aa2d74f9SThomas Bogendoerfer 
140aa2d74f9SThomas Bogendoerfer #define IP27_KLCONFIG_OFFSET		0x4000
141aa2d74f9SThomas Bogendoerfer #define IP27_KLCONFIG_SIZE		0xc000
142aa2d74f9SThomas Bogendoerfer #define IP27_KLCONFIG_COUNT		1
143aa2d74f9SThomas Bogendoerfer #define IP27_KLCONFIG_STRIDE		0
144aa2d74f9SThomas Bogendoerfer 
145aa2d74f9SThomas Bogendoerfer #define IP27_NMI_OFFSET			0x3000
146aa2d74f9SThomas Bogendoerfer #define IP27_NMI_SIZE			0x40
147aa2d74f9SThomas Bogendoerfer #define IP27_NMI_COUNT			2
148aa2d74f9SThomas Bogendoerfer #define IP27_NMI_STRIDE			0x40
149aa2d74f9SThomas Bogendoerfer 
150aa2d74f9SThomas Bogendoerfer #define IP27_PI_ERROR_OFFSET		0x12000
151aa2d74f9SThomas Bogendoerfer #define IP27_PI_ERROR_SIZE		0x4000
152aa2d74f9SThomas Bogendoerfer #define IP27_PI_ERROR_COUNT		1
153aa2d74f9SThomas Bogendoerfer #define IP27_PI_ERROR_STRIDE		0
154aa2d74f9SThomas Bogendoerfer 
155aa2d74f9SThomas Bogendoerfer #define IP27_SYMMON_STK_OFFSET		0x25000
156aa2d74f9SThomas Bogendoerfer #define IP27_SYMMON_STK_SIZE		0xe000
157aa2d74f9SThomas Bogendoerfer #define IP27_SYMMON_STK_COUNT		2
158aa2d74f9SThomas Bogendoerfer /* IP27_SYMMON_STK_STRIDE must be >= SYMMON_STACK_SIZE */
159aa2d74f9SThomas Bogendoerfer #define IP27_SYMMON_STK_STRIDE		0x7000
160aa2d74f9SThomas Bogendoerfer 
161aa2d74f9SThomas Bogendoerfer #define IP27_FREEMEM_OFFSET		0x19000
162aa2d74f9SThomas Bogendoerfer #define IP27_FREEMEM_SIZE		-1
163aa2d74f9SThomas Bogendoerfer #define IP27_FREEMEM_COUNT		1
164aa2d74f9SThomas Bogendoerfer #define IP27_FREEMEM_STRIDE		0
165aa2d74f9SThomas Bogendoerfer 
166aa2d74f9SThomas Bogendoerfer #endif /* PROM */
167aa2d74f9SThomas Bogendoerfer /*
168aa2d74f9SThomas Bogendoerfer  * There will be only one of these in a partition so the IO6 must set it up.
169aa2d74f9SThomas Bogendoerfer  */
170aa2d74f9SThomas Bogendoerfer #define IO6_GDA_OFFSET			0x11000
171aa2d74f9SThomas Bogendoerfer #define IO6_GDA_SIZE			0x400
172aa2d74f9SThomas Bogendoerfer #define IO6_GDA_COUNT			1
173aa2d74f9SThomas Bogendoerfer #define IO6_GDA_STRIDE			0
174aa2d74f9SThomas Bogendoerfer 
175aa2d74f9SThomas Bogendoerfer /*
176aa2d74f9SThomas Bogendoerfer  * save area of kernel nmi regs in the prom format
177aa2d74f9SThomas Bogendoerfer  */
178aa2d74f9SThomas Bogendoerfer #define IP27_NMI_KREGS_OFFSET		0x11400
179aa2d74f9SThomas Bogendoerfer #define IP27_NMI_KREGS_CPU_SIZE		0x200
180aa2d74f9SThomas Bogendoerfer /*
181aa2d74f9SThomas Bogendoerfer  * save area of kernel nmi regs in eframe format
182aa2d74f9SThomas Bogendoerfer  */
183aa2d74f9SThomas Bogendoerfer #define IP27_NMI_EFRAME_OFFSET		0x11800
184aa2d74f9SThomas Bogendoerfer #define IP27_NMI_EFRAME_SIZE		0x200
185aa2d74f9SThomas Bogendoerfer 
186aa2d74f9SThomas Bogendoerfer #endif /* _ASM_SN_SN0_KLDIR_H */
187