px_pec.h revision f8d2de6bd2421da1926f3daa456d161670decdf7
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_PX_PEC_H
#define _SYS_PX_PEC_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* The following structure represents the pci-express configuration
* header for a fire PEC.
*/
typedef struct px_config_header {
volatile uint16_t ch_vendor_id;
volatile uint16_t ch_device_id;
volatile uint16_t ch_command_reg;
volatile uint16_t ch_status_reg;
volatile uint8_t ch_revision_id_reg;
volatile uint8_t ch_programming_if_code_reg;
volatile uint8_t ch_sub_class_reg;
volatile uint8_t ch_base_class_reg;
volatile uint8_t ch_cache_line_size_reg;
volatile uint8_t ch_latency_timer_reg;
volatile uint8_t ch_header_type_reg;
/*
* Bit fields of ch_status_reg for cmn_err's %b
*/
#define PX_STATUS_BITS "\020\
\11signaled-parity-error\
\14signaled-target-abort\
\15received-target-abort\
\16received-master-abort\
\17signaled-system-error\
\20detected-parity-error"
/*
* pec block soft state structure:
*
* Each px node has its own private pec block structure.
*/
typedef struct px_pec {
/*
* Memory address range on this PBM used to determine DMA on this pec
*/
/*
* support for ddi_poke:
*/
int pec_safeacc_type;
/*
* support for cautious
*/
#define PBM_NAMESTR_BUFLEN 64
/* driver name & instance */
/* nodename & node_addr */
char *pec_nameaddr_str;
/* MSIQ used for correctable/fatal/non fatala PCIe messages */
} px_pec_t;
/*
* forward declarations (object creation and destruction):
*/
#ifdef __cplusplus
}
#endif
#endif /* _SYS_PX_PEC_H */