/*
* 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
*/
/*
*/
#include "intr_common.h"
#include <sys/multidata.h>
int option_flags;
static char *businfo_array[] = {
" ",
"CBUS",
"CBUSII",
"EISA",
"FUTURE",
"INTERN",
"ISA",
"MBI",
"MBII",
"PCIe",
"MPI",
"MPSA",
"NUBUS",
"PCI",
"PCMCIA",
"TC",
"VL",
"VME",
"XPRESS",
" "
};
void
interrupt_help(void)
{
mdb_printf("Prints the interrupt usage on the system.\n"
"By default, only interrupt service routine names are printed.\n\n"
"Switches:\n"
" -d instead of ISR, print <driver_name><instance#>\n"
" -i show like intrstat, cpu# ISR/<driver_name><instance#>\n");
}
void
soft_interrupt_help(void)
{
mdb_printf("Prints the soft interrupt usage on the system.\n"
"By default, only interrupt service routine names are printed.\n\n"
"Switch:\n"
" -d instead of ISR, print <driver_name><instance#>\n");
}
/*
* This is copied from avintr.c
* NOTE: Ensure that this definition stays in sync
*/
typedef struct av_softinfo {
/* ARGSUSED */
int
{
int i;
option_flags = 0;
return (DCMD_USAGE);
mdb_warn("failed to read autovect");
return (DCMD_ERR);
}
/* Print the header first */
mdb_printf("%<u>ADDR PEND PIL ARG1 "
"ARG2 ISR(s)%</u>\n");
/* Walk all the entries */
for (i = 0; i < LOCK_LEVEL + 1; i++) {
/* Read the entry, if invalid continue */
continue;
do {
continue;
/* Print each soft interrupt entry */
mdb_printf("%-16p %-2d %-2d %-16p %-16p",
mdb_printf("\n");
}
return (DCMD_OK);
}
void
{
/*
* figure out the real ISR function name from gld_intr()
*/
if (isr_addr == gld_intr_addr) {
/* verify gld data structure and get the real ISR */
}
}
sizeof (drvr_name)) == 0) {
} else {
}
} else {
}
}
/*
* get_interrupt_type:
*
* Get some interrupt related useful information
*
*/
static char *
{
if (index == RESERVE_INDEX)
return ("IPI");
else if (index == ACPI_INDEX)
return ("Fixed");
return ("MSI");
else if (index == MSIX_INDEX)
return ("MSI-X");
else
return ("Fixed");
}
static char *
{
if (type == APIX_TYPE_IPI)
return ("IPI");
else if (type == APIX_TYPE_FIXED)
return ("Fixed");
else if (type == APIX_TYPE_MSI)
return ("MSI");
else if (type == APIX_TYPE_MSIX)
return ("MSI-X");
else
return ("Fixed");
}
void
{
int bus_type;
int j;
char *intr_type;
/* If invalid index; continue */
if (!irqp->airq_mps_intr_index ||
return;
/* Figure out interrupt type and trigger information */
/* Figure out IOAPIC number and ILINE number */
else {
else
} else
}
evtchn[0] = '\0';
} else {
}
/* Print each interrupt entry */
else
mdb_printf("%-3d 0x%x %s%-3s %-6s %-3s %-6s %-4s%-3d %-9s ",
/* If valid dip found; print driver name */
/*
* Loop thru all the shared IRQs
*/
if (irqp->airq_share)
j < irqp->airq_share; j++) {
mdb_printf(", ");
} else {
break;
}
}
} else {
!irqp->airq_share)
mdb_printf("poke_cpu");
}
mdb_printf("\n");
}
void
{
int j;
int bus_type;
char *intr_type;
/* If invalid vector state; continue */
return;
/* use apic_interrupt_ipi_dump for IPIs */
return;
/* Figure out interrupt type and trigger information */
/* Figure out IOAPIC number and ILINE number */
else
/* statically assign MSI/X with "PCI" */
} else {
else
} else
}
evtchn[0] = '\0';
/* Loop all the shared vectors */
/* shared interrupts with one or more ISR removed afterwards */
break;
else
continue;
}
/* Print each interrupt entry */
else
mdb_printf("%-9s %-3s %s%-3s %-6s %-3s %-6s %-3d "
mdb_printf("\n");
break; /* done */
break;
}
}
void
{
/* If invalid vector state; continue */
return;
return;
/* No IOAPIC number and ILINE number info */
evtchn[0] = '\0';
/* IPI targeted ALL cpus */
/* IPI is not shared interrupt, so we can get the IPL from v_pri */
/* Print each interrupt entry */
else
mdb_printf("%-9s %-3s %s%-3s %-6s %-3s %-6s %-3d %-9s ",
mdb_printf("poke_cpu");
else
mdb_printf("\n");
}