xref: /illumos-gate/usr/src/uts/sun4u/io/px/px_err.h (revision 08a74c0d)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
525cf1a30Sjl  * Common Development and Distribution License (the "License").
625cf1a30Sjl  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
2225cf1a30Sjl  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
26f8d2de6bSjchu #ifndef	_SYS_PX_ERR_H
27f8d2de6bSjchu #define	_SYS_PX_ERR_H
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
327c478bd9Sstevel@tonic-gate extern "C" {
337c478bd9Sstevel@tonic-gate #endif
347c478bd9Sstevel@tonic-gate 
35f8d2de6bSjchu typedef enum {
36f8d2de6bSjchu 	PX_ERR_JBC,
3725cf1a30Sjl 	PX_ERR_UBC,
38f8d2de6bSjchu 	PX_ERR_MMU,
39f8d2de6bSjchu 	PX_ERR_IMU,
40f8d2de6bSjchu 	PX_ERR_TLU_UE,
41f8d2de6bSjchu 	PX_ERR_TLU_CE,
42f8d2de6bSjchu 	PX_ERR_TLU_OE,
43f8d2de6bSjchu 	PX_ERR_ILU,
44f8d2de6bSjchu 	PX_ERR_LPU_LINK,
45f8d2de6bSjchu 	PX_ERR_LPU_PHY,
46f8d2de6bSjchu 	PX_ERR_LPU_RX,
47f8d2de6bSjchu 	PX_ERR_LPU_TX,
48f8d2de6bSjchu 	PX_ERR_LPU_LTSSM,
49f8d2de6bSjchu 	PX_ERR_LPU_GIGABLZ
50f8d2de6bSjchu } px_err_id_t;
51f8d2de6bSjchu 
52*08a74c0dSschwartz #define	PX_ERR_ENABLE	B_TRUE
53*08a74c0dSschwartz #define	PX_ERR_DISABLE	B_FALSE
54*08a74c0dSschwartz 
55*08a74c0dSschwartz void px_err_reg_enable(px_err_id_t reg_id, caddr_t csr_base);
56*08a74c0dSschwartz void px_err_reg_disable(px_err_id_t reg_id, caddr_t csr_base);
57*08a74c0dSschwartz void px_err_reg_setup_pcie(uint8_t chip_mask, caddr_t csr_base,
58*08a74c0dSschwartz     boolean_t enable);
597c478bd9Sstevel@tonic-gate 
6025cf1a30Sjl #define	PX_ERR_EN_ALL			-1ull
6125cf1a30Sjl #define	PX_ERR_MASK_NONE		0ull
6225cf1a30Sjl 
6325cf1a30Sjl #define	LPU_INTR_ENABLE 0ull
6425cf1a30Sjl #define	LPU_INTR_DISABLE -1ull
6525cf1a30Sjl 
6625cf1a30Sjl extern uint64_t px_tlu_ue_intr_mask;
6725cf1a30Sjl extern uint64_t px_tlu_ue_log_mask;
6825cf1a30Sjl extern uint64_t px_tlu_ue_count_mask;
6925cf1a30Sjl 
7025cf1a30Sjl extern uint64_t px_tlu_ce_intr_mask;
7125cf1a30Sjl extern uint64_t px_tlu_ce_log_mask;
7225cf1a30Sjl extern uint64_t px_tlu_ce_count_mask;
7325cf1a30Sjl 
7425cf1a30Sjl extern uint64_t px_tlu_oe_intr_mask;
7525cf1a30Sjl extern uint64_t px_tlu_oe_log_mask;
7625cf1a30Sjl extern uint64_t px_tlu_oe_count_mask;
7725cf1a30Sjl 
7825cf1a30Sjl extern uint64_t px_mmu_intr_mask;
7925cf1a30Sjl extern uint64_t px_mmu_log_mask;
8025cf1a30Sjl extern uint64_t px_mmu_count_mask;
8125cf1a30Sjl 
8225cf1a30Sjl extern uint64_t px_imu_intr_mask;
8325cf1a30Sjl extern uint64_t px_imu_log_mask;
8425cf1a30Sjl extern uint64_t px_imu_count_mask;
8525cf1a30Sjl 
8625cf1a30Sjl extern uint64_t px_ilu_intr_mask;
8725cf1a30Sjl extern uint64_t px_ilu_log_mask;
8825cf1a30Sjl extern uint64_t px_ilu_count_mask;
8925cf1a30Sjl 
907c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
917c478bd9Sstevel@tonic-gate }
927c478bd9Sstevel@tonic-gate #endif
937c478bd9Sstevel@tonic-gate 
94f8d2de6bSjchu #endif	/* _SYS_PX_ERR_H */
95