71 #include <sys/types.h>
72 #include <sys/segments.h>
73 #include <sys/trap.h>
74 #include <sys/cpuvar.h>
75 #include <sys/reboot.h>
76 #include <sys/sunddi.h>
77 #include <sys/archsystm.h>
78 #include <sys/kdi_impl.h>
79 #include <sys/x_call.h>
80 #include <ia32/sys/psw.h>
81 #include <vm/hat_i86.h>
82
83 #define KDI_GATE_NVECS 3
84
85 #define KDI_IDT_NOSAVE 0
86 #define KDI_IDT_SAVE 1
87
88 #define KDI_IDT_DTYPE_KERNEL 0
89 #define KDI_IDT_DTYPE_BOOT 1
90
91 kdi_cpusave_t *kdi_cpusave;
92 int kdi_ncpusave;
93
94 static kdi_main_t kdi_kmdb_main;
95
96 kdi_drreg_t kdi_drreg;
97
98 #ifndef __amd64
99 /* Used to track the current set of valid kernel selectors. */
100 uint32_t kdi_cs;
101 uint32_t kdi_ds;
102 uint32_t kdi_fs;
103 uint32_t kdi_gs;
104 #endif
105
106 uintptr_t kdi_kernel_handler;
107
108 int kdi_trap_switch;
109
110 #define KDI_MEMRANGES_MAX 2
|
71 #include <sys/types.h>
72 #include <sys/segments.h>
73 #include <sys/trap.h>
74 #include <sys/cpuvar.h>
75 #include <sys/reboot.h>
76 #include <sys/sunddi.h>
77 #include <sys/archsystm.h>
78 #include <sys/kdi_impl.h>
79 #include <sys/x_call.h>
80 #include <ia32/sys/psw.h>
81 #include <vm/hat_i86.h>
82
83 #define KDI_GATE_NVECS 3
84
85 #define KDI_IDT_NOSAVE 0
86 #define KDI_IDT_SAVE 1
87
88 #define KDI_IDT_DTYPE_KERNEL 0
89 #define KDI_IDT_DTYPE_BOOT 1
90
91 /* Solely to keep kdiregs_t in the CTF, otherwise unused. */
92 kdiregs_t kdi_regs;
93
94 kdi_cpusave_t *kdi_cpusave;
95 int kdi_ncpusave;
96
97 static kdi_main_t kdi_kmdb_main;
98
99 kdi_drreg_t kdi_drreg;
100
101 #ifndef __amd64
102 /* Used to track the current set of valid kernel selectors. */
103 uint32_t kdi_cs;
104 uint32_t kdi_ds;
105 uint32_t kdi_fs;
106 uint32_t kdi_gs;
107 #endif
108
109 uintptr_t kdi_kernel_handler;
110
111 int kdi_trap_switch;
112
113 #define KDI_MEMRANGES_MAX 2
|