13446Smrj /* 23446Smrj * CDDL HEADER START 33446Smrj * 43446Smrj * The contents of this file are subject to the terms of the 53446Smrj * Common Development and Distribution License (the "License"). 63446Smrj * You may not use this file except in compliance with the License. 73446Smrj * 83446Smrj * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 93446Smrj * or http://www.opensolaris.org/os/licensing. 103446Smrj * See the License for the specific language governing permissions 113446Smrj * and limitations under the License. 123446Smrj * 133446Smrj * When distributing Covered Code, include this CDDL HEADER in each 143446Smrj * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 153446Smrj * If applicable, add the following below this CDDL HEADER, with the 163446Smrj * fields enclosed by brackets "[]" replaced with your own identifying 173446Smrj * information: Portions Copyright [yyyy] [name of copyright owner] 183446Smrj * 193446Smrj * CDDL HEADER END 203446Smrj */ 213446Smrj /* 22*12825SJimmy.Vetayases@oracle.com * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 233446Smrj */ 243446Smrj 253446Smrj #ifndef _MDB_INTR_COMMON_H 263446Smrj #define _MDB_INTR_COMMON_H 273446Smrj 283446Smrj #ifdef __cplusplus 293446Smrj extern "C" { 303446Smrj #endif 313446Smrj 323446Smrj #include <stddef.h> 333446Smrj #include <sys/mdb_modapi.h> 343446Smrj #include <mdb/mdb_ks.h> 353446Smrj #include <sys/modctl.h> 363446Smrj #include <sys/avintr.h> 373446Smrj #include <sys/psm_common.h> 383446Smrj #include <sys/pic.h> 393446Smrj #include <sys/apic.h> 4012683SJimmy.Vetayases@oracle.com #include <sys/apix.h> 413446Smrj 423446Smrj /* 433446Smrj * Function prototypes 443446Smrj */ 453446Smrj void interrupt_help(void); 463446Smrj void interrupt_print_isr(uintptr_t, uintptr_t, uintptr_t); 473446Smrj void apic_interrupt_dump(apic_irq_t *, struct av_head *, int i, 483446Smrj ushort_t *, char); 4912683SJimmy.Vetayases@oracle.com void apix_interrupt_dump(apix_vector_t *, apic_irq_t *, 5012683SJimmy.Vetayases@oracle.com struct autovec *, ushort_t *, char); 5112683SJimmy.Vetayases@oracle.com void apix_interrupt_ipi_dump(apix_vector_t *, struct autovec *, 5212683SJimmy.Vetayases@oracle.com ushort_t *); 5312683SJimmy.Vetayases@oracle.com int ioapic(uintptr_t, uint_t, int, const mdb_arg_t *); 5412683SJimmy.Vetayases@oracle.com int apic(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv); 553446Smrj 563446Smrj void soft_interrupt_help(void); 573446Smrj int soft_interrupt_dump(uintptr_t, uint_t, int, const mdb_arg_t *); 583446Smrj 593446Smrj /* 603446Smrj * ::interrupts usage related defines and variables 613446Smrj * -d and -i options are supported and saved in option_flags 623446Smrj */ 633446Smrj #define INTR_DISPLAY_DRVR_INST 0x1 /* -d option */ 643446Smrj #define INTR_DISPLAY_INTRSTAT 0x2 /* -i option */ 653446Smrj 663446Smrj extern int option_flags; 673446Smrj 6812683SJimmy.Vetayases@oracle.com #define BUSTYPE_PCI 0x0d 6912683SJimmy.Vetayases@oracle.com #define BUSTYPE_NONE 0x00 7012683SJimmy.Vetayases@oracle.com 713446Smrj /* 723446Smrj * gld_intr_addr is used to save address of gld_intr() ISR 733446Smrj */ 743446Smrj extern uintptr_t gld_intr_addr; 753446Smrj 763446Smrj #ifdef __cplusplus 773446Smrj } 783446Smrj #endif 793446Smrj 803446Smrj #endif /* _MDB_INTR_COMMON_H */ 81