void cp_autostart(void) { char autostart[256]; int dt, as; switch(sysconfig_get_autostart_mode()) { case SC_AUTOSTART_NONE: break; case SC_AUTOSTART_SIMPLE: sysconfig_get_autostart_mode_simple(&dt, &as); start_performance(1, dt, as); break; case SC_AUTOSTART_FILE: sysconfig_get_autostart(autostart); if(autostart[0] == 0) { messagebox("Autostart failed", "No performance file specified."); fb_unblank(); return; } if(!config_load(autostart)) { messagebox("Autostart failed", "Unable to load the specified performance file.\nCheck the 'Autostart' section in the 'System settings' dialog box."); fb_unblank(); return; } on_config_change(); update_title_default_config(autostart); start_performance(0, 0, 0); break; } }
static void prom_cnpollc(dev_t dev, int on) { if (on) { /* Entering debugger. */ #if NFB > 0 fb_unblank(); #endif } else { /* Resuming kernel. */ } }
void prom_cnpollc(dev_t dev, int on) { if (on) { /* Entering debugger. */ fb_unblank(); } else { /* Resuming kernel. */ } #if NPCONS > 0 pcons_cnpollc(dev, on); #endif }
/* * kdb_trap - field a TRACE or BPT trap */ int kdb_trap(int type, struct trapframe64 *tf) { int s; extern int trap_trace_dis; extern int doing_shutdown; trap_trace_dis++; doing_shutdown++; #if NFB > 0 fb_unblank(); #endif switch (type) { case T_BREAKPOINT: /* breakpoint */ break; case -1: /* keyboard interrupt */ printf("kdb tf=%p\n", tf); break; default: if (!db_onpanic && db_recover==0) return (0); printf("kernel trap %x: %s\n", type, trap_type[type & 0x1ff]); if (db_recover != 0) { prom_abort(); db_error("Faulted in DDB; continuing...\n"); prom_abort(); /*NOTREACHED*/ } db_recover = (label_t *)1; } /* Should switch to kdb`s own stack here. */ write_all_windows(); #if defined(MULTIPROCESSOR) if (!db_suspend_others()) { ddb_suspend(tf); return 1; } #endif /* Initialise local dbregs storage from trap frame */ fill_ddb_regs_from_tf(tf); s = splhigh(); db_active++; cnpollc(TRUE); /* Need to do spl stuff till cnpollc works */ db_dump_ts(0, 0, 0, 0); db_trap(type, 0/*code*/); ddb_restore_state(); cnpollc(FALSE); db_active--; splx(s); *tf = DDB_REGS->db_tf; curcpu()->ci_ddb_regs = NULL; trap_trace_dis--; doing_shutdown--; #if defined(MULTIPROCESSOR) db_resume_others(); #endif return (1); }
/* * kdb_trap - field a TRACE or BPT trap */ int kdb_trap(int type, struct trapframe *tf) { db_regs_t dbregs; int s; #if NFB > 0 fb_unblank(); #endif switch (type) { case T_BREAKPOINT: /* breakpoint */ case -1: /* keyboard interrupt */ break; default: if (!db_onpanic && db_recover==0) return (0); printf("kernel: %s trap\n", trap_type[type & 0xff]); if (db_recover != 0) { db_error("Faulted in DDB; continuing...\n"); /*NOTREACHED*/ } } #ifdef MULTIPROCESSOR if (!db_suspend_others()) { ddb_suspend(tf); return 1; } #endif /* Initialise local dbregs storage from trap frame */ dbregs.db_tf = *tf; dbregs.db_fr = *(struct frame *)tf->tf_out[6]; /* Setup current CPU & reg pointers */ ddb_cpuinfo = curcpu(); curcpu()->ci_ddb_regs = ddb_regp = &dbregs; /* Should switch to kdb`s own stack here. */ s = splhigh(); db_active++; cnpollc(true); db_trap(type, 0/*code*/); cnpollc(false); db_active--; splx(s); /* Update trap frame from local dbregs storage */ *(struct frame *)tf->tf_out[6] = dbregs.db_fr; *tf = dbregs.db_tf; curcpu()->ci_ddb_regs = ddb_regp = 0; ddb_cpuinfo = NULL; #ifdef MULTIPROCESSOR db_resume_others(); #endif return (1); }