pcmu_pbm.c revision 25cf1a301a396c38e8adf52c15f537b80d2483f7
/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* CMU-CH PBM implementation:
* initialization
* Bus error interrupt handler
*/
#include <sys/sysmacros.h>
#include <sys/machsystm.h>
#include <sys/ddi_impldefs.h>
/*LINTLIBRARY*/
/* The nexus interrupt priority values */
void
{
int len;
/*
* Allocate a state structure for the PBM and cross-link it
* to its per pci node state structure.
*/
"pcmu_pbm_create: ctrl=%x, afsr=%x, afar=%x, diag=%x\n",
/*
* Register a function to disable pbm error interrupts during a panic.
*/
/*
* create the interrupt-priorities property if it doesn't
* already exist to provide a hint as to the PIL level for
* our interrupt.
*/
DDI_PROP_DONTPASS, "interrupt-priorities",
&len) != DDI_PROP_SUCCESS) {
/* Create the interrupt-priorities property. */
DDI_PROP_CANSLEEP, "interrupt-priorities",
}
}
int
{
int r = DDI_SUCCESS;
/*
* Install the PCI error interrupt handler.
*/
/*
* Create the pokefault mutex at the PIL below the error interrupt.
*/
}
void
{
/*
* Free the pokefault mutex.
*/
/*
* Remove the error interrupt.
*/
/*
* Remove the error disable function.
*/
/*
* Free the pbm state structure.
*/
}
static uint_t
{
/*
* ddi_poke protection, check nexus and children for
* expected errors.
*/
membar_sync();
(void *)pcmu_p, PCI_INTR_CALL);
} else if (pcmu_check_error(pcmu_p) != 0) {
/*
* unprotected error, check for all errors.
*/
if (pcmu_errtrig_pa) {
(void) ldphysio(pcmu_errtrig_pa);
}
(void *)pcmu_p, PCI_INTR_CALL);
}
if (err == DDI_FM_FATAL) {
if (pcmu_panic_on_fatal_errors) {
}
}
return (DDI_INTR_CLAIMED);
}
void
{
}
void
{
}
void
pcmu_pbm_intr_dist(void *arg)
{
}
/*
* Function used to log PBM AFSR register bits and to lookup and fault
* handle associated with PBM AFAR register. Called by
* pcmu_pbm_err_handler with pcmu_err_mutex held.
*/
int
{
int fatal = 0;
/* LINTED variable */
(void) pcmu_pbm_classify(pbm_err_p);
/*
* We are currently not dealing with the multiple error
* case, for any secondary errors we will panic.
*/
if (pcmu_pbm_classify(pbm_err_p)) {
fatal++;
}
if (fatal) {
return (DDI_FM_FATAL);
}
return (DDI_FM_NONFATAL);
}