xref: /titanic_41/usr/src/uts/intel/sys/ddi_isa.h (revision bdfc6d18da790deeec2e0eb09c625902defe2498)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_SYS_DDI_ISA_H
28 #define	_SYS_DDI_ISA_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #include <sys/isa_defs.h>
33 #include <sys/dditypes.h>
34 #include <sys/ndifm.h>
35 
36 #ifdef	__cplusplus
37 extern "C" {
38 #endif
39 
40 #ifdef	_KERNEL
41 
42 /*
43  * These are the data access functions which the platform
44  * can choose to define as functions or macro's.
45  */
46 
47 /*
48  * DDI interfaces defined as macro's
49  */
50 
51 /*
52  * DDI interfaces defined as functions
53  */
54 
55 #ifdef	__STDC__
56 
57 #ifdef _LP64
58 
59 uint8_t
60 ddi_mem_get8(ddi_acc_handle_t handle, uint8_t *host_addr);
61 
62 uint16_t
63 ddi_mem_get16(ddi_acc_handle_t handle, uint16_t *host_addr);
64 
65 uint32_t
66 ddi_mem_get32(ddi_acc_handle_t handle, uint32_t *host_addr);
67 
68 uint64_t
69 ddi_mem_get64(ddi_acc_handle_t handle, uint64_t *host_addr);
70 
71 void
72 ddi_mem_rep_get8(ddi_acc_handle_t handle, uint8_t *host_addr,
73 	uint8_t *dev_addr, size_t repcount, uint_t flags);
74 
75 void
76 ddi_mem_rep_get16(ddi_acc_handle_t handle, uint16_t *host_addr,
77 	uint16_t *dev_addr, size_t repcount, uint_t flags);
78 
79 void
80 ddi_mem_rep_get32(ddi_acc_handle_t handle, uint32_t *host_addr,
81 	uint32_t *dev_addr, size_t repcount, uint_t flags);
82 
83 void
84 ddi_mem_rep_get64(ddi_acc_handle_t handle, uint64_t *host_addr,
85 	uint64_t *dev_addr, size_t repcount, uint_t flags);
86 
87 void
88 ddi_mem_put8(ddi_acc_handle_t handle, uint8_t *dev_addr, uint8_t value);
89 
90 void
91 ddi_mem_put16(ddi_acc_handle_t handle, uint16_t *dev_addr, uint16_t value);
92 
93 void
94 ddi_mem_put32(ddi_acc_handle_t handle, uint32_t *dev_addr, uint32_t value);
95 
96 void
97 ddi_mem_put64(ddi_acc_handle_t handle, uint64_t *dev_addr, uint64_t value);
98 
99 void
100 ddi_mem_rep_put8(ddi_acc_handle_t handle, uint8_t *host_addr,
101 	uint8_t *dev_addr, size_t repcount, uint_t flags);
102 
103 void
104 ddi_mem_rep_put16(ddi_acc_handle_t handle, uint16_t *host_addr,
105 	uint16_t *dev_addr, size_t repcount, uint_t flags);
106 
107 void
108 ddi_mem_rep_put32(ddi_acc_handle_t handle, uint32_t *host_addr,
109 	uint32_t *dev_addr, size_t repcount, uint_t flags);
110 
111 void
112 ddi_mem_rep_put64(ddi_acc_handle_t handle, uint64_t *host_addr,
113 	uint64_t *dev_addr, size_t repcount, uint_t flags);
114 
115 uint8_t
116 ddi_io_get8(ddi_acc_handle_t handle, uint8_t *dev_addr);
117 
118 uint16_t
119 ddi_io_get16(ddi_acc_handle_t handle, uint16_t *dev_addr);
120 
121 uint32_t
122 ddi_io_get32(ddi_acc_handle_t handle, uint32_t *dev_addr);
123 
124 void
125 ddi_io_rep_get8(ddi_acc_handle_t handle,
126 	uint8_t *host_addr, uint8_t *dev_addr, size_t repcount);
127 
128 void
129 ddi_io_rep_get16(ddi_acc_handle_t handle,
130 	uint16_t *host_addr, uint16_t *dev_addr, size_t repcount);
131 
132 void
133 ddi_io_rep_get32(ddi_acc_handle_t handle,
134 	uint32_t *host_addr, uint32_t *dev_addr, size_t repcount);
135 
136 void
137 ddi_io_put8(ddi_acc_handle_t handle, uint8_t *dev_addr, uint8_t value);
138 
139 void
140 ddi_io_put16(ddi_acc_handle_t handle, uint16_t *dev_addr, uint16_t value);
141 
142 void
143 ddi_io_put32(ddi_acc_handle_t handle, uint32_t *dev_addr, uint32_t value);
144 
145 void
146 ddi_io_rep_put8(ddi_acc_handle_t handle,
147 	uint8_t *host_addr, uint8_t *dev_addr, size_t repcount);
148 
149 void
150 ddi_io_rep_put16(ddi_acc_handle_t handle,
151 	uint16_t *host_addr, uint16_t *dev_addr, size_t repcount);
152 
153 void
154 ddi_io_rep_put32(ddi_acc_handle_t handle,
155 	uint32_t *host_addr, uint32_t *dev_addr, size_t repcount);
156 
157 #else /* _ILP32 */
158 
159 uint8_t
160 ddi_mem_getb(ddi_acc_handle_t handle, uint8_t *host_addr);
161 #define	ddi_mem_get8	ddi_mem_getb
162 
163 uint16_t
164 ddi_mem_getw(ddi_acc_handle_t handle, uint16_t *host_addr);
165 #define	ddi_mem_get16	ddi_mem_getw
166 
167 uint32_t
168 ddi_mem_getl(ddi_acc_handle_t handle, uint32_t *host_addr);
169 #define	ddi_mem_get32	ddi_mem_getl
170 
171 uint64_t
172 ddi_mem_getll(ddi_acc_handle_t handle, uint64_t *host_addr);
173 #define	ddi_mem_get64	ddi_mem_getll
174 
175 void
176 ddi_mem_rep_getb(ddi_acc_handle_t handle, uint8_t *host_addr,
177 	uint8_t *dev_addr, size_t repcount, uint_t flags);
178 #define	ddi_mem_rep_get8	ddi_mem_rep_getb
179 
180 void
181 ddi_mem_rep_getw(ddi_acc_handle_t handle, uint16_t *host_addr,
182 	uint16_t *dev_addr, size_t repcount, uint_t flags);
183 #define	ddi_mem_rep_get16	ddi_mem_rep_getw
184 
185 void
186 ddi_mem_rep_getl(ddi_acc_handle_t handle, uint32_t *host_addr,
187 	uint32_t *dev_addr, size_t repcount, uint_t flags);
188 #define	ddi_mem_rep_get32	ddi_mem_rep_getl
189 
190 void
191 ddi_mem_rep_getll(ddi_acc_handle_t handle, uint64_t *host_addr,
192 	uint64_t *dev_addr, size_t repcount, uint_t flags);
193 #define	ddi_mem_rep_get64	ddi_mem_rep_getll
194 
195 void
196 ddi_mem_putb(ddi_acc_handle_t handle, uint8_t *dev_addr, uint8_t value);
197 #define	ddi_mem_put8	ddi_mem_putb
198 
199 void
200 ddi_mem_putw(ddi_acc_handle_t handle, uint16_t *dev_addr, uint16_t value);
201 #define	ddi_mem_put16	ddi_mem_putw
202 
203 void
204 ddi_mem_putl(ddi_acc_handle_t handle, uint32_t *dev_addr, uint32_t value);
205 #define	ddi_mem_put32	ddi_mem_putl
206 
207 void
208 ddi_mem_putll(ddi_acc_handle_t handle, uint64_t *dev_addr, uint64_t value);
209 #define	ddi_mem_put64	ddi_mem_putll
210 
211 void
212 ddi_mem_rep_putb(ddi_acc_handle_t handle, uint8_t *host_addr,
213 	uint8_t *dev_addr, size_t repcount, uint_t flags);
214 #define	ddi_mem_rep_put8	ddi_mem_rep_putb
215 
216 void
217 ddi_mem_rep_putw(ddi_acc_handle_t handle, uint16_t *host_addr,
218 	uint16_t *dev_addr, size_t repcount, uint_t flags);
219 #define	ddi_mem_rep_put16	ddi_mem_rep_putw
220 
221 void
222 ddi_mem_rep_putl(ddi_acc_handle_t handle, uint32_t *host_addr,
223 	uint32_t *dev_addr, size_t repcount, uint_t flags);
224 #define	ddi_mem_rep_put32	ddi_mem_rep_putl
225 
226 void
227 ddi_mem_rep_putll(ddi_acc_handle_t handle, uint64_t *host_addr,
228 	uint64_t *dev_addr, size_t repcount, uint_t flags);
229 #define	ddi_mem_rep_put64	ddi_mem_rep_putll
230 
231 uint8_t
232 ddi_io_getb(ddi_acc_handle_t handle, uint8_t *dev_addr);
233 #define	ddi_io_get8	ddi_io_getb
234 
235 uint16_t
236 ddi_io_getw(ddi_acc_handle_t handle, uint16_t *dev_addr);
237 #define	ddi_io_get16	ddi_io_getw
238 
239 uint32_t
240 ddi_io_getl(ddi_acc_handle_t handle, uint32_t *dev_addr);
241 #define	ddi_io_get32	ddi_io_getl
242 
243 void
244 ddi_io_rep_getb(ddi_acc_handle_t handle,
245 	uint8_t *host_addr, uint8_t *dev_addr, size_t repcount);
246 #define	ddi_io_rep_get8	ddi_io_rep_getb
247 
248 void
249 ddi_io_rep_getw(ddi_acc_handle_t handle,
250 	uint16_t *host_addr, uint16_t *dev_addr, size_t repcount);
251 #define	ddi_io_rep_get16	ddi_io_rep_getw
252 
253 void
254 ddi_io_rep_getl(ddi_acc_handle_t handle,
255 	uint32_t *host_addr, uint32_t *dev_addr, size_t repcount);
256 #define	ddi_io_rep_get32	ddi_io_rep_getl
257 
258 void
259 ddi_io_putb(ddi_acc_handle_t handle, uint8_t *dev_addr, uint8_t value);
260 #define	ddi_io_put8	ddi_io_putb
261 
262 void
263 ddi_io_putw(ddi_acc_handle_t handle, uint16_t *dev_addr, uint16_t value);
264 #define	ddi_io_put16	ddi_io_putw
265 
266 void
267 ddi_io_putl(ddi_acc_handle_t handle, uint32_t *dev_addr, uint32_t value);
268 #define	ddi_io_put32	ddi_io_putl
269 
270 void
271 ddi_io_rep_putb(ddi_acc_handle_t handle,
272 	uint8_t *host_addr, uint8_t *dev_addr, size_t repcount);
273 #define	ddi_io_rep_put8	ddi_io_rep_putb
274 
275 void
276 ddi_io_rep_putw(ddi_acc_handle_t handle,
277 	uint16_t *host_addr, uint16_t *dev_addr, size_t repcount);
278 #define	ddi_io_rep_put16	ddi_io_rep_putw
279 
280 void
281 ddi_io_rep_putl(ddi_acc_handle_t handle,
282 	uint32_t *host_addr, uint32_t *dev_addr, size_t repcount);
283 #define	ddi_io_rep_put32	ddi_io_rep_putl
284 
285 #endif /* _LP64 */
286 
287 /*
288  * ahi_acc_attr flags
289  */
290 #define	DDI_ACCATTR_CONFIG_SPACE	0x1
291 #define	DDI_ACCATTR_IO_SPACE		0x2
292 #define	DDI_ACCATTR_CPU_VADDR		0x4
293 #define	DDI_ACCATTR_DIRECT		0x8
294 
295 typedef struct ddi_acc_impl {
296 	ddi_acc_hdl_t	ahi_common;
297 	uint_t		ahi_acc_attr;
298 	ulong_t		ahi_io_port_base;
299 
300 	uint8_t
301 		(*ahi_get8)(struct ddi_acc_impl *handle, uint8_t *addr);
302 	uint16_t
303 		(*ahi_get16)(struct ddi_acc_impl *handle, uint16_t *addr);
304 	uint32_t
305 		(*ahi_get32)(struct ddi_acc_impl *handle, uint32_t *addr);
306 	uint64_t
307 		(*ahi_get64)(struct ddi_acc_impl *handle, uint64_t *addr);
308 
309 	void	(*ahi_put8)(struct ddi_acc_impl *handle, uint8_t *addr,
310 			uint8_t value);
311 	void	(*ahi_put16)(struct ddi_acc_impl *handle, uint16_t *addr,
312 			uint16_t value);
313 	void	(*ahi_put32)(struct ddi_acc_impl *handle, uint32_t *addr,
314 			uint32_t value);
315 	void	(*ahi_put64)(struct ddi_acc_impl *handle, uint64_t *addr,
316 			uint64_t value);
317 
318 	void	(*ahi_rep_get8)(struct ddi_acc_impl *handle,
319 			uint8_t *host_addr, uint8_t *dev_addr,
320 			size_t repcount, uint_t flags);
321 	void	(*ahi_rep_get16)(struct ddi_acc_impl *handle,
322 			uint16_t *host_addr, uint16_t *dev_addr,
323 			size_t repcount, uint_t flags);
324 	void	(*ahi_rep_get32)(struct ddi_acc_impl *handle,
325 			uint32_t *host_addr, uint32_t *dev_addr,
326 			size_t repcount, uint_t flags);
327 	void	(*ahi_rep_get64)(struct ddi_acc_impl *handle,
328 			uint64_t *host_addr, uint64_t *dev_addr,
329 			size_t repcount, uint_t flags);
330 
331 	void	(*ahi_rep_put8)(struct ddi_acc_impl *handle,
332 			uint8_t *host_addr, uint8_t *dev_addr,
333 			size_t repcount, uint_t flags);
334 	void	(*ahi_rep_put16)(struct ddi_acc_impl *handle,
335 			uint16_t *host_addr, uint16_t *dev_addr,
336 			size_t repcount, uint_t flags);
337 	void	(*ahi_rep_put32)(struct ddi_acc_impl *handle,
338 			uint32_t *host_addr, uint32_t *dev_addr,
339 			size_t repcount, uint_t flags);
340 	void	(*ahi_rep_put64)(struct ddi_acc_impl *handle,
341 			uint64_t *host_addr, uint64_t *dev_addr,
342 			size_t repcount, uint_t flags);
343 
344 	int	(*ahi_fault_check)(struct ddi_acc_impl *handle);
345 	void	(*ahi_fault_notify)(struct ddi_acc_impl *handle);
346 	uint32_t	ahi_fault;
347 	ndi_err_t *ahi_err;
348 } ddi_acc_impl_t;
349 
350 
351 /*
352  * Input functions to memory mapped IO
353  */
354 uint8_t
355 i_ddi_vaddr_get8(ddi_acc_impl_t *hdlp, uint8_t *addr);
356 
357 uint16_t
358 i_ddi_vaddr_get16(ddi_acc_impl_t *hdlp, uint16_t *addr);
359 
360 uint32_t
361 i_ddi_vaddr_get32(ddi_acc_impl_t *hdlp, uint32_t *addr);
362 
363 uint64_t
364 i_ddi_vaddr_get64(ddi_acc_impl_t *hdlp, uint64_t *addr);
365 
366 uint16_t
367 i_ddi_vaddr_swap_get16(ddi_acc_impl_t *hdlp, uint16_t *addr);
368 
369 uint32_t
370 i_ddi_vaddr_swap_get32(ddi_acc_impl_t *hdlp, uint32_t *addr);
371 
372 uint64_t
373 i_ddi_vaddr_swap_get64(ddi_acc_impl_t *hdlp, uint64_t *addr);
374 
375 /*
376  * Output functions to memory mapped IO
377  */
378 void
379 i_ddi_vaddr_put8(ddi_acc_impl_t *hdlp, uint8_t *addr, uint8_t value);
380 
381 void
382 i_ddi_vaddr_put16(ddi_acc_impl_t *hdlp, uint16_t *addr, uint16_t value);
383 
384 void
385 i_ddi_vaddr_put32(ddi_acc_impl_t *hdlp, uint32_t *addr, uint32_t value);
386 
387 void
388 i_ddi_vaddr_put64(ddi_acc_impl_t *hdlp, uint64_t *addr, uint64_t value);
389 
390 void
391 i_ddi_vaddr_swap_put16(ddi_acc_impl_t *hdlp, uint16_t *addr, uint16_t value);
392 
393 void
394 i_ddi_vaddr_swap_put32(ddi_acc_impl_t *hdlp, uint32_t *addr, uint32_t value);
395 
396 void
397 i_ddi_vaddr_swap_put64(ddi_acc_impl_t *hdlp, uint64_t *addr, uint64_t value);
398 
399 /*
400  * Repeated input functions for memory mapped IO
401  */
402 void
403 i_ddi_vaddr_rep_get8(ddi_acc_impl_t *hdlp, uint8_t *host_addr,
404 	uint8_t *dev_addr, size_t repcount, uint_t flags);
405 
406 void
407 i_ddi_vaddr_rep_get16(ddi_acc_impl_t *hdlp, uint16_t *host_addr,
408 	uint16_t *dev_addr, size_t repcount, uint_t flags);
409 
410 void
411 i_ddi_vaddr_rep_get32(ddi_acc_impl_t *hdlp, uint32_t *host_addr,
412 	uint32_t *dev_addr, size_t repcount, uint_t flags);
413 
414 void
415 i_ddi_vaddr_rep_get64(ddi_acc_impl_t *hdlp, uint64_t *host_addr,
416 	uint64_t *dev_addr, size_t repcount, uint_t flags);
417 
418 void
419 i_ddi_vaddr_swap_rep_get16(ddi_acc_impl_t *hdlp, uint16_t *host_addr,
420 	uint16_t *dev_addr, size_t repcount, uint_t flags);
421 
422 void
423 i_ddi_vaddr_swap_rep_get32(ddi_acc_impl_t *hdlp, uint32_t *host_addr,
424 	uint32_t *dev_addr, size_t repcount, uint_t flags);
425 
426 void
427 i_ddi_vaddr_swap_rep_get64(ddi_acc_impl_t *hdlp, uint64_t *host_addr,
428 	uint64_t *dev_addr, size_t repcount, uint_t flags);
429 
430 /*
431  * Repeated output functions for memory mapped IO
432  */
433 void
434 i_ddi_vaddr_rep_put8(ddi_acc_impl_t *hdlp, uint8_t *host_addr,
435 	uint8_t *dev_addr, size_t repcount, uint_t flags);
436 
437 void
438 i_ddi_vaddr_rep_put16(ddi_acc_impl_t *hdlp, uint16_t *host_addr,
439 	uint16_t *dev_addr, size_t repcount, uint_t flags);
440 
441 void
442 i_ddi_vaddr_rep_put32(ddi_acc_impl_t *hdl, uint32_t *host_addr,
443 	uint32_t *dev_addr, size_t repcount, uint_t flags);
444 
445 void
446 i_ddi_vaddr_rep_put64(ddi_acc_impl_t *hdl, uint64_t *host_addr,
447 	uint64_t *dev_addr, size_t repcount, uint_t flags);
448 
449 void
450 i_ddi_vaddr_swap_rep_put16(ddi_acc_impl_t *hdlp, uint16_t *host_addr,
451 	uint16_t *dev_addr, size_t repcount, uint_t flags);
452 
453 void
454 i_ddi_vaddr_swap_rep_put32(ddi_acc_impl_t *hdl, uint32_t *host_addr,
455 	uint32_t *dev_addr, size_t repcount, uint_t flags);
456 
457 void
458 i_ddi_vaddr_swap_rep_put64(ddi_acc_impl_t *hdl, uint64_t *host_addr,
459 	uint64_t *dev_addr, size_t repcount, uint_t flags);
460 
461 /*
462  * Input functions to IO space
463  */
464 uint8_t
465 i_ddi_io_get8(ddi_acc_impl_t *hdlp, uint8_t *addr);
466 
467 uint16_t
468 i_ddi_io_get16(ddi_acc_impl_t *hdlp, uint16_t *addr);
469 
470 uint32_t
471 i_ddi_io_get32(ddi_acc_impl_t *hdlp, uint32_t *addr);
472 
473 uint64_t
474 i_ddi_io_get64(ddi_acc_impl_t *hdlp, uint64_t *addr);
475 
476 uint16_t
477 i_ddi_io_swap_get16(ddi_acc_impl_t *hdlp, uint16_t *addr);
478 
479 uint32_t
480 i_ddi_io_swap_get32(ddi_acc_impl_t *hdlp, uint32_t *addr);
481 
482 uint64_t
483 i_ddi_io_swap_get64(ddi_acc_impl_t *hdlp, uint64_t *addr);
484 
485 /*
486  * Output functions to IO space
487  */
488 void
489 i_ddi_io_put8(ddi_acc_impl_t *hdlp, uint8_t *addr, uint8_t value);
490 
491 void
492 i_ddi_io_put16(ddi_acc_impl_t *hdlp, uint16_t *addr, uint16_t value);
493 
494 void
495 i_ddi_io_put32(ddi_acc_impl_t *hdlp, uint32_t *addr, uint32_t value);
496 
497 void
498 i_ddi_io_put64(ddi_acc_impl_t *hdlp, uint64_t *addr, uint64_t value);
499 
500 void
501 i_ddi_io_swap_put16(ddi_acc_impl_t *hdlp, uint16_t *addr, uint16_t value);
502 
503 void
504 i_ddi_io_swap_put32(ddi_acc_impl_t *hdlp, uint32_t *addr, uint32_t value);
505 
506 void
507 i_ddi_io_swap_put64(ddi_acc_impl_t *hdlp, uint64_t *addr, uint64_t value);
508 
509 /*
510  * Repeated input functions for IO space
511  */
512 void
513 i_ddi_io_rep_get8(ddi_acc_impl_t *hdlp, uint8_t *host_addr, uint8_t *dev_addr,
514 	size_t repcount, uint_t flags);
515 
516 void
517 i_ddi_io_rep_get16(ddi_acc_impl_t *hdlp, uint16_t *host_addr,
518 	uint16_t *dev_addr, size_t repcount, uint_t flags);
519 
520 void
521 i_ddi_io_rep_get32(ddi_acc_impl_t *hdlp, uint32_t *host_addr,
522 	uint32_t *dev_addr, size_t repcount, uint_t flags);
523 
524 void
525 i_ddi_io_rep_get64(ddi_acc_impl_t *hdlp, uint64_t *host_addr,
526 	uint64_t *dev_addr, size_t repcount, uint_t flags);
527 
528 void
529 i_ddi_io_swap_rep_get8(ddi_acc_impl_t *hdlp, uint8_t *host_addr,
530 	uint8_t *dev_addr, size_t repcount, uint_t flags);
531 
532 void
533 i_ddi_io_swap_rep_get16(ddi_acc_impl_t *hdlp, uint16_t *host_addr,
534 	uint16_t *dev_addr, size_t repcount, uint_t flags);
535 
536 void
537 i_ddi_io_swap_rep_get32(ddi_acc_impl_t *hdlp, uint32_t *host_addr,
538 	uint32_t *dev_addr, size_t repcount, uint_t flags);
539 
540 void
541 i_ddi_io_swap_rep_get64(ddi_acc_impl_t *hdlp, uint64_t *host_addr,
542 	uint64_t *dev_addr, size_t repcount, uint_t flags);
543 
544 /*
545  * Repeated output functions for IO space
546  */
547 void
548 i_ddi_io_rep_put8(ddi_acc_impl_t *hdlp, uint8_t *host_addr, uint8_t *dev_addr,
549 	size_t repcount, uint_t flags);
550 
551 void
552 i_ddi_io_rep_put16(ddi_acc_impl_t *hdlp, uint16_t *host_addr,
553 	uint16_t *dev_addr, size_t repcount, uint_t flags);
554 
555 void
556 i_ddi_io_rep_put32(ddi_acc_impl_t *hdl, uint32_t *host_addr, uint32_t *dev_addr,
557 	size_t repcount, uint_t flags);
558 
559 void
560 i_ddi_io_rep_put64(ddi_acc_impl_t *hdl, uint64_t *host_addr, uint64_t *dev_addr,
561 	size_t repcount, uint_t flags);
562 void
563 i_ddi_io_swap_rep_put16(ddi_acc_impl_t *hdlp, uint16_t *host_addr,
564 	uint16_t *dev_addr, size_t repcount, uint_t flags);
565 
566 void
567 i_ddi_io_swap_rep_put32(ddi_acc_impl_t *hdl, uint32_t *host_addr,
568 	uint32_t *dev_addr, size_t repcount, uint_t flags);
569 
570 void
571 i_ddi_io_swap_rep_put64(ddi_acc_impl_t *hdl, uint64_t *host_addr,
572 	uint64_t *dev_addr, size_t repcount, uint_t flags);
573 
574 int
575 i_ddi_vaddr_get(ddi_acc_impl_t *hdlp, caddr_t host_addr,
576 	caddr_t dev_addr, size_t wordsz, size_t count, ulong_t dev_addrtype);
577 
578 int
579 i_ddi_vaddr_put(ddi_acc_impl_t *hdlp, caddr_t host_addr,
580 	caddr_t dev_addr, size_t wordsz, size_t count, ulong_t dev_addrtype);
581 
582 int
583 i_ddi_io_get(ddi_acc_impl_t *hdlp, caddr_t host_addr,
584 	caddr_t dev_addr, size_t wordsz, size_t count, ulong_t dev_addrtype);
585 
586 int
587 i_ddi_io_put(ddi_acc_impl_t *hdlp, caddr_t host_addr,
588 	caddr_t dev_addr, size_t wordsz, size_t count, ulong_t dev_addrtype);
589 
590 uchar_t
591 i_pci_getb(int b, int d, int f, int r);
592 
593 ushort_t
594 i_pci_getw(int b, int d, int f, int r);
595 
596 ulong_t
597 i_pci_getl(int b, int d, int f, int r);
598 
599 void
600 i_pci_putb(int b, int d, int f, int r, uchar_t v);
601 
602 void
603 i_pci_putw(int b, int d, int f, int r, ushort_t v);
604 
605 void
606 i_pci_putl(int b, int d, int f, int r, ulong_t v);
607 
608 /*
609  * Default fault-checking and notification functions
610  */
611 int
612 i_ddi_acc_fault_check(ddi_acc_impl_t *hdlp);
613 
614 void
615 i_ddi_acc_fault_notify(ddi_acc_impl_t *hdlp);
616 
617 #endif	/* __STDC__ */
618 
619 #endif	/* _KERNEL */
620 
621 #ifdef	__cplusplus
622 }
623 #endif
624 
625 #endif	/* _SYS_DDI_ISA_H */
626