pci_fm.h revision 00d0963faf2e861a4aef6b1bf28f99a5b2b20755
/*
* 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 _PCI_FM_H
#define _PCI_FM_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _KERNEL
#define PBM_PRIMARY 1
#define PBM_SECONDARY 0
#define PBM_NONFATAL 0
#define PBM_FATAL 1
#define CB_NONFATAL 0
#define CB_FATAL 1
#define FM_LOG_PCI 0
#define FM_LOG_PBM 1
#define PCI_SIDEA 0
#define PCI_SIDEB 1
#define ECC_MAX_ERRS 6
/*
* handlers, it is necessary for it to know where it is being called from.
* Below are the flags passed to pci_pbm_err_handler() to give it knowledge
* of it's caller.
*/
#define PCI_TRAP_CALL 0x0
#define PCI_CB_CALL 0x1
#define PCI_INTR_CALL 0x2
#define PCI_BUS_EXIT_CALL 0x3
#define PCI_ECC_CALL 0x4
#define PCIX_ERROR_SUBCLASS "pcix"
#define PCIX_SECONDARY "s-"
#define PCIX_STAT "pcix-stat"
#define PCIX_PFAR "pcix-pfar"
/*
* region where schizo pio ecc error was detected
*/
typedef enum {
} ecc_region_t;
typedef struct pbm_fm_err {
char *pbm_err_class;
int pbm_pri;
int pbm_flag;
char *pbm_terr_class;
} pbm_fm_err_t;
typedef struct ecc_format {
int ecc_side;
} ecc_format_t;
typedef struct cb_fm_err {
char *cb_err_class;
int cb_fatal;
} cb_fm_err_t;
typedef struct ecc_fm_err {
char *ecc_err_class;
int ecc_type;
int ecc_pri;
int ecc_region;
int ecc_flag;
} ecc_fm_err_t;
/*
* iommu errstate used to store iommu specific registers
*/
struct iommu_errstate {
};
struct pci_errstate {
char *pci_err_class;
};
/*
* pbm errstate use to encompass the state for all errors
* detected by the pci block
*/
struct pbm_errstate {
char *pbm_err_class;
int pbm_pri;
int pbm_log;
char *pbm_bridge_type;
char *pbm_terr_class;
};
/*
* ecc errstate used to store all state captured,
* upon detection of an ecc error.
*/
struct ecc_errstate {
char *ecc_bridge_type;
int ecc_pri;
char *ecc_err_type;
int ecc_pg_ret;
int ecc_caller;
char ecc_unum[UNUM_NAMLEN];
char ecc_dimm_sid[DIMM_SERIAL_ID_LEN];
};
/*
* control block error state
*/
struct cb_errstate {
char *cb_err_class;
char *cb_bridge_type;
};
const void *impl_data);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _PCI_FM_H */