7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases * CDDL HEADER START
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases * The contents of this file are subject to the terms of the
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases * Common Development and Distribution License (the "License").
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases * You may not use this file except in compliance with the License.
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases * or http://www.opensolaris.org/os/licensing.
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases * See the License for the specific language governing permissions
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases * and limitations under the License.
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases * When distributing Covered Code, include this CDDL HEADER in each
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases * If applicable, add the following below this CDDL HEADER, with the
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases * fields enclosed by brackets "[]" replaced with your own identifying
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases * information: Portions Copyright [yyyy] [name of copyright owner]
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases * CDDL HEADER END
5cd376e8b7030707d78315f63adb4bb2b4d9963eJimmy Vetayases * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
41afdfa77f9af46beb3aaab2eccc0d9afe660d31Krishnendu Sadhukhan - Sun Microsystems#include <sys/apic_timer.h>
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasesstatic struct av_head avec_tbl[APIC_MAX_VECTOR+1];
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasesstatic apic_irq_t *irq_tbl[APIC_MAX_VECTOR+1], airq;
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases * Dump interrupt information for pcplusmp PSM.
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases/* ARGSUSED */
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasesinterrupt_dump_apic(uintptr_t addr, uint_t flags, int argc,
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases 'd', MDB_OPT_SETBITS, INTR_DISPLAY_DRVR_INST, &option_flags,
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases 'i', MDB_OPT_SETBITS, INTR_DISPLAY_INTRSTAT, &option_flags,
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases if (mdb_readvar(&irq_tbl, "apic_irq_table") == -1) {
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases if (mdb_readvar(&level_tbl, "apic_level_intr") == -1) {
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases if (mdb_readvar(&avec_tbl, "autovect") == -1) {
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases /* Print the header first */
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases "%<u>IRQ Vect IPL Bus Trg Type CPU Share APIC/INT# ");
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases mdb_printf("%s %</u>\n", option_flags & INTR_DISPLAY_DRVR_INST ?
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases /* Walk all the entries */
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases /* Read the entry */
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases apic_interrupt_dump(&airq, &avec_tbl[i], i, NULL, level_tbl[i]);
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases * MDB module linkage information:
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases * We declare a list of structures describing our dcmds, and a function
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases * named _mdb_init to return a pointer to our module information.
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases { "interrupts", "?[-di]", "print interrupts", interrupt_dump_apic,
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases { "softint", "?[-d]", "print soft interrupts", soft_interrupt_dump,
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases { "apic", NULL, "print apic register contents", apic },
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases { "ioapic", NULL, "print ioapic register contents", ioapic },
5cd376e8b7030707d78315f63adb4bb2b4d9963eJimmy Vetayases#endif /* _KMDB */
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayasesstatic const mdb_modinfo_t modinfo = { MDB_API_VERSION, dcmds, NULL };
7ff178cd8db129d385d3177eb20744d3b6efc59bJimmy Vetayases if (mdb_lookup_by_name("gld_intr", &sym) != -1)