Index: head/sys/dev/vt/vt.h =================================================================== --- head/sys/dev/vt/vt.h +++ head/sys/dev/vt/vt.h @@ -369,6 +369,7 @@ * Utility macro to make early vt(4) instances work. */ +extern struct vt_device vt_consdev; extern struct terminal vt_consterm; extern const struct terminal_class vt_termclass; void vt_upgrade(struct vt_device *vd); Index: head/sys/dev/vt/vt_core.c =================================================================== --- head/sys/dev/vt/vt_core.c +++ head/sys/dev/vt/vt_core.c @@ -144,7 +144,6 @@ "(0 = Alternate beastie, 1 = Beastie, 2 = Orb)"); VT_SYSCTL_INT(splash_cpu_duration, 10, "Hide logos after (seconds)"); -static struct vt_device vt_consdev; static unsigned int vt_unit = 0; static MALLOC_DEFINE(M_VT, "vt", "vt device"); struct vt_device *main_vd = &vt_consdev; @@ -187,7 +186,7 @@ struct terminal vt_consterm; static struct vt_window vt_conswindow; -static struct vt_device vt_consdev = { +struct vt_device vt_consdev = { .vd_driver = NULL, .vd_softc = NULL, .vd_prev_driver = NULL, Index: head/sys/dev/vt/vt_cpulogos.c =================================================================== --- head/sys/dev/vt/vt_cpulogos.c +++ head/sys/dev/vt/vt_cpulogos.c @@ -152,6 +152,7 @@ struct vt_font *vf; struct winsize wsz; term_pos_t size; + unsigned int i; if (!vt_draw_logo_cpus) return; @@ -160,44 +161,43 @@ if (!vt_splash_cpu) return; - tm = &vt_consterm; - vw = tm->tm_softc; - if (vw == NULL) - return; - vd = vw->vw_device; - if (vd == NULL) - return; - vf = vw->vw_font; - if (vf == NULL) - return; - + vd = &vt_consdev; VT_LOCK(vd); - if ((vd->vd_flags & (VDF_DEAD | VDF_TEXTMODE)) != 0) - goto out; - + if ((vd->vd_flags & (VDF_DEAD | VDF_TEXTMODE)) != 0) { + VT_UNLOCK(vd); + return; + } vt_draw_logo_cpus = 0; VT_UNLOCK(vd); - vt_termsize(vd, vf, &size); - vt_winsize(vd, vf, &wsz); - - /* Resize screen buffer and terminal. */ - terminal_mute(tm, 1); - vtbuf_grow(&vw->vw_buf, &size, vw->vw_buf.vb_history_size); - terminal_set_winsize_blank(tm, &wsz, 0, NULL); - terminal_set_cursor(tm, &vw->vw_buf.vb_cursor); - terminal_mute(tm, 0); - - VT_LOCK(vd); - vt_compute_drawable_area(vw); - - if (vd->vd_curwindow == vw) { - vd->vd_flags |= VDF_INVALID; - vt_resume_flush_timer(vd, 0); + for (i = 0; i < VT_MAXWINDOWS; i++) { + vw = vd->vd_windows[i]; + if (vw == NULL) + continue; + tm = vw->vw_terminal; + vf = vw->vw_font; + if (vf == NULL) + continue; + + vt_termsize(vd, vf, &size); + vt_winsize(vd, vf, &wsz); + + /* Resize screen buffer and terminal. */ + terminal_mute(tm, 1); + vtbuf_grow(&vw->vw_buf, &size, vw->vw_buf.vb_history_size); + terminal_set_winsize_blank(tm, &wsz, 0, NULL); + terminal_set_cursor(tm, &vw->vw_buf.vb_cursor); + terminal_mute(tm, 0); + + VT_LOCK(vd); + vt_compute_drawable_area(vw); + + if (vd->vd_curwindow == vw) { + vd->vd_flags |= VDF_INVALID; + vt_resume_flush_timer(vd, 0); + } + VT_UNLOCK(vd); } - -out: - VT_UNLOCK(vd); } static void