fx_epkt.c revision 71b428bebcb3bd69d99d304083ab5f83cbd41bbe
/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <px_err.h>
#include "fabric-xlate.h"
typedef struct fab_epkt_tbl {
const char *tgt_class; /* Target Ereport Class */
static fab_epkt_tbl_t fab_epkt_tbl[] = {
PCIE_AER_UCE_CA, 0, PCI_STAT_S_TARG_AB, 0,
PCIE_AER_UCE_CA, 0, PCI_STAT_S_TARG_AB, 0,
PCIE_AER_UCE_CA, 0, PCI_STAT_S_TARG_AB, 0,
PCIE_AER_UCE_MTLP, PCI_STAT_S_SYSERR, 0, 0,
0, PCI_STAT_S_SYSERR, PCI_STAT_R_TARG_AB, 0,
0, PCI_STAT_S_SYSERR, PCI_STAT_R_MAST_AB, 0,
PCIE_AER_UCE_MTLP, PCI_STAT_S_SYSERR, 0, 0,
PCIE_AER_UCE_UC, PCI_STAT_S_SYSERR, 0, 0,
PCIE_AER_UCE_FCP, PCI_STAT_S_SYSERR, 0, 0,
0, 0, 0, 0, 0
};
/* ARGSUSED */
void
{
/* Always Root Complex */
}
static int
{
goto send;
}
return (0);
send:
/* Fill in PCI Status Register */
/* Fill in the device status register */
else
/* Fill in the AER UE register */
/* Fill in the AER Control register */
/* Send target ereports */
}
if (data->pcie_ue_tgt_trans)
B_TRUE);
}
return (1);
}
void
{
fab_data_t data = {0};
px_rc_err_t epkt = {0};
void *ptr;
int err;
if (err != 0) {
return;
}
/*
* If the least byte of the 'reserved' is non zero, it is device
* and function of the port
*/
case PCIE_TLP_TYPE_IO:
case PCIE_TLP_TYPE_MEM:
case PCIE_TLP_TYPE_MEMLK:
{
else
break;
}
case PCIE_TLP_TYPE_CFG0:
case PCIE_TLP_TYPE_CFG1:
{
break;
}
case PCIE_TLP_TYPE_CPL:
case PCIE_TLP_TYPE_CPLLK:
break;
}
/* find the root port to which this error is related */
if (data.pcie_ue_tgt_bdf)
}
/*
* reset the detector in the original ereport to the root port
*/
}
}