/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_DDITYPES_H
#define _SYS_DDITYPES_H
#include <sys/isa_defs.h>
#ifndef _ASM
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _ASM
/*
* DMA types
*
* A DMA handle represent a "DMA object". A DMA object is an abstraction
* that represents the potential source or destination of DMA transfers to
* or from a device. The DMA object is the highest level description of
* the source or destination and is not suitable for the actual transfer.
*
* Note, that we avoid the specific references to "mapping". The fact that
* a transfer requires mapping is an artifact of the specific architectural
* implementation.
*/
/*
* A dma window type represents a "DMA window". A DMA window is a portion
* of a dma object or might be the entire object. A DMA window has had system
* resources allocated to it and is prepared to be transferred into or
* out of. Examples of system resources are DVMA mapping resources and
* intermediate transfer buffer resources.
*
*/
/*
* A dma segment type represents a "DMA segment". A dma segment is a
* contiguous portion of a DMA window which is entirely addressable by the
* device for a transfer operation. One example where DMA segments are
* required is where the system does not contain DVMA capability and
* the object or window may be non-contiguous. In this example the
* object or window will be broken into smaller contiguous segments.
* Another example is where a device or some intermediary bus adapter has
* some upper limit on its transfer size (i.e. an 8-bit address register).
* In this example the object or window will be broken into smaller
* addressable segments.
*/
/*
* A DMA cookie contains DMA address information required to
* program a DMA engine
*/
typedef struct {
union {
} _dmu;
#ifdef _LONG_LONG_HTOL
#else
#endif
/*
* Interrupt types
*/
/*
* Both ddi_iblock_cookie_t and ddi_idevice_cookie_t are
* obsolete data structures.
*
* lock initialization type
*/
typedef union {
struct {
} idu;
/*
* register specification
*/
/*
* interrupt specification
*/
/*
* ddi_softintr_t is an obsolete data structure.
*
* soft interrupt id
*/
/*
* opaque device info handle
*/
/*
* Mapping cookie for devmap(9E)
*/
/*
* Opaque Device id
*/
/*
* Device id types
*/
#define DEVID_NONE 0
/*
* Device id scsi encode versions (version of encode interface, not devid)
*/
#define DEVID_SCSI_ENCODE_VERSION1 0
/*
* Device id smp encode versions (version of encode interface, not devid)
*/
#define DEVID_SMP_ENCODE_VERSION1 0
/* minor name values for devid lookup interfaces */
#define DEVID_MINOR_NAME_ALL ((char *)0)
/*
* Define ddi_devmap_cmd types. This should probably be elsewhere.
*/
typedef enum {
/*
* Definitions for node state.
*
* NOTE: DS_ATTACHED and DS_READY should only be used by the devcfg.c state
* model code itself, other code should use i_ddi_devi_attached() to avoid
* logic errors associated with transient DS_READY->DS_ATTACHED->DS_READY
* state changes while the node is attached.
*/
typedef enum {
DS_PROTO = 0,
/*
* NDI Event Service
*/
#endif /* !_ASM */
#ifdef _KERNEL
#ifndef _ASM
/*
* Device Access Attributes
*/
typedef struct ddi_device_acc_attr {
/*
* endian-ness flags
*/
/*
* Data ordering values
*/
/*
* Data size
*/
/*
* Data Access Handle
*/
typedef struct ddi_acc_hdl {
/*
*/
typedef struct {
/*
* Used by the high resolution timeout functions
*/
#endif /* !_ASM */
/*
* devacc_attr_access error protection types
*/
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_DDITYPES_H */