127Sjchu /* 227Sjchu * CDDL HEADER START 327Sjchu * 427Sjchu * The contents of this file are subject to the terms of the 53274Set142600 * Common Development and Distribution License (the "License"). 63274Set142600 * You may not use this file except in compliance with the License. 727Sjchu * 827Sjchu * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 927Sjchu * or http://www.opensolaris.org/os/licensing. 1027Sjchu * See the License for the specific language governing permissions 1127Sjchu * and limitations under the License. 1227Sjchu * 1327Sjchu * When distributing Covered Code, include this CDDL HEADER in each 1427Sjchu * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1527Sjchu * If applicable, add the following below this CDDL HEADER, with the 1627Sjchu * fields enclosed by brackets "[]" replaced with your own identifying 1727Sjchu * information: Portions Copyright [yyyy] [name of copyright owner] 1827Sjchu * 1927Sjchu * CDDL HEADER END 2027Sjchu */ 2127Sjchu /* 22*11304SJanie.Lu@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 2327Sjchu * Use is subject to license terms. 2427Sjchu */ 2527Sjchu 2627Sjchu #ifndef _SYS_PX_ERR_H 2727Sjchu #define _SYS_PX_ERR_H 2827Sjchu 2927Sjchu #ifdef __cplusplus 3027Sjchu extern "C" { 3127Sjchu #endif 3227Sjchu 3327Sjchu /* error packet definitions */ 3427Sjchu 3527Sjchu /* Block Definitions */ 3627Sjchu #define BLOCK_RSVD 0x0 3727Sjchu #define BLOCK_HOSTBUS 0x1 3827Sjchu #define BLOCK_MMU 0x2 3927Sjchu #define BLOCK_INTR 0x3 4027Sjchu #define BLOCK_PCIE 0x4 41*11304SJanie.Lu@Sun.COM #define BLOCK_PORT 0x5 4227Sjchu #define BLOCK_UNKNOWN 0xe 4327Sjchu 4427Sjchu /* Op definitions for HOSTBUS */ 4527Sjchu #define OP_RESERVED 0x0 4627Sjchu #define OP_PIO 0x1 4727Sjchu #define OP_DMA 0x2 4827Sjchu #define OP_UNKNOWN 0xe 4927Sjchu 5027Sjchu /* Op definitions for MMU */ 5127Sjchu #define OP_RESERVED 0x0 5227Sjchu #define OP_XLAT 0x1 5327Sjchu #define OP_BYPASS 0x2 5427Sjchu #define OP_TBW 0x3 5527Sjchu #define OP_UNKNOWN 0xe 5627Sjchu 5727Sjchu /* Op definitions for INTR */ 5827Sjchu #define OP_RESERVED 0x0 5927Sjchu #define OP_MSI32 0x1 6027Sjchu #define OP_MSI64 0x2 6127Sjchu #define OP_MSIQ 0x3 6227Sjchu #define OP_PCIEMSG 0x4 63*11304SJanie.Lu@Sun.COM #define OP_FIXED 0x5 64*11304SJanie.Lu@Sun.COM #define OP_UNKNOWN 0xe 65*11304SJanie.Lu@Sun.COM 66*11304SJanie.Lu@Sun.COM /* Op definitions for PORT */ 67*11304SJanie.Lu@Sun.COM #define OP_RESERVED 0x0 68*11304SJanie.Lu@Sun.COM #define OP_PIO 0x1 69*11304SJanie.Lu@Sun.COM #define OP_DMA 0x2 70*11304SJanie.Lu@Sun.COM #define OP_LINK 0x3 7127Sjchu #define OP_UNKNOWN 0xe 7227Sjchu 7327Sjchu /* Phase definitons */ 7427Sjchu #define PH_RESERVED 0x0 7527Sjchu #define PH_ADDR 0x1 7627Sjchu #define PH_DATA 0x2 7727Sjchu #define PH_UNKNOWN 0xe 7827Sjchu #define PH_IRR 0xf 7927Sjchu 80*11304SJanie.Lu@Sun.COM /* Phase definitions for PORT/Link */ 81*11304SJanie.Lu@Sun.COM #define PH_FC 0x1 82*11304SJanie.Lu@Sun.COM 83*11304SJanie.Lu@Sun.COM 84*11304SJanie.Lu@Sun.COM /* Condition definitions for any major Block/Op/Phase */ 8527Sjchu #define CND_RESERVED 0x0 8627Sjchu #define CND_ILL 0x1 8727Sjchu #define CND_UNMAP 0x2 88*11304SJanie.Lu@Sun.COM #define CND_INT 0x3 89*11304SJanie.Lu@Sun.COM #define CND_UE 0x4 90*11304SJanie.Lu@Sun.COM #define CND_INV 0x6 9127Sjchu #define CND_UNKNOWN 0xe 9227Sjchu #define CND_IRR 0xf 9327Sjchu 94*11304SJanie.Lu@Sun.COM /* Additional condition definitions for INTR Block MSIQ phase */ 9527Sjchu #define CND_OV 0x5 9627Sjchu 97*11304SJanie.Lu@Sun.COM /* Additional condition definitions for MMU|INTR Block ADDR phase */ 98*11304SJanie.Lu@Sun.COM #define CND_PROT 0x5 99*11304SJanie.Lu@Sun.COM 100*11304SJanie.Lu@Sun.COM /* Additional condition definitions for DATA phase */ 10127Sjchu #define CND_TO 0x5 102*11304SJanie.Lu@Sun.COM 103*11304SJanie.Lu@Sun.COM /* Additional condition definitions for Port Link phase */ 104*11304SJanie.Lu@Sun.COM #define CND_RCA 0x7 105*11304SJanie.Lu@Sun.COM #define CND_RUR 0x8 106*11304SJanie.Lu@Sun.COM #define CND_UC 0x9 10727Sjchu 10827Sjchu /* Dir definitions for HOSTBUS & MMU */ 10927Sjchu #define DIR_RESERVED 0x0 11027Sjchu #define DIR_READ 0x1 11127Sjchu #define DIR_WRITE 0x2 11227Sjchu #define DIR_RDWR 0x3 11327Sjchu #define DIR_INGRESS 0x4 11427Sjchu #define DIR_EGRESS 0x5 11527Sjchu #define DIR_LINK 0x6 11627Sjchu #define DIR_UNKNOWN 0xe 11727Sjchu #define DIR_IRR 0xf 11827Sjchu 1193274Set142600 #define PX_FM_RC_UNRECOG "fire.epkt" 1203274Set142600 #define EPKT_SYSINO "sysino" 1213274Set142600 #define EPKT_EHDL "ehdl" 1223274Set142600 #define EPKT_STICK "stick" 123*11304SJanie.Lu@Sun.COM #define EPKT_DW0 "dw0" 124*11304SJanie.Lu@Sun.COM #define EPKT_DW1 "dw1" 125*11304SJanie.Lu@Sun.COM #define EPKT_DW2 "dw2" 126*11304SJanie.Lu@Sun.COM #define EPKT_DW3 "dw3" 127*11304SJanie.Lu@Sun.COM #define EPKT_DW4 "dw4" 1283274Set142600 #define EPKT_RC_DESCR "rc_descr" 1293274Set142600 #define EPKT_PEC_DESCR "pec_descr" 1303274Set142600 131*11304SJanie.Lu@Sun.COM #ifndef _ESC 13227Sjchu typedef struct root_complex { 13327Sjchu uint64_t sysino; 13427Sjchu uint64_t ehdl; 13527Sjchu uint64_t stick; 13627Sjchu struct { 137*11304SJanie.Lu@Sun.COM #if defined(_BIT_FIELDS_LTOH) 138*11304SJanie.Lu@Sun.COM uint32_t S : 1, /* Also the "Q" flag */ 139*11304SJanie.Lu@Sun.COM M : 1, 140*11304SJanie.Lu@Sun.COM D : 1, 141*11304SJanie.Lu@Sun.COM R : 1, 142*11304SJanie.Lu@Sun.COM H : 1, 143*11304SJanie.Lu@Sun.COM C : 1, 144*11304SJanie.Lu@Sun.COM I : 1, 145*11304SJanie.Lu@Sun.COM B : 1, 146*11304SJanie.Lu@Sun.COM : 3, 147*11304SJanie.Lu@Sun.COM STOP : 1, 148*11304SJanie.Lu@Sun.COM dir : 4, 149*11304SJanie.Lu@Sun.COM cond : 4, 150*11304SJanie.Lu@Sun.COM phase : 4, 151*11304SJanie.Lu@Sun.COM op : 4, 152*11304SJanie.Lu@Sun.COM block : 4; 153*11304SJanie.Lu@Sun.COM #elif defined(_BIT_FIELDS_HTOL) 15427Sjchu uint32_t block : 4, 15527Sjchu op : 4, 15627Sjchu phase : 4, 15727Sjchu cond : 4, 15827Sjchu dir : 4, 1593274Set142600 STOP : 1, 160*11304SJanie.Lu@Sun.COM : 3, 161*11304SJanie.Lu@Sun.COM B : 1, 162*11304SJanie.Lu@Sun.COM I : 1, 163*11304SJanie.Lu@Sun.COM C : 1, 16427Sjchu H : 1, 16527Sjchu R : 1, 16627Sjchu D : 1, 16727Sjchu M : 1, 168*11304SJanie.Lu@Sun.COM S : 1; /* Also the "Q" flag */ 169*11304SJanie.Lu@Sun.COM #else 170*11304SJanie.Lu@Sun.COM #error "bit field not defined" 171*11304SJanie.Lu@Sun.COM #endif 17227Sjchu } rc_descr; 173*11304SJanie.Lu@Sun.COM uint32_t size; /* Also the EQ Num */ 17427Sjchu uint64_t addr; 17527Sjchu uint64_t hdr[2]; 176*11304SJanie.Lu@Sun.COM uint64_t reserved; /* Contains Port */ 17727Sjchu } px_rc_err_t; 17827Sjchu 17927Sjchu typedef struct pec_block_err { 18027Sjchu uint64_t sysino; 18127Sjchu uint64_t ehdl; 18227Sjchu uint64_t stick; 18327Sjchu struct { 18427Sjchu uint32_t block : 4, 18527Sjchu rsvd1 : 12, 18627Sjchu dir : 4, 18727Sjchu : 3, 18827Sjchu Z : 1, 18927Sjchu S : 1, 19027Sjchu R : 1, 19127Sjchu I : 1, 19227Sjchu H : 1, 19327Sjchu C : 1, 19427Sjchu U : 1, 19527Sjchu E : 1, 19627Sjchu P : 1; 19727Sjchu } pec_descr; 19827Sjchu uint16_t pci_err_status; 19927Sjchu uint16_t pcie_err_status; 20027Sjchu uint32_t ce_reg_status; 20127Sjchu uint32_t ue_reg_status; 20227Sjchu uint64_t hdr[2]; 20327Sjchu uint32_t err_src_reg; 20427Sjchu uint32_t root_err_status; 20527Sjchu } px_pec_err_t; 206*11304SJanie.Lu@Sun.COM #endif /* _ESC */ 20727Sjchu 20827Sjchu #ifdef __cplusplus 20927Sjchu } 21027Sjchu #endif 21127Sjchu 21227Sjchu #endif /* _SYS_PX_ERR_H */ 213