ddifm_impl.h revision c333dd99c762d509c7eb6cce222221958e23b4c8
/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _DDIFM_IMPL_H
#define _DDIFM_IMPL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/dditypes.h>
#ifdef __cplusplus
extern "C" {
#endif
struct i_ddi_fmkstat {
};
/* Fault management error handler support */
#define DDI_MAX_ERPT_CLASS 64
#define DDI_FM_STKDEPTH 20
#define DDI_FM_SYM_SZ 64
struct i_ddi_errhdl {
int (*eh_func)(); /* error handler callback */
void *eh_impl; /* callback arg */
};
/* Fault management resource cache support */
struct i_ddi_fmc_entry {
struct i_ddi_fmc_entry *fce_prev;
struct i_ddi_fmc_entry *fce_next;
void *fce_resource; /* acc or DMA handle cached */
void *fce_bus_specific; /* Bus-specific handle data */
};
struct i_ddi_fmc {
int fc_len; /* length of FM cache array */
};
/* Error handler targets */
struct i_ddi_fmtgt {
};
struct i_ddi_fmhdl {
int fh_cap; /* fm level for this instance */
void *fh_bus_specific; /* Bus specific FM info */
};
typedef struct pci_fm_err {
char *err_class;
char *terr_class;
int flags;
} pci_fm_err_t;
extern pci_fm_err_t pci_err_tbl[];
#ifdef _KERNEL
typedef int (*ddi_fmcompare_t)(dev_info_t *, const void *, const void *,
const void *);
/* driver defect error reporting */
extern void i_ddi_fm_handler_enter(dev_info_t *);
extern void i_ddi_fm_handler_exit(dev_info_t *);
/* access and dma handle protection support */
/* fm busop support */
extern void i_ndi_busop_fm_fini(dev_info_t *);
/* fm cache support */
void i_ndi_fmc_destroy(struct i_ddi_fmc *);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _DDIFM_IMPL_H */