pcmu_err.h revision 25cf1a301a396c38e8adf52c15f537b80d2483f7
/*
* 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 _SYS_PCMU_ERR_H
#define _SYS_PCMU_ERR_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 FM_LOG_PCI 0
#define FM_LOG_PBM 1
#define ECC_MAX_ERRS 6
#define TARGET_MAX_ERRS 6
/*
* handlers, it is necessary for it to know where it is being called from.
* Below are the flags passed to pcmu_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
struct pcmu_errstate {
char *pcmu_err_class;
};
/*
* pbm errstate use to encompass the state for all errors
* detected by the pci block
*/
struct pcmu_pbm_errstate {
char *pbm_err_class;
int pcbm_pri;
int pbm_log;
char *pbm_bridge_type;
char *pcmu_pbm_terr_class;
};
/*
* ecc errstate used to store all state captured,
* upon detection of an ecc error.
*/
struct pcmu_ecc_errstate {
char *ecc_bridge_type;
int pecc_pri;
char ecc_unum[UNUM_NAMLEN];
char *ecc_err_type;
int pecc_pg_ret;
int ecc_caller;
};
void *afar);
const void *impl_data);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_PCMU_ERR_H */