FEATURES: document various missed changes
[unleashed/lotheac.git] / include / sys / bofi_impl.h
blob71aee145ff7d9aa3a24cb5a8c6e7eb42e7886c20
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _SYS_BOFI_IMPL_H
27 #define _SYS_BOFI_IMPL_H
29 #pragma ident "%Z%%M% %I% %E% SMI"
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
35 struct bofi_errent {
36 struct bofi_errent *next; /* next on in-use chain */
37 struct bofi_errent *cnext; /* next on clone chain */
38 struct bofi_errent *cprev; /* prev on clone chain */
39 struct bofi_errdef errdef;
40 struct bofi_errstate errstate;
41 caddr_t name;
42 struct acc_log_elem *logbase;
43 uint_t state;
44 kcondvar_t cv;
45 ddi_softintr_t softintr_id;
49 * values for state
51 #define BOFI_DEV_ACTIVE 1
52 #define BOFI_NEW_MESSAGE 2
53 #define BOFI_MESSAGE_WAIT 4
54 #define BOFI_DEBUG 8
56 #define BOFI_NLINKS 8192
58 struct bofi_link {
59 struct bofi_link *link; /* next on shadow handle chain */
60 struct bofi_errent *errentp; /* pointer to corresponding errent */
63 struct bofi_shadow {
64 union {
65 ddi_acc_impl_t acc;
66 struct {
67 uint_t (*int_handler)(caddr_t, caddr_t);
68 caddr_t int_handler_arg1;
69 caddr_t int_handler_arg2;
70 } intr;
71 } save;
72 struct bofi_shadow *next; /* next on inuse chain */
73 struct bofi_shadow *prev; /* prev on inuse chain */
74 struct bofi_shadow *hnext; /* next on hhash chain */
75 struct bofi_shadow *hprev; /* prev on hhash chain */
76 struct bofi_shadow *dnext; /* next on dhash chain */
77 struct bofi_shadow *dprev; /* prev on dhash chain */
78 struct bofi_link *link; /* errdef chain */
79 uint_t type;
80 union {
81 ddi_dma_handle_t dma_handle;
82 ddi_acc_handle_t acc_handle;
83 } hdl;
84 uint32_t bofi_inum;
85 dev_info_t *dip;
86 char name[NAMESIZE]; /* as returned by ddi_get_name() */
87 int instance; /* as returned by ddi_get_instance() */
88 int rnumber;
89 offset_t offset;
90 offset_t len;
91 caddr_t addr;
92 caddr_t mapaddr;
93 caddr_t origaddr;
94 caddr_t allocaddr;
95 uint_t flags;
96 int map_flags;
97 page_t *map_pp;
98 page_t **map_pplist;
99 struct bofi_shadow **hparrayp;
100 int hilevel;
101 ddi_umem_cookie_t umem_cookie;
105 * values for type
107 #define BOFI_ACC_HDL 1
108 #define BOFI_DMA_HDL 2
109 #define BOFI_INT_HDL 3
110 #define BOFI_NULL 4
112 #ifdef __cplusplus
114 #endif
116 #endif /* _SYS_BOFI_IMPL_H */