2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
27 * Mach Operating System
28 * Copyright (c) 1991,1990 Carnegie Mellon University
29 * All Rights Reserved.
31 * Permission to use, copy, modify and distribute this software and its
32 * documentation is hereby granted, provided that both the copyright
33 * notice and this permission notice appear in all copies of the
34 * software, derivative works or modified versions, and any portions
35 * thereof, and that both notices appear in supporting documentation.
37 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
38 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
39 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
41 * Carnegie Mellon requests users of this software to return to
43 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
44 * School of Computer Science
45 * Carnegie Mellon University
46 * Pittsburgh PA 15213-3890
48 * any improvements or extensions that they make and grant Carnegie Mellon
49 * the rights to redistribute these changes.
55 * Interface to new debugger.
57 #include <platforms.h>
58 #include <time_stamp.h>
59 #include <mach_mp_debug.h>
60 #include <mach_ldebug.h>
62 #include <kern/cpu_number.h>
63 #include <kern/kern_types.h>
64 #include <kern/misc_protos.h>
67 #include <i386/thread.h>
68 #include <i386/db_machdep.h>
70 #include <i386/trap.h>
71 #include <i386/setjmp.h>
72 #include <i386/pmap.h>
73 #include <i386/misc_protos.h>
75 #include <mach/vm_param.h>
76 #include <vm/vm_map.h>
77 #include <kern/thread.h>
78 #include <kern/task.h>
80 #include <ddb/db_command.h>
81 #include <ddb/db_task_thread.h>
82 #include <ddb/db_run.h>
83 #include <ddb/db_trap.h>
84 #include <ddb/db_output.h>
85 #include <ddb/db_access.h>
86 #include <ddb/db_sym.h>
87 #include <ddb/db_break.h>
88 #include <ddb/db_watch.h>
91 struct i386_saved_state
*i386_last_saved_statep
;
92 struct i386_saved_state i386_nested_saved_state
;
93 unsigned i386_last_kdb_sp
;
95 extern thread_t db_default_act
;
96 extern pt_entry_t
*DMAP1
;
97 extern caddr_t DADDR1
;
100 extern int masked_state_cnt
[];
101 #endif /* MACH_MP_DEBUG */
104 * Enter KDB through a keyboard trap.
105 * We show the registers as of the keyboard interrupt
106 * instead of those at its call to KDB.
115 struct i386_interrupt_state
*is
;
118 extern char * trap_type
[];
119 extern int TRAP_TYPES
;
123 extern void kdbprinttrap(
128 extern void kdb_kentry(
129 struct int_regs
*int_regs
);
130 extern int db_user_to_kernel_address(
135 extern void db_write_bytes_user_space(
140 extern int db_search_null(
146 extern int kdb_enter(int);
147 extern void kdb_leave(void);
148 extern void lock_kdb(void);
149 extern void unlock_kdb(void);
152 * kdb_trap - field a TRACE or BPT trap
156 extern jmp_buf_t
*db_recover
;
159 * Translate the state saved in a task state segment into an
160 * exception frame. Since we "know" we always want the state
161 * in a ktss, we hard-wire that in, rather than indexing the gdt
162 * with tss_sel to derive a pointer to the desired tss.
167 struct i386_saved_state
*regs
)
169 extern struct i386_tss ktss
;
170 int mycpu
= cpu_number();
171 struct i386_tss
*tss
;
173 tss
= cpu_datap(mycpu
)->cpu_desc_index
.cdi_ktss
; /* XXX */
176 * ddb will overwrite whatever's in esp, so put esp0 elsewhere, too.
178 regs
->esp
= tss
->esp0
;
179 regs
->efl
= tss
->eflags
;
180 regs
->eip
= tss
->eip
;
181 regs
->trapno
= tss
->ss0
; /* XXX */
182 regs
->err
= tss
->esp0
; /* XXX */
183 regs
->eax
= tss
->eax
;
184 regs
->ecx
= tss
->ecx
;
185 regs
->edx
= tss
->edx
;
186 regs
->ebx
= tss
->ebx
;
187 regs
->uesp
= tss
->esp
;
188 regs
->ebp
= tss
->ebp
;
189 regs
->esi
= tss
->esi
;
190 regs
->edi
= tss
->edi
;
200 * Compose a call to the debugger from the saved state in regs. (No
201 * reason not to do this in C.)
205 struct i386_saved_state
*regs
)
212 return (kdb_trap(type
, code
, regs
));
219 struct i386_saved_state
*regs
)
222 boolean_t trap_from_user
;
226 case T_DEBUG
: /* single_step */
228 extern int dr_addr
[];
232 if (status
& 0xf) { /* hmm hdw break */
233 addr
= status
& 0x8 ? dr_addr
[3] :
234 status
& 0x4 ? dr_addr
[2] :
235 status
& 0x2 ? dr_addr
[1] :
238 db_single_step_cmd(addr
, 0, 1, "p");
241 case T_INT3
: /* breakpoint */
242 case T_WATCHPOINT
: /* watchpoint */
243 case -1: /* keyboard interrupt */
248 i386_nested_saved_state
= *regs
;
249 db_printf("Caught ");
250 if (type
< 0 || type
> TRAP_TYPES
)
251 db_printf("type %d", type
);
253 db_printf("%s", trap_type
[type
]);
254 db_printf(" trap, code = %x, pc = %x\n",
260 kdbprinttrap(type
, code
, (int *)®s
->eip
, regs
->uesp
);
263 disable_preemption();
265 current_cpu_datap()->cpu_kdb_saved_ipl
= s
;
266 current_cpu_datap()->cpu_kdb_saved_state
= regs
;
268 i386_last_saved_statep
= regs
;
269 i386_last_kdb_sp
= (unsigned) &type
;
271 if (!kdb_enter(regs
->eip
))
274 /* Should switch to kdb's own stack here. */
276 if (!IS_USER_TRAP(regs
, &etext
)) {
277 bzero((char *)&ddb_regs
, sizeof (ddb_regs
));
278 *(struct i386_saved_state_from_kernel
*)&ddb_regs
=
279 *(struct i386_saved_state_from_kernel
*)regs
;
280 trap_from_user
= FALSE
;
284 trap_from_user
= TRUE
;
286 if (!trap_from_user
) {
288 * Kernel mode - esp and ss not saved
290 ddb_regs
.uesp
= (int)®s
->uesp
; /* kernel stack pointer */
291 ddb_regs
.ss
= KERNEL_DS
;
295 db_task_trap(type
, code
, trap_from_user
);
298 regs
->eip
= ddb_regs
.eip
;
299 regs
->efl
= ddb_regs
.efl
;
300 regs
->eax
= ddb_regs
.eax
;
301 regs
->ecx
= ddb_regs
.ecx
;
302 regs
->edx
= ddb_regs
.edx
;
303 regs
->ebx
= ddb_regs
.ebx
;
304 if (trap_from_user
) {
306 * user mode - saved esp and ss valid
308 regs
->uesp
= ddb_regs
.uesp
; /* user stack pointer */
309 regs
->ss
= ddb_regs
.ss
& 0xffff; /* user stack segment */
311 regs
->ebp
= ddb_regs
.ebp
;
312 regs
->esi
= ddb_regs
.esi
;
313 regs
->edi
= ddb_regs
.edi
;
314 regs
->es
= ddb_regs
.es
& 0xffff;
315 regs
->cs
= ddb_regs
.cs
& 0xffff;
316 regs
->ds
= ddb_regs
.ds
& 0xffff;
317 regs
->fs
= ddb_regs
.fs
& 0xffff;
318 regs
->gs
= ddb_regs
.gs
& 0xffff;
320 if ((type
== T_INT3
) &&
321 (db_get_task_value(regs
->eip
,
324 db_target_space(current_thread(),
327 regs
->eip
+= BKPT_SIZE
;
332 current_cpu_datap()->cpu_kdb_saved_state
= 0;
335 current_cpu_datap()->cpu_masked_state_cnt
= 0;
336 #endif /* MACH_MP_DEBUG */
342 /* Allow continue to upper layers of exception handling if
343 * trap was not a debugging trap.
346 if (trap_from_user
&& type
!= T_DEBUG
&& type
!= T_INT3
347 && type
!= T_WATCHPOINT
)
354 * Enter KDB through a keyboard trap.
355 * We show the registers as of the keyboard interrupt
356 * instead of those at its call to KDB.
363 struct int_regs
*int_regs
)
366 boolean_t trap_from_user
;
367 struct i386_interrupt_state
*is
= int_regs
->is
;
368 struct i386_saved_state regs
;
374 if (IS_USER_TRAP(is
, &etext
))
376 regs
.uesp
= ((int *)(is
+1))[0];
377 regs
.ss
= ((int *)(is
+1))[1];
381 regs
.uesp
= (int)(is
+1);
389 regs
.ebx
= int_regs
->ebx
;
390 regs
.ebp
= int_regs
->ebp
;
391 regs
.esi
= int_regs
->esi
;
392 regs
.edi
= int_regs
->edi
;
395 regs
.fs
= int_regs
->fs
;
396 regs
.gs
= int_regs
->gs
;
398 disable_preemption();
400 current_cpu_datap()->cpu_kdb_saved_state
= ®s
;
402 if (!kdb_enter(regs
.eip
))
405 bcopy((char *)®s
, (char *)&ddb_regs
, sizeof (ddb_regs
));
406 trap_from_user
= IS_USER_TRAP(&ddb_regs
, &etext
);
409 db_task_trap(-1, 0, trap_from_user
);
412 if (trap_from_user
) {
413 ((int *)(is
+1))[0] = ddb_regs
.uesp
;
414 ((int *)(is
+1))[1] = ddb_regs
.ss
& 0xffff;
416 is
->efl
= ddb_regs
.efl
;
417 is
->cs
= ddb_regs
.cs
& 0xffff;
418 is
->eip
= ddb_regs
.eip
;
419 is
->eax
= ddb_regs
.eax
;
420 is
->ecx
= ddb_regs
.ecx
;
421 is
->edx
= ddb_regs
.edx
;
422 int_regs
->ebx
= ddb_regs
.ebx
;
423 int_regs
->ebp
= ddb_regs
.ebp
;
424 int_regs
->esi
= ddb_regs
.esi
;
425 int_regs
->edi
= ddb_regs
.edi
;
426 is
->ds
= ddb_regs
.ds
& 0xffff;
427 is
->es
= ddb_regs
.es
& 0xffff;
428 int_regs
->fs
= ddb_regs
.fs
& 0xffff;
429 int_regs
->gs
= ddb_regs
.gs
& 0xffff;
433 current_cpu_datap()->cpu_kdb_saved_state
= 0;
452 if (type
< 0 || type
> TRAP_TYPES
)
453 db_printf("type %d", type
);
455 db_printf("%s", trap_type
[type
]);
456 db_printf(" trap, code=%x eip@%x = %x esp=%x\n",
457 code
, pc
, *(int *)pc
, sp
);
458 db_run_mode
= STEP_CONTINUE
;
462 db_user_to_kernel_address(
468 register pt_entry_t
*ptp
;
470 ptp
= pmap_pte(task
->map
->pmap
, addr
);
471 if (ptp
== PT_ENTRY_NULL
|| (*ptp
& INTEL_PTE_VALID
) == 0) {
473 db_printf("\nno memory is assigned to address %08x\n", addr
);
480 src
= (vm_offset_t
)pte_to_pa(*ptp
);
481 *(int *) DMAP1
= INTEL_PTE_VALID
| INTEL_PTE_RW
| (src
& PG_FRAME
) |
482 INTEL_PTE_REF
| INTEL_PTE_MOD
;
483 #if defined(I386_CPU)
484 if (cpu_class
== CPUCLASS_386
) {
489 invlpg((u_int
)DADDR1
);
492 *kaddr
= (unsigned)DADDR1
+ (addr
& PAGE_MASK
);
498 * Read bytes from kernel address space for debugger.
513 if (task
== kernel_task
|| task
== TASK_NULL
) {
514 while (--size
>= 0) {
515 if (addr
++ > VM_MAX_KERNEL_ADDRESS
) {
516 db_printf("\nbad address %x\n", addr
);
525 if (db_user_to_kernel_address(task
, addr
, &kern_addr
, 1) < 0)
527 src
= (char *)kern_addr
;
528 n
= intel_trunc_page(addr
+INTEL_PGBYTES
) - addr
;
539 * Write bytes to kernel address space for debugger.
551 register pt_entry_t
*ptep0
= 0;
552 pt_entry_t oldmap0
= 0;
554 register pt_entry_t
*ptep1
= 0;
555 pt_entry_t oldmap1
= 0;
558 if (task
&& task
!= kernel_task
) {
559 db_write_bytes_user_space(addr
, size
, data
, task
);
564 if (addr
>= VM_MIN_KERNEL_LOADED_ADDRESS
) {
565 db_write_bytes_user_space(addr
, size
, data
, kernel_task
);
569 if (addr
>= VM_MIN_KERNEL_ADDRESS
&&
570 addr
<= (vm_offset_t
)&etext
)
572 ptep0
= pmap_pte(kernel_pmap
, addr
);
574 *ptep0
|= INTEL_PTE_WRITE
;
576 addr1
= i386_trunc_page(addr
+ size
- 1);
577 if (i386_trunc_page(addr
) != addr1
) {
578 /* data crosses a page boundary */
580 ptep1
= pmap_pte(kernel_pmap
, addr1
);
582 *ptep1
|= INTEL_PTE_WRITE
;
589 while (--size
>= 0) {
590 if (addr
++ > VM_MAX_KERNEL_ADDRESS
) {
591 db_printf("\nbad address %x\n", addr
);
608 db_write_bytes_user_space(
619 if (db_user_to_kernel_address(task
, addr
, &kern_addr
, 1) < 0)
621 dst
= (char *)kern_addr
;
622 n
= intel_trunc_page(addr
+INTEL_PGBYTES
) - addr
;
641 if (task
== kernel_task
|| task
== TASK_NULL
) {
642 if (kernel_task
== TASK_NULL
)
645 } else if (task
== TASK_NULL
) {
646 if (current_thread() == THREAD_NULL
)
648 task
= current_thread()->task
;
651 if (db_user_to_kernel_address(task
, addr
, &kern_addr
, 0) < 0)
653 n
= intel_trunc_page(addr
+INTEL_PGBYTES
) - addr
;
669 unsigned kern_addr1
, kern_addr2
;
671 if ((addr1
& (INTEL_PGBYTES
-1)) != (addr2
& (INTEL_PGBYTES
-1)))
673 if (task1
== TASK_NULL
) {
674 if (current_thread() == THREAD_NULL
)
676 task1
= current_thread()->task
;
678 if (db_user_to_kernel_address(task1
, addr1
, &kern_addr1
, 0) < 0 ||
679 db_user_to_kernel_address(task2
, addr2
, &kern_addr2
, 0) < 0)
681 return(kern_addr1
== kern_addr2
);
684 #define DB_USER_STACK_ADDR (VM_MIN_KERNEL_ADDRESS)
685 #define DB_NAME_SEARCH_LIMIT (DB_USER_STACK_ADDR-(INTEL_PGBYTES*3))
695 register unsigned vaddr
;
696 register unsigned *kaddr
;
698 kaddr
= (unsigned *)*skaddr
;
699 for (vaddr
= *svaddr
; vaddr
> evaddr
; vaddr
-= sizeof(unsigned)) {
700 if (vaddr
% INTEL_PGBYTES
== 0) {
701 vaddr
-= sizeof(unsigned);
702 if (db_user_to_kernel_address(task
, vaddr
, skaddr
, 0) < 0)
704 kaddr
= (unsigned *)*skaddr
;
706 vaddr
-= sizeof(unsigned);
709 if ((*kaddr
== 0) ^ (flag
== 0)) {
711 *skaddr
= (unsigned)kaddr
;
724 unsigned vaddr
, kaddr
;
726 vaddr
= DB_USER_STACK_ADDR
;
730 * skip nulls at the end
732 if (db_search_null(task
, &vaddr
, DB_NAME_SEARCH_LIMIT
, &kaddr
, 0) < 0) {
733 db_printf(DB_NULL_TASK_NAME
);
737 * search start of args
739 if (db_search_null(task
, &vaddr
, DB_NAME_SEARCH_LIMIT
, &kaddr
, 1) < 0) {
740 db_printf(DB_NULL_TASK_NAME
);
744 n
= DB_TASK_NAME_LEN
-1;
745 p
= (char *)kaddr
+ sizeof(unsigned);
746 for (vaddr
+= sizeof(int); vaddr
< DB_USER_STACK_ADDR
&& n
> 0;
748 if (vaddr
% INTEL_PGBYTES
== 0) {
749 (void)db_user_to_kernel_address(task
, vaddr
, &kaddr
, 0);
752 db_printf("%c", (*p
< ' ' || *p
> '~')? ' ': *p
);
754 while (n
-- >= 0) /* compare with >= 0 for one more space */
759 * Code used to synchronize kdb among all cpus, one active at a time, switch
760 * from on to another using kdb_on! #cpu or cpu #cpu
763 decl_simple_lock_data(, kdb_lock
) /* kdb lock */
765 #define db_simple_lock_init(l, e) hw_lock_init(&((l)->interlock))
766 #define db_simple_lock_try(l) hw_lock_try(&((l)->interlock))
767 #define db_simple_unlock(l) hw_lock_unlock(&((l)->interlock))
769 int kdb_cpu
= -1; /* current cpu running kdb */
771 volatile unsigned int cpus_holding_bkpts
; /* counter for number of cpus holding
772 breakpoints (ie: cpus that did not
773 insert back breakpoints) */
774 extern boolean_t db_breakpoints_inserted
;
777 db_machdep_init(void)
781 db_simple_lock_init(&kdb_lock
, 0);
782 for (c
= 0; c
< real_ncpus
; ++c
) {
783 db_stacks
[c
] = (vm_offset_t
) (db_stack_store
+
784 (INTSTACK_SIZE
* (c
+ 1)) - sizeof (natural_t
));
785 if (c
== master_cpu
) {
786 dbtss
.esp0
= (int)(db_task_stack_store
+
787 (INTSTACK_SIZE
* (c
+ 1)) - sizeof (natural_t
));
788 dbtss
.esp
= dbtss
.esp0
;
789 dbtss
.eip
= (int)&db_task_start
;
791 * The TSS for the debugging task on each slave CPU
792 * is set up in mp_desc_init().
799 * Called when entering kdb:
800 * Takes kdb lock. If if we were called remotely (slave state) we just
801 * wait for kdb_cpu to be equal to cpu_number(). Otherwise enter kdb if
802 * not active on another cpu.
803 * If db_pass_thru[cpu_number()] > 0, then kdb can't stop now.
812 disable_preemption();
814 mycpu
= cpu_number();
816 if (current_cpu_datap()->cpu_db_pass_thru
) {
821 current_cpu_datap()->cpu_kdb_active
++;
825 db_printf("kdb_enter: cpu %d, is_slave %d, kdb_cpu %d, run mode %d pc %x (%x) holds %d\n",
826 my_cpu
, current_cpu_datap()->cpu_kdb_is_slave
, kdb_cpu
,
827 db_run_mode
, pc
, *(int *)pc
, cpus_holding_bkpts
);
828 if (db_breakpoints_inserted
)
829 cpus_holding_bkpts
++;
830 if (kdb_cpu
== -1 && !current_cpu_datap()->cpu_kdb_is_slave
) {
832 remote_kdb(); /* stop other cpus */
834 } else if (kdb_cpu
== my_cpu
)
849 boolean_t wait
= FALSE
;
851 disable_preemption();
853 my_cpu
= cpu_number();
855 if (db_run_mode
== STEP_CONTINUE
) {
859 if (db_breakpoints_inserted
)
860 cpus_holding_bkpts
--;
861 if (current_cpu_datap()->cpu_kdb_is_slave
)
862 current_cpu_datap()->cpu_kdb_is_slave
--;
864 db_printf("kdb_leave: cpu %d, kdb_cpu %d, run_mode %d pc %x (%x) holds %d\n",
865 my_cpu
, kdb_cpu
, db_run_mode
,
866 ddb_regs
.eip
, *(int *)ddb_regs
.eip
,
870 current_cpu_datap()->cpu_kdb_active
--;
875 while(cpus_holding_bkpts
);
884 extern void kdb_console(void);
886 disable_preemption();
888 my_cpu
= cpu_number();
892 if (kdb_cpu
!= -1 && kdb_cpu
!= my_cpu
) {
895 if (db_simple_lock_try(&kdb_lock
)) {
896 if (kdb_cpu
== -1 || kdb_cpu
== my_cpu
)
898 db_simple_unlock(&kdb_lock
);
906 extern unsigned old_time_stamp
;
907 #endif /* TIME_STAMP */
912 db_simple_unlock(&kdb_lock
);
915 #endif /* TIME_STAMP */
920 #define KDB_SAVE(type, name) extern type name; type name##_save = name
921 #define KDB_RESTORE(name) name = name##_save
923 #define KDB_SAVE(type, name) extern type name; type name/**/_save = name
924 #define KDB_RESTORE(name) name = name/**/_save
925 #endif /* __STDC__ */
927 #define KDB_SAVE_CTXT() \
928 KDB_SAVE(int, db_run_mode); \
929 KDB_SAVE(boolean_t, db_sstep_print); \
930 KDB_SAVE(int, db_loop_count); \
931 KDB_SAVE(int, db_call_depth); \
932 KDB_SAVE(int, db_inst_count); \
933 KDB_SAVE(int, db_last_inst_count); \
934 KDB_SAVE(int, db_load_count); \
935 KDB_SAVE(int, db_store_count); \
936 KDB_SAVE(boolean_t, db_cmd_loop_done); \
937 KDB_SAVE(jmp_buf_t *, db_recover); \
938 KDB_SAVE(db_addr_t, db_dot); \
939 KDB_SAVE(db_addr_t, db_last_addr); \
940 KDB_SAVE(db_addr_t, db_prev); \
941 KDB_SAVE(db_addr_t, db_next); \
942 KDB_SAVE(db_regs_t, ddb_regs);
944 #define KDB_RESTORE_CTXT() \
945 KDB_RESTORE(db_run_mode); \
946 KDB_RESTORE(db_sstep_print); \
947 KDB_RESTORE(db_loop_count); \
948 KDB_RESTORE(db_call_depth); \
949 KDB_RESTORE(db_inst_count); \
950 KDB_RESTORE(db_last_inst_count); \
951 KDB_RESTORE(db_load_count); \
952 KDB_RESTORE(db_store_count); \
953 KDB_RESTORE(db_cmd_loop_done); \
954 KDB_RESTORE(db_recover); \
955 KDB_RESTORE(db_dot); \
956 KDB_RESTORE(db_last_addr); \
957 KDB_RESTORE(db_prev); \
958 KDB_RESTORE(db_next); \
959 KDB_RESTORE(ddb_regs);
962 * switch to another cpu
970 if (cpu
< 0 || cpu
>= real_ncpus
|| !cpu_datap(cpu
)->cpu_kdb_active
)
972 db_set_breakpoints();
973 db_set_watchpoints();
977 db_clear_breakpoints();
978 db_clear_watchpoints();
980 if (kdb_cpu
== -1) {/* someone continued */
981 kdb_cpu
= cpu_number();
982 db_continue_cmd(0, 0, 0, "");
992 boolean_t reboot
= TRUE
;
996 while ((c
= *cp
++) != 0) {
997 if (c
== 'r') /* reboot */
999 if (c
== 'h') /* halt */
1002 halt_all_cpus(reboot
);