Print this page
9210 remove KMDB branch debugging support
9211 ::crregs could do with cr2/cr3 support
9209 ::ttrace should be able to filter by thread
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>


   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.


  24  */
  25 
  26 #pragma ident   "%Z%%M% %I%     %E% SMI"
  27 
  28 #include <sys/types.h>
  29 #include <sys/kdi_impl.h>
  30 #include <sys/segments.h>
  31 #include <sys/cpuvar.h>
  32 
  33 #include <mdb/mdb_debug.h>
  34 #include <mdb/mdb_err.h>
  35 #include <mdb/mdb_umem.h>
  36 #include <kmdb/kmdb_dpi.h>
  37 #include <mdb/mdb.h>
  38 
  39 /*ARGSUSED*/
  40 void
  41 kmdb_kdi_stop_slaves(int my_cpuid, int doxc)
  42 {
  43         /* Stop other CPUs if there are CPUs to stop */
  44         mdb.m_kdi->mkdi_stop_slaves(my_cpuid, doxc);
  45 }
  46 
  47 void


  86 }
  87 
  88 void
  89 kmdb_kdi_deactivate(void)
  90 {
  91         mdb.m_kdi->mkdi_deactivate();
  92 }
  93 
  94 void
  95 kmdb_kdi_idt_switch(kdi_cpusave_t *cpusave)
  96 {
  97         mdb.m_kdi->mkdi_idt_switch(cpusave);
  98 }
  99 
 100 void
 101 kmdb_kdi_update_drreg(kdi_drreg_t *drreg)
 102 {
 103         mdb.m_kdi->mkdi_update_drreg(drreg);
 104 }
 105 
 106 void
 107 kmdb_kdi_set_debug_msrs(kdi_msr_t *msrs)
 108 {
 109         mdb.m_kdi->mkdi_set_debug_msrs(msrs);
 110 }
 111 
 112 void
 113 kmdb_kdi_memrange_add(caddr_t base, size_t len)
 114 {
 115         mdb.m_kdi->mkdi_memrange_add(base, len);
 116 }
 117 
 118 void
 119 kmdb_kdi_reboot(void)
 120 {
 121         mdb.m_kdi->mkdi_reboot();
 122 }


   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  *
  25  * Copyright 2018 Joyent, Inc.
  26  */
  27 


  28 #include <sys/types.h>
  29 #include <sys/kdi_impl.h>
  30 #include <sys/segments.h>
  31 #include <sys/cpuvar.h>
  32 
  33 #include <mdb/mdb_debug.h>
  34 #include <mdb/mdb_err.h>
  35 #include <mdb/mdb_umem.h>
  36 #include <kmdb/kmdb_dpi.h>
  37 #include <mdb/mdb.h>
  38 
  39 /*ARGSUSED*/
  40 void
  41 kmdb_kdi_stop_slaves(int my_cpuid, int doxc)
  42 {
  43         /* Stop other CPUs if there are CPUs to stop */
  44         mdb.m_kdi->mkdi_stop_slaves(my_cpuid, doxc);
  45 }
  46 
  47 void


  86 }
  87 
  88 void
  89 kmdb_kdi_deactivate(void)
  90 {
  91         mdb.m_kdi->mkdi_deactivate();
  92 }
  93 
  94 void
  95 kmdb_kdi_idt_switch(kdi_cpusave_t *cpusave)
  96 {
  97         mdb.m_kdi->mkdi_idt_switch(cpusave);
  98 }
  99 
 100 void
 101 kmdb_kdi_update_drreg(kdi_drreg_t *drreg)
 102 {
 103         mdb.m_kdi->mkdi_update_drreg(drreg);
 104 }
 105 






 106 void
 107 kmdb_kdi_memrange_add(caddr_t base, size_t len)
 108 {
 109         mdb.m_kdi->mkdi_memrange_add(base, len);
 110 }
 111 
 112 void
 113 kmdb_kdi_reboot(void)
 114 {
 115         mdb.m_kdi->mkdi_reboot();
 116 }