1*3299Sschwartz /* 2*3299Sschwartz * CDDL HEADER START 3*3299Sschwartz * 4*3299Sschwartz * The contents of this file are subject to the terms of the 5*3299Sschwartz * Common Development and Distribution License (the "License"). 6*3299Sschwartz * You may not use this file except in compliance with the License. 7*3299Sschwartz * 8*3299Sschwartz * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*3299Sschwartz * or http://www.opensolaris.org/os/licensing. 10*3299Sschwartz * See the License for the specific language governing permissions 11*3299Sschwartz * and limitations under the License. 12*3299Sschwartz * 13*3299Sschwartz * When distributing Covered Code, include this CDDL HEADER in each 14*3299Sschwartz * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*3299Sschwartz * If applicable, add the following below this CDDL HEADER, with the 16*3299Sschwartz * fields enclosed by brackets "[]" replaced with your own identifying 17*3299Sschwartz * information: Portions Copyright [yyyy] [name of copyright owner] 18*3299Sschwartz * 19*3299Sschwartz * CDDL HEADER END 20*3299Sschwartz */ 21*3299Sschwartz 22*3299Sschwartz /* 23*3299Sschwartz * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24*3299Sschwartz * Use is subject to license terms. 25*3299Sschwartz */ 26*3299Sschwartz 27*3299Sschwartz #ifndef _N2PIUPC_TABLES_H 28*3299Sschwartz #define _N2PIUPC_TABLES_H 29*3299Sschwartz 30*3299Sschwartz #pragma ident "%Z%%M% %I% %E% SMI" 31*3299Sschwartz 32*3299Sschwartz /* 33*3299Sschwartz * Table definitions for the N2 PIU performance counter driver. 34*3299Sschwartz * 35*3299Sschwartz * Each table consists of one or more groups of counters. 36*3299Sschwartz * 37*3299Sschwartz * A counter group will a name (used by busstat as the kstat "module" name), 38*3299Sschwartz * have its own set of kstats, and a common event select register. A group is 39*3299Sschwartz * represented as an n2piu_grp_t. 40*3299Sschwartz * 41*3299Sschwartz * Each counter is represented by an n2piu_cntr_t. Each has its own register 42*3299Sschwartz * offset (or address), bits for the data it represents, plus an associated 43*3299Sschwartz * register for zeroing it. 44*3299Sschwartz * 45*3299Sschwartz * All registers for n2piu are 64 bit, but a size field can be entered into this 46*3299Sschwartz * structure if registers sizes vary for other implementations (as if this code 47*3299Sschwartz * is leveraged for a future driver). 48*3299Sschwartz * 49*3299Sschwartz * A select register is represented by an n2piu_regsel_t. This defines the 50*3299Sschwartz * offset or address, and an array of fields which define the events for each 51*3299Sschwartz * counter it services. All counters need to have an entry in the fields array 52*3299Sschwartz * even if they don't have any representation in a select register. Please see 53*3299Sschwartz * the explanation of the events array (below) for more information. Counters 54*3299Sschwartz * without representation in a select register can specify their (non-existant) 55*3299Sschwartz * select register field with mask NONPROG_DUMMY_MASK and offset 56*3299Sschwartz * NONPROG_DUMMY_OFF. 57*3299Sschwartz * 58*3299Sschwartz * This implementation supports only one select register per group. If more 59*3299Sschwartz * are needed (e.g. if this implementation is used as a template for another 60*3299Sschwartz * device which has multiple select registers per group) the data structures can 61*3299Sschwartz * easily be changed to support an array of them. Add an array index in the 62*3299Sschwartz * counter structure to associate that counter with a particular select 63*3299Sschwartz * register, and add a field for the number of select registers in the group 64*3299Sschwartz * structure. 65*3299Sschwartz * 66*3299Sschwartz * Each counter has an array of programmable events associated with it, even if 67*3299Sschwartz * it is not programmable. This array is a series of name/value pairs defined 68*3299Sschwartz * by n2piu_event_t. The value is the event value loaded into the select 69*3299Sschwartz * register to select that event for that counter. The last entry in the array 70*3299Sschwartz * is always an entry with a bitmask of LSB-aligned bits of that counter's 71*3299Sschwartz * select register's field's width; it is usually called the CLEAR_PIC entry. 72*3299Sschwartz * CLEAR_PIC entries are not shown to the user. 73*3299Sschwartz * 74*3299Sschwartz * Note that counters without programmable events still need to define a 75*3299Sschwartz * (small) events array with at least CLEAR_PIC and a single event, so that 76*3299Sschwartz * event's name can display in busstat output. The CLEAR_PIC entry of 77*3299Sschwartz * nonprogrammable counters can have a value of NONPROG_DUMMY_MASK. 78*3299Sschwartz */ 79*3299Sschwartz 80*3299Sschwartz #ifdef __cplusplus 81*3299Sschwartz extern "C" { 82*3299Sschwartz #endif 83*3299Sschwartz 84*3299Sschwartz #include <sys/types.h> 85*3299Sschwartz #include <sys/kstat.h> 86*3299Sschwartz #include "n2piupc_acc.h" 87*3299Sschwartz 88*3299Sschwartz /* 89*3299Sschwartz * Description of a counter's events. Each counter will have an array of these, 90*3299Sschwartz * to define the events it can be programmed to report. Nonprogrammable 91*3299Sschwartz * counters still need an array of these, to contain the name busstat will 92*3299Sschwartz * display for it, and a CLEAR_PIC entry. 93*3299Sschwartz */ 94*3299Sschwartz typedef struct n2piu_event { 95*3299Sschwartz char *name; 96*3299Sschwartz uint64_t value; 97*3299Sschwartz } n2piu_event_t; 98*3299Sschwartz 99*3299Sschwartz /* 100*3299Sschwartz * Description of a counter's event selection. There will be one entry for 101*3299Sschwartz * each counter in the group. 102*3299Sschwartz */ 103*3299Sschwartz typedef struct n2piu_regsel_fld { 104*3299Sschwartz n2piu_event_t *events_p; 105*3299Sschwartz int num_events; /* Size of events array. */ 106*3299Sschwartz uint64_t event_mask; /* Width of the event field. */ 107*3299Sschwartz int event_offset; /* Offset of the event field. */ 108*3299Sschwartz } n2piu_regsel_fld_t; 109*3299Sschwartz 110*3299Sschwartz #define NUM_EVTS(x) (sizeof (x) / sizeof (n2piu_event_t)) 111*3299Sschwartz 112*3299Sschwartz /* 113*3299Sschwartz * Description of a group's select register. 114*3299Sschwartz */ 115*3299Sschwartz typedef struct n2piu_regsel { 116*3299Sschwartz off_t regoff; /* Register offset or address. */ 117*3299Sschwartz n2piu_regsel_fld_t *fields_p; /* select reg subfield descriptions. */ 118*3299Sschwartz int num_fields; /* Size of the fields array. */ 119*3299Sschwartz } n2piu_regsel_t; 120*3299Sschwartz 121*3299Sschwartz #define NUM_FLDS(x) (sizeof (x) / sizeof (n2piu_regsel_fld_t)) 122*3299Sschwartz 123*3299Sschwartz /* 124*3299Sschwartz * Counter description, including its access logistics and how to zero it. 125*3299Sschwartz */ 126*3299Sschwartz typedef struct n2piu_cntr { 127*3299Sschwartz off_t regoff; /* Register offset or address. */ 128*3299Sschwartz uint64_t fld_mask; /* Width of the active part of the register */ 129*3299Sschwartz off_t zero_regoff; /* Offset of register used to zero counter. */ 130*3299Sschwartz uint64_t zero_value; /* Value to write to zero_regoff, to clr cntr */ 131*3299Sschwartz } n2piu_cntr_t; 132*3299Sschwartz 133*3299Sschwartz #define FULL64BIT -1ULL /* Can use this for fld_mask. */ 134*3299Sschwartz 135*3299Sschwartz /* 136*3299Sschwartz * Group description. 137*3299Sschwartz */ 138*3299Sschwartz typedef struct n2piu_grp { 139*3299Sschwartz char *grp_name; /* Name, shows up as busstat "module" name. */ 140*3299Sschwartz n2piu_regsel_t *regsel_p; /* Select register. */ 141*3299Sschwartz n2piu_cntr_t *counters_p; /* Counter definitions. */ 142*3299Sschwartz int num_counters; /* Size of the counters array. */ 143*3299Sschwartz kstat_t **name_kstats_pp; /* Named kstats. One for all instances. */ 144*3299Sschwartz } n2piu_grp_t; 145*3299Sschwartz 146*3299Sschwartz #define NUM_CTRS(x) (sizeof (x) / sizeof (n2piu_cntr_t)) 147*3299Sschwartz 148*3299Sschwartz /* N2PIU-specific definitions. */ 149*3299Sschwartz 150*3299Sschwartz /* Where groups are in the leaf_grps array. */ 151*3299Sschwartz 152*3299Sschwartz #define NUM_GRPS 4 153*3299Sschwartz #define IMU_GRP 0 154*3299Sschwartz #define MMU_GRP 1 155*3299Sschwartz #define PEU_GRP 2 156*3299Sschwartz #define BIT_ERR_GRP 3 157*3299Sschwartz 158*3299Sschwartz /* The table itself. */ 159*3299Sschwartz extern n2piu_grp_t *leaf_grps[]; 160*3299Sschwartz 161*3299Sschwartz /* Standin symbol for when there is no register. */ 162*3299Sschwartz #define NO_REGISTER (off_t)-1ULL 163*3299Sschwartz 164*3299Sschwartz /* 165*3299Sschwartz * Default event values used in n2piu_event_t structures for non-programmable 166*3299Sschwartz * registers. 167*3299Sschwartz */ 168*3299Sschwartz #define NONPROG_DUMMY_MASK 0 169*3299Sschwartz #define NONPROG_DUMMY_OFF 0 170*3299Sschwartz 171*3299Sschwartz /* 172*3299Sschwartz * Event bitmask definitions for all groups. 173*3299Sschwartz */ 174*3299Sschwartz #define IMU_CTR_EVT_MASK 0xffull 175*3299Sschwartz #define IMU_CTR_0_EVT_OFF 0 176*3299Sschwartz #define IMU_CTR_1_EVT_OFF 8 177*3299Sschwartz 178*3299Sschwartz #define MMU_CTR_EVT_MASK 0xffull 179*3299Sschwartz #define MMU_CTR_0_EVT_OFF 0 180*3299Sschwartz #define MMU_CTR_1_EVT_OFF 8 181*3299Sschwartz 182*3299Sschwartz #define PEU_CTR_01_EVT_MASK 0xffull 183*3299Sschwartz #define PEU_CTR_2_EVT_MASK 0x3ull 184*3299Sschwartz #define PEU_CTR_0_EVT_OFF 0 185*3299Sschwartz #define PEU_CTR_1_EVT_OFF 8 186*3299Sschwartz #define PEU_CTR_2_EVT_OFF 16 187*3299Sschwartz 188*3299Sschwartz #define BTERR_CTR_0_EVT_MASK 0x1ull 189*3299Sschwartz #define BTERR_CTR_0_EVT_OFF 0 190*3299Sschwartz 191*3299Sschwartz /* 192*3299Sschwartz * Fake the biterr event register to be one with two fields, to store the 193*3299Sschwartz * overall enable/disable event (looks like pic0 reset) and the bterr3 events. 194*3299Sschwartz */ 195*3299Sschwartz 196*3299Sschwartz #define BTERR_CTR_3_EVT_MASK 0xfull 197*3299Sschwartz #define BTERR_CTR_3_EVT_OFF 0 198*3299Sschwartz 199*3299Sschwartz /* 200*3299Sschwartz * Note: this "event" is really an enable, and it serves all 4 PICs. 201*3299Sschwartz * 202*3299Sschwartz * PICs 0,1,2 are from the first counter, PIC3 is from the second counter. 203*3299Sschwartz */ 204*3299Sschwartz #define BTERR_CTR_ENABLE_MASK 0x1ull 205*3299Sschwartz #define BTERR_CTR_ENABLE_OFF 63 206*3299Sschwartz 207*3299Sschwartz #define BTERR_CTR_ENABLE (BTERR_CTR_ENABLE_MASK << BTERR_CTR_ENABLE_OFF) 208*3299Sschwartz 209*3299Sschwartz /* 210*3299Sschwartz * This register also has a bit to zero the counters. 211*3299Sschwartz */ 212*3299Sschwartz #define BTERR_CTR_CLR_MASK 0x1ull 213*3299Sschwartz #define BTERR_CTR_CLR_OFF 62 214*3299Sschwartz 215*3299Sschwartz #define BTERR_CTR_CLR (BTERR_CTR_CLR_MASK << BTERR_CTR_CLR_OFF) 216*3299Sschwartz 217*3299Sschwartz #define BTERR_CTR_ENABLE_AND_CLR (BTERR_CTR_ENABLE | BTERR_CTR_CLR) 218*3299Sschwartz 219*3299Sschwartz /* 220*3299Sschwartz * Definitions of the different types of events. 221*3299Sschwartz * 222*3299Sschwartz * The first part says which registers these events are for. 223*3299Sschwartz * For example, IMU01 means the IMU performance counters 0 and 1 224*3299Sschwartz */ 225*3299Sschwartz 226*3299Sschwartz /* String sought by busstat to locate the event field width "event" entry. */ 227*3299Sschwartz #define COMMON_S_CLEAR_PIC "clear_pic" 228*3299Sschwartz 229*3299Sschwartz 230*3299Sschwartz #define IMU01_S_EVT_NONE "event_none" 231*3299Sschwartz #define IMU01_S_EVT_CLK "clock_cyc" 232*3299Sschwartz #define IMU01_S_EVT_TOTAL_MONDO "total_mondo" 233*3299Sschwartz #define IMU01_S_EVT_TOTAL_MSI "total_msi" 234*3299Sschwartz #define IMU01_S_EVT_NAK_MONDO "mondo_nak" 235*3299Sschwartz #define IMU01_S_EVT_EQ_WR "eq_write" 236*3299Sschwartz #define IMU01_S_EVT_EQ_MONDO "eq_mondo" 237*3299Sschwartz 238*3299Sschwartz #define IMU01_EVT_NONE 0 239*3299Sschwartz #define IMU01_EVT_CLK 1 240*3299Sschwartz #define IMU01_EVT_TOTAL_MONDO 2 241*3299Sschwartz #define IMU01_EVT_TOTAL_MSI 3 242*3299Sschwartz #define IMU01_EVT_NAK_MONDO 4 243*3299Sschwartz #define IMU01_EVT_EQ_WR 5 244*3299Sschwartz #define IMU01_EVT_EQ_MONDO 6 245*3299Sschwartz 246*3299Sschwartz 247*3299Sschwartz #define MMU01_S_EVT_NONE "event_none" 248*3299Sschwartz #define MMU01_S_EVT_CLK "clock_cyc" 249*3299Sschwartz #define MMU01_S_EVT_TRANS "total_transl" 250*3299Sschwartz #define MMU01_S_EVT_STALL "total_stall_cyc" 251*3299Sschwartz #define MMU01_S_EVT_TRANS_MISS "total_transl_miss" 252*3299Sschwartz #define MMU01_S_EVT_TBLWLK_STALL "tblwlk_stall_cyc" 253*3299Sschwartz #define MMU01_S_EVT_BYPASS_TRANSL "bypass_transl" 254*3299Sschwartz #define MMU01_S_EVT_TRANSL_TRANSL "transl_transl" 255*3299Sschwartz #define MMU01_S_EVT_FLOW_CNTL_STALL "flow_stall_cyc" 256*3299Sschwartz #define MMU01_S_EVT_FLUSH_CACHE_ENT "cache_entr_flush" 257*3299Sschwartz 258*3299Sschwartz #define MMU01_EVT_NONE 0 259*3299Sschwartz #define MMU01_EVT_CLK 1 260*3299Sschwartz #define MMU01_EVT_TRANS 2 261*3299Sschwartz #define MMU01_EVT_STALL 3 262*3299Sschwartz #define MMU01_EVT_TRANS_MISS 4 263*3299Sschwartz #define MMU01_EVT_TBLWLK_STALL 5 264*3299Sschwartz #define MMU01_EVT_BYPASS_TRANSL 6 265*3299Sschwartz #define MMU01_EVT_TRANSL_TRANSL 7 266*3299Sschwartz #define MMU01_EVT_FLOW_CNTL_STALL 8 267*3299Sschwartz #define MMU01_EVT_FLUSH_CACHE_ENT 9 268*3299Sschwartz 269*3299Sschwartz 270*3299Sschwartz #define PEU2_S_EVT_NONE "event_none" 271*3299Sschwartz #define PEU2_S_EVT_NONPST_CMPL_TIME "npost_compl_time" 272*3299Sschwartz #define PEU2_S_EVT_XMIT_DATA "xmit_data" 273*3299Sschwartz #define PEU2_S_EVT_RCVD_DATA "rcvd_data" 274*3299Sschwartz 275*3299Sschwartz #define PEU2_EVT_NONE 0 276*3299Sschwartz #define PEU2_EVT_NONPST_CMPL_TIME 1 277*3299Sschwartz #define PEU2_EVT_XMIT_DATA 2 278*3299Sschwartz #define PEU2_EVT_RCVD_DATA 3 279*3299Sschwartz 280*3299Sschwartz 281*3299Sschwartz #define PEU01_S_EVT_NONE "event_none" 282*3299Sschwartz #define PEU01_S_EVT_CLK "clock_cyc" 283*3299Sschwartz #define PEU01_S_EVT_COMPL "compl_recvd" 284*3299Sschwartz #define PEU01_S_EVT_XMT_POST_CR_UNAV "post_cr_unav_cyc" 285*3299Sschwartz #define PEU01_S_EVT_XMT_NPOST_CR_UNAV "npost_cr_unav_cyc" 286*3299Sschwartz #define PEU01_S_EVT_XMT_CMPL_CR_UNAV "compl_cr_unav_cyc" 287*3299Sschwartz #define PEU01_S_EVT_XMT_ANY_CR_UNAV "trans_cr_any_unav" 288*3299Sschwartz #define PEU01_S_EVT_RETRY_CR_UNAV "retry_cr_unav" 289*3299Sschwartz #define PEU01_S_EVT_MEMRD_PKT_RCVD "recvd_mem_rd_pkt" 290*3299Sschwartz #define PEU01_S_EVT_MEMWR_PKT_RCVD "recvd_mem_wr_pkt" 291*3299Sschwartz #define PEU01_S_EVT_RCV_CR_THRESH "recv_cr_thresh" 292*3299Sschwartz #define PEU01_S_EVT_RCV_PST_HDR_CR_EXH "recv_hdr_cr_exh_cyc" 293*3299Sschwartz #define PEU01_S_EVT_RCV_PST_DA_CR_MPS "recv_post_da_cr_mps" 294*3299Sschwartz #define PEU01_S_EVT_RCV_NPST_HDR_CR_EXH "recv_npost_hdr_cr_exh" 295*3299Sschwartz #define PEU01_S_EVT_RCVR_L0S "recvr_l0s_cyc" 296*3299Sschwartz #define PEU01_S_EVT_RCVR_L0S_TRANS "recvr_l0s_trans" 297*3299Sschwartz #define PEU01_S_EVT_XMTR_L0S "trans_l0s_cyc" 298*3299Sschwartz #define PEU01_S_EVT_XMTR_L0S_TRANS "trans_l0s_trans" 299*3299Sschwartz #define PEU01_S_EVT_RCVR_ERR "recvr_err" 300*3299Sschwartz #define PEU01_S_EVT_BAD_TLP "bad_tlp" 301*3299Sschwartz #define PEU01_S_EVT_BAD_DLLP "bad_dllp" 302*3299Sschwartz #define PEU01_S_EVT_REPLAY_ROLLOVER "replay_rollover" 303*3299Sschwartz #define PEU01_S_EVT_REPLAY_TMO "replay_to" 304*3299Sschwartz 305*3299Sschwartz #define PEU01_EVT_NONE 0x0 306*3299Sschwartz #define PEU01_EVT_CLK 0x1 307*3299Sschwartz #define PEU01_EVT_COMPL 0x2 308*3299Sschwartz #define PEU01_EVT_XMT_POST_CR_UNAV 0x10 309*3299Sschwartz #define PEU01_EVT_XMT_NPOST_CR_UNAV 0x11 310*3299Sschwartz #define PEU01_EVT_XMT_CMPL_CR_UNAV 0x12 311*3299Sschwartz #define PEU01_EVT_XMT_ANY_CR_UNAV 0x13 312*3299Sschwartz #define PEU01_EVT_RETRY_CR_UNAV 0x14 313*3299Sschwartz #define PEU01_EVT_MEMRD_PKT_RCVD 0x20 314*3299Sschwartz #define PEU01_EVT_MEMWR_PKT_RCVD 0x21 315*3299Sschwartz #define PEU01_EVT_RCV_CR_THRESH 0x22 316*3299Sschwartz #define PEU01_EVT_RCV_PST_HDR_CR_EXH 0x23 317*3299Sschwartz #define PEU01_EVT_RCV_PST_DA_CR_MPS 0x24 318*3299Sschwartz #define PEU01_EVT_RCV_NPST_HDR_CR_EXH 0x25 319*3299Sschwartz #define PEU01_EVT_RCVR_L0S 0x30 320*3299Sschwartz #define PEU01_EVT_RCVR_L0S_TRANS 0x31 321*3299Sschwartz #define PEU01_EVT_XMTR_L0S 0x32 322*3299Sschwartz #define PEU01_EVT_XMTR_L0S_TRANS 0x33 323*3299Sschwartz #define PEU01_EVT_RCVR_ERR 0x40 324*3299Sschwartz #define PEU01_EVT_BAD_TLP 0x42 325*3299Sschwartz #define PEU01_EVT_BAD_DLLP 0x43 326*3299Sschwartz #define PEU01_EVT_REPLAY_ROLLOVER 0x44 327*3299Sschwartz #define PEU01_EVT_REPLAY_TMO 0x47 328*3299Sschwartz 329*3299Sschwartz /* 330*3299Sschwartz * BTERR counter 3 is presented by the device as one register with 8 different 331*3299Sschwartz * counters. Since busstat displays in decimal and not in hex, display of the 332*3299Sschwartz * raw data is impractical except to make a non-zero test. Fake that this 333*3299Sschwartz * register has multiple modes, so that each lane can be shown separately. 334*3299Sschwartz * Then one can use Busstat capabilities to display alternating events of a 335*3299Sschwartz * register. 336*3299Sschwartz */ 337*3299Sschwartz 338*3299Sschwartz #define BTERR3_S_EVT_NONE "event_none" 339*3299Sschwartz #define BTERR3_S_EVT_ENC_ALL "encd_err_ln_all" 340*3299Sschwartz #define BTERR3_S_EVT_ENC_LANE_0 "encd_err_ln_0" 341*3299Sschwartz #define BTERR3_S_EVT_ENC_LANE_1 "encd_err_ln_1" 342*3299Sschwartz #define BTERR3_S_EVT_ENC_LANE_2 "encd_err_ln_2" 343*3299Sschwartz #define BTERR3_S_EVT_ENC_LANE_3 "encd_err_ln_3" 344*3299Sschwartz #define BTERR3_S_EVT_ENC_LANE_4 "encd_err_ln_4" 345*3299Sschwartz #define BTERR3_S_EVT_ENC_LANE_5 "encd_err_ln_5" 346*3299Sschwartz #define BTERR3_S_EVT_ENC_LANE_6 "encd_err_ln_6" 347*3299Sschwartz #define BTERR3_S_EVT_ENC_LANE_7 "encd_err_ln_7" 348*3299Sschwartz 349*3299Sschwartz #define BTERR3_EVT_ENC_NONE 0 350*3299Sschwartz #define BTERR3_EVT_ENC_ALL 1 351*3299Sschwartz #define BTERR3_EVT_ENC_LANE_0 2 352*3299Sschwartz #define BTERR3_EVT_ENC_LANE_1 3 353*3299Sschwartz #define BTERR3_EVT_ENC_LANE_2 4 354*3299Sschwartz #define BTERR3_EVT_ENC_LANE_3 5 355*3299Sschwartz #define BTERR3_EVT_ENC_LANE_4 6 356*3299Sschwartz #define BTERR3_EVT_ENC_LANE_5 7 357*3299Sschwartz #define BTERR3_EVT_ENC_LANE_6 8 358*3299Sschwartz #define BTERR3_EVT_ENC_LANE_7 9 359*3299Sschwartz 360*3299Sschwartz /* 361*3299Sschwartz * For non-programmable registers, include an n2piu_event_t which has two 362*3299Sschwartz * fields, a default field (which gives the field a name even though it 363*3299Sschwartz * can't be programmed, and clear_pic which busstat needs. 364*3299Sschwartz */ 365*3299Sschwartz #define BTERR2_S_EVT_PRE "phys_rcvr_errs" 366*3299Sschwartz 367*3299Sschwartz #define BTERR2_EVT_PRE 0 368*3299Sschwartz 369*3299Sschwartz #define BTERR1_S_EVT_BTLP "bad_tlps" 370*3299Sschwartz 371*3299Sschwartz #define BTERR1_EVT_BTLP 0 372*3299Sschwartz 373*3299Sschwartz /* 374*3299Sschwartz * Note: All 4 biterr counter fields (split among two counter registers) are 375*3299Sschwartz * tied together with a single enable. Treat the first field as programmable 376*3299Sschwartz * to provide a way to reset the counter set. 377*3299Sschwartz */ 378*3299Sschwartz #define BTERR0_S_EVT_RESET "reset_bterr" /* All biterr counter zero */ 379*3299Sschwartz #define BTERR0_S_EVT_BDLLP "bad_dllps" 380*3299Sschwartz 381*3299Sschwartz #define BTERR0_EVT_RESET 0 382*3299Sschwartz #define BTERR0_EVT_BDLLP 1 383*3299Sschwartz 384*3299Sschwartz /* 385*3299Sschwartz * First bit error counter register has three counters. Here are the 386*3299Sschwartz * placements of these counters within the (virtual) registers. 387*3299Sschwartz */ 388*3299Sschwartz #define BE1_BAD_DLLP_MASK 0xff000000ULL 389*3299Sschwartz #define BE1_BAD_TLP_MASK 0xff0000ULL 390*3299Sschwartz #define BE1_BAD_PRE_MASK 0x3ffULL 391*3299Sschwartz #define BE2_8_10_MASK FULL64BIT 392*3299Sschwartz 393*3299Sschwartz #ifdef __cplusplus 394*3299Sschwartz } 395*3299Sschwartz #endif 396*3299Sschwartz 397*3299Sschwartz #endif /* _N2PIUPC_TABLES_H */ 398