/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_DDIPROPDEFS_H
#define _SYS_DDIPROPDEFS_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* ddiprops.h: All definitions related to DDI properties.
* Structure definitions are private to the DDI
* implementation. See also, ddipropfuncs.h
*/
/*
* ddi_prop_op_t: Enum for prop_op functions
*/
typedef enum {
/*
* ddi_prop_t: The basic item used to store software defined propeties.
* Note that properties are always stored by reference.
*/
typedef struct ddi_prop {
} ddi_prop_t;
/*
* A referenced property list, used for sharing properties among
* multiple driver instances
*/
typedef struct ddi_prop_list {
int prop_ref;
/*
*/
typedef struct ddi_prop_handle {
/*
*/
typedef struct prop_handle_ops {
/*
* Data passed back to driver. The driver gets a pointer to driver_data.
* When we get it back we do negative indexing to find the size and free
* routine to call
*/
struct prop_driver_data {
};
/*
*/
/*
* Macro to call the 64 bit integer operator
*/
/*
* Property handle commands
*/
typedef enum {
/*
* Positive numbers are used to return the encoded or
* decode size of the object, so an ok return must be positive,
* and all error returns negative.
*/
typedef enum {
/* operation was successful */
/* 1275 property cell */
/* Length of a 1275 property cell */
/*
* Property handle flags
*/
/*
* Return values from property functions:
*/
#define DDI_PROP_SUCCESS 0
/*
* used internally in the framework only
*/
/*
* Size of a 1275 int in bytes
*/
/*
* Property flags:
*/
/*
* Used internally by the DDI property rountines and masked in DDI(9F)
* interfaces...
*/
/*
* Used in framework only, to inhibit certain pre-defined s/w property
* names from coming from the prom.
*/
/*
* Used interally by the DDI property routines to implement the old
* depricated functions with the new functions
*/
/*
* Type of data property contains
*/
/*
* This flag indicates that the LDI lookup routine
* should match the request regardless of the actual
* dev_t with which the property was created. In other
* words, any dev_t value found on the property list
* is an acceptable part of the match criteria.
*/
/*
* Private flag that should ONLY be used by the LDI Framework
* to indicate a property search of an unbound dlpi2 dip.
* The LDI property lookup interfaces will set this flag if
* it is determined that the dip representing a dlpi-style2
* driver is currently unbound (dip == NULL) at the time of
* the property lookup request.
*/
/*
* Private flag that indicates that a typed interface that predates typed
* properties is being used - the framework should set additional typed flags
* (DDI_PROP_TYPE_INT64) when expanding search to DDI_PROP_TYPE_ANY.
*/
/*
* Private flag that indicates that the ldi is doing a driver prop_op
* call to check for driver dynamic properties. This request should
* not be passed onto the common property lookup framework since all
* the ldi property interface are typed and driver prop_op lookups are
* not.
*/
/*
* Private flag used to lookup global properties specified in rootnex.conf file
*/
/*
* DDI_DEV_T_NONE: When creating, property is not associated with
* particular dev_t.
* DDI_DEV_T_ANY: Wildcard dev_t when searching properties.
*/
/*
* DDI_MAJOR_T_UNKNOWN Used when a driver does not know its dev_t during
* a property create.
* DDI_MAJOR_T_NONE Used when a driver does not have a major number.
*/
/*
* Some DDI property names...
*/
/*
* One of the following boolean properties shall be defined in the
* root node, and defines the addressing mode understood by the root
* node of the implementation....
*/
/*
* Common property encoded data search routine. Returns the encoded data
* in valuep. Match is done on dip, dev, data type (in flags), and name.
*/
/*
* Property debugging support in kernel...
*/
/*
* Property debugging support... Be careful about enabling this when
* you are tipping in to the console. Undefine PROP_DEBUG to remove
* all support from the code. (c.f. autoconf.c and zs_common.c)
*
* It does no good to enable this if the rest of the kernel was built with
* this disabled (specifically, the core kernel module.)
*
* #define DDI_PROP_DEBUG 1
*/
#ifdef DDI_PROP_DEBUG
/*
* Returns prev value of debugging flag, non-zero enables debug printf's
*/
int ddi_prop_debug(int enable);
#endif /* DDI_PROP_DEBUG */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_DDIPROPDEFS_H */