psychoreg.h revision 1.1 1 1.1 mrg /* $NetBSD: psychoreg.h,v 1.1 1999/06/04 13:42:15 mrg Exp $ */
2 1.1 mrg
3 1.1 mrg /*
4 1.1 mrg * Copyright (c) 1992, 1993
5 1.1 mrg * The Regents of the University of California. All rights reserved.
6 1.1 mrg *
7 1.1 mrg * This software was developed by the Computer Systems Engineering group
8 1.1 mrg * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
9 1.1 mrg * contributed to Berkeley.
10 1.1 mrg *
11 1.1 mrg * All advertising materials mentioning features or use of this software
12 1.1 mrg * must display the following acknowledgement:
13 1.1 mrg * This product includes software developed by the University of
14 1.1 mrg * California, Lawrence Berkeley Laboratory.
15 1.1 mrg *
16 1.1 mrg * Redistribution and use in source and binary forms, with or without
17 1.1 mrg * modification, are permitted provided that the following conditions
18 1.1 mrg * are met:
19 1.1 mrg * 1. Redistributions of source code must retain the above copyright
20 1.1 mrg * notice, this list of conditions and the following disclaimer.
21 1.1 mrg * 2. Redistributions in binary form must reproduce the above copyright
22 1.1 mrg * notice, this list of conditions and the following disclaimer in the
23 1.1 mrg * documentation and/or other materials provided with the distribution.
24 1.1 mrg * 3. All advertising materials mentioning features or use of this software
25 1.1 mrg * must display the following acknowledgement:
26 1.1 mrg * This product includes software developed by the University of
27 1.1 mrg * California, Berkeley and its contributors.
28 1.1 mrg * 4. Neither the name of the University nor the names of its contributors
29 1.1 mrg * may be used to endorse or promote products derived from this software
30 1.1 mrg * without specific prior written permission.
31 1.1 mrg *
32 1.1 mrg * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
33 1.1 mrg * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34 1.1 mrg * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
35 1.1 mrg * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
36 1.1 mrg * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 1.1 mrg * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38 1.1 mrg * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39 1.1 mrg * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
40 1.1 mrg * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
41 1.1 mrg * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
42 1.1 mrg * SUCH DAMAGE.
43 1.1 mrg *
44 1.1 mrg * @(#)sbusreg.h 8.1 (Berkeley) 6/11/93
45 1.1 mrg */
46 1.1 mrg
47 1.1 mrg #ifndef _SPARC64_DEV_PSYCHOREG_H_
48 1.1 mrg #define _SPARC64_DEV_PSYCHOREG_H_
49 1.1 mrg
50 1.1 mrg /*
51 1.1 mrg * Sun4u PCI definitions. Here's where we deal w/the machine
52 1.1 mrg * dependencies of psycho and the PCI controller on the UltraIIi.
53 1.1 mrg *
54 1.1 mrg * All PCI registers are bit-swapped, however they are not byte-swapped.
55 1.1 mrg * This means that they must be accessed using little-endian access modes,
56 1.1 mrg * either map the pages little-endian or use little-endian ASIs.
57 1.1 mrg *
58 1.1 mrg * PSYCHO implements two PCI buses, A and B.
59 1.1 mrg */
60 1.1 mrg
61 1.1 mrg struct psychoreg {
62 1.1 mrg struct upareg {
63 1.1 mrg u_int64_t upa_portid; /* UPA port ID register */ /* 1fe.0000.0000 */
64 1.1 mrg u_int64_t upa_config; /* UPA config register */ /* 1fe.0000.0008 */
65 1.1 mrg } sys_upa;
66 1.1 mrg
67 1.1 mrg u_int64_t psy_csr; /* PSYCHO control/status register */ /* 1fe.0000.0010 */
68 1.1 mrg u_int64_t pad0;
69 1.1 mrg u_int64_t psy_ecccr; /* ECC control register */ /* 1fe.0000.0020 */
70 1.1 mrg u_int64_t reserved; /* 1fe.0000.0028 */
71 1.1 mrg u_int64_t psy_ue_afsr; /* Uncorrectable Error AFSR */ /* 1fe.0000.0030 */
72 1.1 mrg u_int64_t psy_ue_afar; /* Uncorrectable Error AFAR */ /* 1fe.0000.0038 */
73 1.1 mrg u_int64_t psy_ce_afsr; /* Correctable Error AFSR */ /* 1fe.0000.0040 */
74 1.1 mrg u_int64_t psy_ce_afar; /* Correctable Error AFAR */ /* 1fe.0000.0048 */
75 1.1 mrg
76 1.1 mrg u_int64_t pad1[22];
77 1.1 mrg
78 1.1 mrg struct perfmon {
79 1.1 mrg u_int64_t pm_cr; /* Performance monitor control reg */ /* 1fe.0000.0100 */
80 1.1 mrg u_int64_t pm_count; /* Performance monitor counter reg */ /* 1fe.0000.0108 */
81 1.1 mrg } psy_pm;
82 1.1 mrg
83 1.1 mrg u_int64_t pad2[30];
84 1.1 mrg
85 1.1 mrg struct iommureg psy_iommu; /* 1fe.0000.0200,0210 */
86 1.1 mrg
87 1.1 mrg u_int64_t pad3[317];
88 1.1 mrg
89 1.1 mrg u_int64_t pcia_slot0_int; /* PCI bus a slot 0 irq map reg */ /* 1fe.0000.0c00 */
90 1.1 mrg u_int64_t pcia_slot1_int; /* PCI bus a slot 1 irq map reg */ /* 1fe.0000.0c08 */
91 1.1 mrg u_int64_t pcia_slot2_int; /* PCI bus a slot 2 irq map reg (IIi)*/ /* 1fe.0000.0c10 */
92 1.1 mrg u_int64_t pcia_slot3_int; /* PCI bus a slot 3 irq map reg (IIi)*/ /* 1fe.0000.0c18 */
93 1.1 mrg u_int64_t pcib_slot0_int; /* PCI bus b slot 0 irq map reg */ /* 1fe.0000.0c20 */
94 1.1 mrg u_int64_t pcib_slot1_int; /* PCI bus b slot 1 irq map reg */ /* 1fe.0000.0c28 */
95 1.1 mrg u_int64_t pcib_slot2_int; /* PCI bus b slot 1 irq map reg */ /* 1fe.0000.0c30 */
96 1.1 mrg u_int64_t pcib_slot3_int; /* PCI bus b slot 1 irq map reg */ /* 1fe.0000.0c38 */
97 1.1 mrg
98 1.1 mrg u_int64_t pad5[120];
99 1.1 mrg
100 1.1 mrg u_int64_t scsi_int_map; /* SCSI interrupt map reg */ /* 1fe.0000.1000 */
101 1.1 mrg u_int64_t ether_int_map; /* ethernet interrupt map reg */ /* 1fe.0000.1008 */
102 1.1 mrg u_int64_t bpp_int_map; /* parallel interrupt map reg */ /* 1fe.0000.1010 */
103 1.1 mrg u_int64_t audior_int_map; /* audio record interrupt map reg */ /* 1fe.0000.1018 */
104 1.1 mrg u_int64_t audiop_int_map; /* audio playback interrupt map reg */ /* 1fe.0000.1020 */
105 1.1 mrg u_int64_t power_int_map; /* power fail interrupt map reg */ /* 1fe.0000.1028 */
106 1.1 mrg u_int64_t ser_kbd_ms_int_map; /* serial/kbd/mouse interrupt map reg *//* 1fe.0000.1030 */
107 1.1 mrg u_int64_t fd_int_map; /* floppy interrupt map reg */ /* 1fe.0000.1038 */
108 1.1 mrg u_int64_t spare_int_map; /* spare interrupt map reg */ /* 1fe.0000.1040 */
109 1.1 mrg u_int64_t kbd_int_map; /* kbd [unused] interrupt map reg */ /* 1fe.0000.1048 */
110 1.1 mrg u_int64_t mouse_int_map; /* mouse [unused] interrupt map reg */ /* 1fe.0000.1050 */
111 1.1 mrg u_int64_t serial_int_map; /* second serial interrupt map reg */ /* 1fe.0000.1058 */
112 1.1 mrg u_int64_t timer0_int_map; /* timer 0 interrupt map reg */ /* 1fe.0000.1060 */
113 1.1 mrg u_int64_t timer1_int_map; /* timer 1 interrupt map reg */ /* 1fe.0000.1068 */
114 1.1 mrg u_int64_t ue_int_map; /* UE interrupt map reg */ /* 1fe.0000.1070 */
115 1.1 mrg u_int64_t ce_int_map; /* CE interrupt map reg */ /* 1fe.0000.1078 */
116 1.1 mrg u_int64_t pciaerr_int_map; /* PCI bus a error interrupt map reg */ /* 1fe.0000.1080 */
117 1.1 mrg u_int64_t pciberr_int_map; /* PCI bus b error interrupt map reg */ /* 1fe.0000.1088 */
118 1.1 mrg u_int64_t pwrmgt_int_map; /* power mgmt wake interrupt map reg */ /* 1fe.0000.1090 */
119 1.1 mrg u_int64_t ffb0_int_map; /* FFB0 graphics interrupt map reg */ /* 1fe.0000.1098 */
120 1.1 mrg u_int64_t ffb1_int_map; /* FFB1 graphics interrupt map reg */ /* 1fe.0000.10a0 */
121 1.1 mrg
122 1.1 mrg u_int64_t pad6[107];
123 1.1 mrg
124 1.1 mrg /* Note: clear interrupt 0 registers are not really used */
125 1.1 mrg u_int64_t pcia0_clr_int[4]; /* PCI a slot 0 clear int regs 0..7 */ /* 1fe.0000.1400-1418 */
126 1.1 mrg u_int64_t pcia1_clr_int[4]; /* PCI a slot 1 clear int regs 0..7 */ /* 1fe.0000.1420-1438 */
127 1.1 mrg u_int64_t pcia2_clr_int[4]; /* PCI a slot 2 clear int regs 0..7 */ /* 1fe.0000.1440-1458 */
128 1.1 mrg u_int64_t pcia3_clr_int[4]; /* PCI a slot 3 clear int regs 0..7 */ /* 1fe.0000.1480-1478 */
129 1.1 mrg u_int64_t pcib0_clr_int[4]; /* PCI b slot 0 clear int regs 0..7 */ /* 1fe.0000.1480-1498 */
130 1.1 mrg u_int64_t pcib1_clr_int[4]; /* PCI b slot 1 clear int regs 0..7 */ /* 1fe.0000.14a0-14b8 */
131 1.1 mrg u_int64_t pcib2_clr_int[4]; /* PCI b slot 2 clear int regs 0..7 */ /* 1fe.0000.14c0-14d8 */
132 1.1 mrg u_int64_t pcib3_clr_int[4]; /* PCI b slot 3 clear int regs 0..7 */ /* 1fe.0000.14d0-14f8 */
133 1.1 mrg
134 1.1 mrg u_int64_t pad8[96];
135 1.1 mrg
136 1.1 mrg u_int64_t scsi_clr_int; /* SCSI clear int reg */ /* 1fe.0000.1800 */
137 1.1 mrg u_int64_t ether_clr_int; /* ethernet clear int reg */ /* 1fe.0000.1808 */
138 1.1 mrg u_int64_t bpp_clr_int; /* parallel clear int reg */ /* 1fe.0000.1810 */
139 1.1 mrg u_int64_t audior_clr_int; /* audio record clear int reg */ /* 1fe.0000.1818 */
140 1.1 mrg u_int64_t audiop_clr_int; /* audio playback clear int reg */ /* 1fe.0000.1820 */
141 1.1 mrg u_int64_t power_clr_int; /* power fail clear int reg */ /* 1fe.0000.1828 */
142 1.1 mrg u_int64_t ser_kb_ms_clr_int; /* serial/kbd/mouse clear int reg */ /* 1fe.0000.1830 */
143 1.1 mrg u_int64_t fd_clr_int; /* floppy clear int reg */ /* 1fe.0000.1838 */
144 1.1 mrg u_int64_t spare_clr_int; /* spare clear int reg */ /* 1fe.0000.1840 */
145 1.1 mrg u_int64_t kbd_clr_int; /* kbd [unused] clear int reg */ /* 1fe.0000.1848 */
146 1.1 mrg u_int64_t mouse_clr_int; /* mouse [unused] clear int reg */ /* 1fe.0000.1850 */
147 1.1 mrg u_int64_t serial_clr_int; /* second serial clear int reg */ /* 1fe.0000.1858 */
148 1.1 mrg u_int64_t timer0_clr_int; /* timer 0 clear int reg */ /* 1fe.0000.1860 */
149 1.1 mrg u_int64_t timer1_clr_int; /* timer 1 clear int reg */ /* 1fe.0000.1868 */
150 1.1 mrg u_int64_t ue_clr_int; /* UE clear int reg */ /* 1fe.0000.1870 */
151 1.1 mrg u_int64_t ce_clr_int; /* CE clear int reg */ /* 1fe.0000.1878 */
152 1.1 mrg u_int64_t pciaerr_clr_int; /* PCI bus a error clear int reg */ /* 1fe.0000.1880 */
153 1.1 mrg u_int64_t pciberr_clr_int; /* PCI bus b error clear int reg */ /* 1fe.0000.1888 */
154 1.1 mrg u_int64_t pwrmgt_clr_int; /* power mgmt wake clr interrupt reg */ /* 1fe.0000.1890 */
155 1.1 mrg
156 1.1 mrg u_int64_t pad9[45];
157 1.1 mrg
158 1.1 mrg u_int64_t intr_retry_timer; /* interrupt retry timer */ /* 1fe.0000.1a00 */
159 1.1 mrg
160 1.1 mrg u_int64_t pad10[63];
161 1.1 mrg
162 1.1 mrg struct timer_counter {
163 1.1 mrg u_int64_t tc_count; /* timer/counter 0/1 count register */ /* 1fe.0000.1c00,1c10 */
164 1.1 mrg u_int64_t tc_limit; /* timer/counter 0/1 limit register */ /* 1fe.0000.1c08,1c18 */
165 1.1 mrg } tc[2];
166 1.1 mrg
167 1.1 mrg u_int64_t pci_dma_write_sync; /* PCI DMA write sync register (IIi) */ /* 1fe.0000.1c20 */
168 1.1 mrg
169 1.1 mrg u_int64_t pad11[123];
170 1.1 mrg
171 1.1 mrg struct pci_ctl {
172 1.1 mrg u_int64_t pci_csr; /* PCI a/b control/status register */ /* 1fe.0000.2000,4000 */
173 1.1 mrg u_int64_t pci_afsr; /* PCI a/b AFSR register */ /* 1fe.0000.2010,4010 */
174 1.1 mrg u_int64_t pci_afar; /* PCI a/b AFAR register */ /* 1fe.0000.2018,4018 */
175 1.1 mrg u_int64_t pci_diag; /* PCI a/b diagnostic register */ /* 1fe.0000.2020,4020 */
176 1.1 mrg u_int64_t pci_tasr; /* PCI target address space reg (IIi)*/ /* 1fe.0000.2020,4028 */
177 1.1 mrg
178 1.1 mrg u_int64_t pad12[250];
179 1.1 mrg
180 1.1 mrg /* This is really the IOMMU's, not the PCI bus's */
181 1.1 mrg struct iommu_strbuf pci_strbuf; /* 1fe.0000.2800-210 */
182 1.1 mrg #define psy_iommu_strbuf psy_pcictl[0].pci_strbuf
183 1.1 mrg
184 1.1 mrg u_int64_t pad13[765];
185 1.1 mrg } psy_pcictl[2]; /* For PCI a and b */
186 1.1 mrg
187 1.1 mrg /* NB: FFB0 and FFB1 intr map regs also appear at 1fe.0000.6000 and 1fe.0000.8000 respectively */
188 1.1 mrg u_int64_t pad14[2048];
189 1.1 mrg
190 1.1 mrg u_int64_t dma_scb_diag0; /* DMA scoreboard diag reg 0 */ /* 1fe.0000.a000 */
191 1.1 mrg u_int64_t dma_scb_diag1; /* DMA scoreboard diag reg 1 */ /* 1fe.0000.a008 */
192 1.1 mrg
193 1.1 mrg u_int64_t pad15[126];
194 1.1 mrg
195 1.1 mrg u_int64_t iommu_svadiag; /* IOMMU virtual addr diag reg */ /* 1fe.0000.a400 */
196 1.1 mrg u_int64_t iommu_tlb_comp_diag; /* IOMMU TLB tag compare diag reg */ /* 1fe.0000.a408 */
197 1.1 mrg
198 1.1 mrg u_int64_t pad16[30];
199 1.1 mrg
200 1.1 mrg u_int64_t iommu_queue_diag[16]; /* IOMMU LRU queue diag */ /* 1fe.0000.a500-a578 */
201 1.1 mrg u_int64_t tlb_tag_diag[16]; /* TLB tag diag */ /* 1fe.0000.a580-a5f8 */
202 1.1 mrg u_int64_t tlb_data_diag[16]; /* TLB data RAM diag */ /* 1fe.0000.a600-a678 */
203 1.1 mrg
204 1.1 mrg u_int64_t pad17[48];
205 1.1 mrg
206 1.1 mrg u_int64_t pci_int_diag; /* SBUS int state diag reg */ /* 1fe.0000.a800 */
207 1.1 mrg u_int64_t obio_int_diag; /* OBIO and misc int state diag reg */ /* 1fe.0000.a808 */
208 1.1 mrg
209 1.1 mrg u_int64_t pad18[254];
210 1.1 mrg
211 1.1 mrg struct strbuf_diag {
212 1.1 mrg u_int64_t strbuf_data_diag[128]; /* streaming buffer data RAM diag */ /* 1fe.0000.b000-b3f8 */
213 1.1 mrg u_int64_t strbuf_error_diag[128]; /* streaming buffer error status diag *//* 1fe.0000.b400-b7f8 */
214 1.1 mrg u_int64_t strbuf_pg_tag_diag[16]; /* streaming buffer page tag diag */ /* 1fe.0000.b800-b878 */
215 1.1 mrg u_int64_t pad19[16];
216 1.1 mrg u_int64_t strbuf_ln_tag_diag[16]; /* streaming buffer line tag diag */ /* 1fe.0000.b900-b978 */
217 1.1 mrg u_int64_t pad20[208];
218 1.1 mrg } psy_strbufdiag[2]; /* For PCI a and b */
219 1.1 mrg
220 1.1 mrg /*
221 1.1 mrg * Here is the rest of the map, which we're not specifying:
222 1.1 mrg *
223 1.1 mrg * 1fe.0100.0000 - 1fe.01ff.ffff PCI configuration space
224 1.1 mrg * 1fe.0100.0000 - 1fe.0100.00ff PCI B configuration header
225 1.1 mrg * 1fe.0101.0000 - 1fe.0101.00ff PCI A configuration header
226 1.1 mrg * 1fe.0200.0000 - 1fe.0200.ffff PCI A I/O space
227 1.1 mrg * 1fe.0201.0000 - 1fe.0201.ffff PCI B I/O space
228 1.1 mrg * 1ff.0000.0000 - 1ff.7fff.ffff PCI A memory space
229 1.1 mrg * 1ff.8000.0000 - 1ff.ffff.ffff PCI B memory space
230 1.1 mrg *
231 1.1 mrg * NB: config and I/O space can use 1-4 byte accesses, not 8 byte accesses.
232 1.1 mrg * Memory space can use any sized accesses.
233 1.1 mrg *
234 1.1 mrg * Note that the SUNW,sabre (APB) has slightly differrent addresses
235 1.1 mrg * than the above. This is mostly due to the fact that the APB is
236 1.1 mrg * a multi-function PCI device with two PCI bridges, and the U2P is
237 1.1 mrg * two separate PCI devices (also PCI bridges). It uses the same
238 1.1 mrg * PCI configuration space, though the configuration header for each
239 1.1 mrg * PCI bus is located differently due to the SUNW,simba PCI busses
240 1.1 mrg * being function 0 and function 1 of the APB, whereas the psycho's
241 1.1 mrg * are each their own PCI device. The I/O and memory spaces are each
242 1.1 mrg * split into 8 equally sized areas (8x2MB blocks for I/O space, and
243 1.1 mrg * 8x512MB blocks for memory space). These are allocated in to either
244 1.1 mrg * PCI A or PCI B, or neither in the APB's `I/O Address Map Register
245 1.1 mrg * A/B' (0xde) and `Memory Address Map Register A/B' (0xdf) registers
246 1.1 mrg * of each simba. We must ensure that both of the following are
247 1.1 mrg * correct (the prom should do this for us):
248 1.1 mrg *
249 1.1 mrg * (PCI A Memory Address Map) & (PCI B Memory Address Map) == 0
250 1.1 mrg *
251 1.1 mrg * (PCI A I/O Address Map) & (PCI B I/O Address Map) == 0
252 1.1 mrg *
253 1.1 mrg * 1fe.0100.0000 - 1fe.01ff.ffff PCI configuration space
254 1.1 mrg * 1fe.0100.0800 - 1fe.0100.08ff PCI B configuration header
255 1.1 mrg * 1fe.0100.0900 - 1fe.0100.09ff PCI A configuration header
256 1.1 mrg * 1fe.0200.0000 - 1fe.02ff.ffff PCI I/O space (divided)
257 1.1 mrg * 1ff.0000.0000 - 1ff.ffff.ffff PCI memory space (divided)
258 1.1 mrg */
259 1.1 mrg };
260 1.1 mrg
261 1.1 mrg /* what the bits mean! */
262 1.1 mrg
263 1.1 mrg /* PCI [a|b] control/status register */
264 1.1 mrg /* note that the sabre only has one set of PCI control/status registers */
265 1.1 mrg #define PCICTL_SERR 0x0000000400000000 /* SERR asserted; W1C */
266 1.1 mrg #define PCICTL_ARB_PARK 0x0000000000200000 /* PCI arbitration parking */
267 1.1 mrg #define PCICTL_ERRINTEN 0x0000000000000100 /* PCI error interrupt enable */
268 1.1 mrg #define PCICTL_4ENABLE 0x000000000000000f /* enable 4 PCI slots */
269 1.1 mrg #define PCICTL_6ENABLE 0x000000000000003f /* enable 6 PCI slots */
270 1.1 mrg
271 1.1 mrg /*
272 1.1 mrg * these are the PROM structures we grovel
273 1.1 mrg */
274 1.1 mrg
275 1.1 mrg /*
276 1.1 mrg * For the physical adddresses split into 3 32 bit values, we deocde them
277 1.1 mrg * like the following (PCI Bus binding 2.0, 2.2.1.1 Numerical Representation)
278 1.1 mrg *
279 1.1 mrg * phys.hi cell: npt000ss bbbbbbbb dddddfff rrrrrrrr
280 1.1 mrg * phys.mid cell: hhhhhhhh hhhhhhhh hhhhhhhh hhhhhhhh
281 1.1 mrg * phys.lo cell: llllllll llllllll llllllll llllllll
282 1.1 mrg *
283 1.1 mrg * where these bits affect the address' properties:
284 1.1 mrg * n not-relocatable
285 1.1 mrg * p prefetchable
286 1.1 mrg * t aliased (non-relocatable IO), below 1MB (memory) or
287 1.1 mrg * below 64KB (reloc. IO)
288 1.1 mrg * ss address space code:
289 1.1 mrg * 00 - configuration space
290 1.1 mrg * 01 - I/O space
291 1.1 mrg * 10 - 32 bit memory space
292 1.1 mrg * 11 - 64 bit memory space
293 1.1 mrg * bb..bb 8 bit bus number
294 1.1 mrg * ddddd 5 bit device number
295 1.1 mrg * fff 3 bit function number
296 1.1 mrg * rr..rr 8 bit register number
297 1.1 mrg * hh..hh 32 bit unsigned value
298 1.1 mrg * ll..ll 32 bit unsigned value
299 1.1 mrg * the values of hh..hh and ll..ll are combined to form a larger number.
300 1.1 mrg *
301 1.1 mrg * For config space, we don't have to do much special. For I/O space,
302 1.1 mrg * hh..hh must be zero, and if n == 0 ll..ll is the offset from the
303 1.1 mrg * start of I/O space, otherwise ll..ll is the I/O space. For memory
304 1.1 mrg * space, hh..hh must be zero for the 32 bit space, and is the high 32
305 1.1 mrg * bits in 64 bit space, with ll..ll being the low 32 bits in both cases,
306 1.1 mrg * with offset handling being driver via `n == 0' as for I/O space.
307 1.1 mrg */
308 1.1 mrg
309 1.1 mrg struct psycho_registers {
310 1.1 mrg u_int32_t phys_hi;
311 1.1 mrg u_int32_t phys_mid;
312 1.1 mrg u_int32_t phys_lo;
313 1.1 mrg u_int32_t size_hi;
314 1.1 mrg u_int32_t size_lo;
315 1.1 mrg };
316 1.1 mrg
317 1.1 mrg struct psycho_ranges {
318 1.1 mrg u_int32_t cspace;
319 1.1 mrg u_int32_t child_hi;
320 1.1 mrg u_int32_t child_lo;
321 1.1 mrg u_int32_t phys_hi;
322 1.1 mrg u_int32_t phys_lo;
323 1.1 mrg u_int32_t size_hi;
324 1.1 mrg u_int32_t size_lo;
325 1.1 mrg };
326 1.1 mrg
327 1.1 mrg struct psycho_interrupt_map {
328 1.1 mrg u_int32_t phys_hi;
329 1.1 mrg u_int32_t phys_mid;
330 1.1 mrg u_int32_t phys_lo;
331 1.1 mrg u_int32_t intr;
332 1.1 mrg int32_t child_node;
333 1.1 mrg u_int32_t child_intr;
334 1.1 mrg };
335 1.1 mrg
336 1.1 mrg struct psycho_interrupt_map_mask {
337 1.1 mrg u_int32_t phys_hi;
338 1.1 mrg u_int32_t phys_mid;
339 1.1 mrg u_int32_t phys_lo;
340 1.1 mrg u_int32_t intr;
341 1.1 mrg };
342 1.1 mrg
343 1.1 mrg #endif /* _SPARC64_DEV_PSYCHOREG_H_ */
344