Date: Tue, 21 Jul 2015 20:33:37 +0000 (UTC) From: "Conrad E. Meyer" <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285766 - in head/sys: conf dev/vt dev/vt/logo Message-ID: <201507212033.t6LKXbTj041660@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cem Date: Tue Jul 21 20:33:36 2015 New Revision: 285766 URL: https://svnweb.freebsd.org/changeset/base/285766 Log: vt: Draw logos per CPU core This feature is inspired by another Unix-alike OS commonly found on airplane headrests. A number of beasties[0] are drawn at top of framebuffer during boot, based on the number of active SMP CPUs[1]. Console buffer output continues to scroll in the screen area below beastie(s)[2]. After some time[3] has passed, the beasties are erased leaving the entire terminal for use. Includes two 80x80 vga16 beastie graphics and an 80x80 vga16 orb graphic. (The graphics are RLE compressed to save some space -- 3x 3200 bytes uncompressed, or 4208 compressed.) [0]: The user may select the style of beastie with kern.vt.splash_cpu_style=(0|1|2) [1]: Or the number may be overridden with tunable kern.vt.splash_ncpu. [2]: https://www.youtube.com/watch?v=UP2jizfr3_o [3]: Configurable with kern.vt.splash_cpu_duration (seconds, def. 10). Differential Revision: https://reviews.freebsd.org/D2181 Reviewed by: dumbbell, emaste Approved by: markj (mentor) MFC after: 2 weeks Added: head/sys/dev/vt/logo/logo_beastie.c (contents, props changed) head/sys/dev/vt/vt_cpulogos.c (contents, props changed) Modified: head/sys/conf/files head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Jul 21 20:30:06 2015 (r285765) +++ head/sys/conf/files Tue Jul 21 20:33:36 2015 (r285766) @@ -2726,9 +2726,11 @@ dev/vt/hw/efifb/efifb.c optional vt_efi dev/vt/hw/fb/vt_fb.c optional vt dev/vt/hw/vga/vt_vga.c optional vt vt_vga dev/vt/logo/logo_freebsd.c optional vt splash +dev/vt/logo/logo_beastie.c optional vt splash dev/vt/vt_buf.c optional vt dev/vt/vt_consolectl.c optional vt dev/vt/vt_core.c optional vt +dev/vt/vt_cpulogos.c optional vt splash dev/vt/vt_font.c optional vt dev/vt/vt_sysmouse.c optional vt dev/vte/if_vte.c optional vte pci Added: head/sys/dev/vt/logo/logo_beastie.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/vt/logo/logo_beastie.c Tue Jul 21 20:33:36 2015 (r285766) @@ -0,0 +1,398 @@ +/*- + * Copyright (c) 2015 Conrad Meyer <cse.cem@gmail.com> + * Copyright (c) 2005 The FreeBSD Foundation + * Copyright (c) 1996 Larry Ewing <lewing@isc.tamu.edu> + * Copyright (c) 1988 Kirk McKusick <mckusick@FreeBSD.org> + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + +#include <dev/vt/vt.h> + +const unsigned int vt_logo_sprite_width = 80; +const unsigned int vt_logo_sprite_height = 80; + +const unsigned char vt_beastie_vga16[] = { + 0x16, 0x00, 0x62, 0x16, 0x88, 0x03, 0x80, 0x16, 0x00, 0x23, 0x88, 0x80, + 0x00, 0x00, 0x08, 0x88, 0x16, 0x00, 0x21, 0x08, 0x16, 0x00, 0x06, 0x88, + 0x16, 0x00, 0x20, 0x80, 0x16, 0x00, 0x06, 0x08, 0x80, 0x16, 0x00, 0x1e, + 0x08, 0x16, 0x00, 0x08, 0x88, 0x16, 0x00, 0x1e, 0x08, 0x16, 0x00, 0x06, + 0x87, 0x00, 0x08, 0x16, 0x00, 0x1e, 0x80, 0x16, 0x00, 0x06, 0x77, 0x80, + 0x00, 0x80, 0x16, 0x00, 0x1d, 0x80, 0x16, 0x00, 0x06, 0x08, 0x00, 0x00, + 0x08, 0x16, 0x00, 0x1d, 0x80, 0x16, 0x00, 0x09, 0x08, 0x16, 0x00, 0x1c, + 0x08, 0x16, 0x00, 0x0a, 0x08, 0x16, 0x00, 0x1c, 0x08, 0x16, 0x00, 0x0b, + 0x80, 0x16, 0x00, 0x1b, 0x08, 0x16, 0x00, 0x0b, 0x80, 0x16, 0x00, 0x1b, + 0x08, 0x00, 0x08, 0x70, 0x16, 0x00, 0x03, 0x77, 0x70, 0x16, 0x00, 0x03, + 0x80, 0x16, 0x00, 0x1b, 0x08, 0x00, 0x87, 0x77, 0x00, 0x00, 0x07, 0xff, + 0xf7, 0x16, 0x00, 0x03, 0x80, 0x16, 0x00, 0x1b, 0x08, 0x08, 0x77, 0xff, + 0x00, 0x00, 0x7f, 0x77, 0xf7, 0x16, 0x00, 0x03, 0x80, 0x16, 0x00, 0x1b, + 0x08, 0x08, 0x70, 0x0f, 0x80, 0x00, 0xf7, 0x08, 0x7f, 0x70, 0x00, 0x00, + 0x80, 0x16, 0x00, 0x1b, 0x08, 0x08, 0x80, 0x07, 0x80, 0x00, 0xf8, 0x00, + 0x8f, 0x70, 0x00, 0x00, 0x80, 0x16, 0x00, 0x1b, 0x08, 0x08, 0x70, 0x07, + 0x88, 0x88, 0xf8, 0x00, 0x8f, 0x70, 0x00, 0x00, 0x80, 0x16, 0x00, 0x1b, + 0x08, 0x00, 0xf0, 0x06, 0x16, 0xe6, 0x03, 0x00, 0x8f, 0x16, 0x00, 0x03, + 0x80, 0x16, 0x00, 0x1b, 0x08, 0x00, 0x77, 0x16, 0x6e, 0x05, 0x77, 0x16, + 0x00, 0x03, 0x80, 0x16, 0x00, 0x1b, 0x08, 0x00, 0x06, 0x16, 0xe6, 0x06, + 0x16, 0x00, 0x03, 0x80, 0x16, 0x00, 0x1b, 0x08, 0x00, 0x16, 0x6e, 0x07, + 0x60, 0x00, 0x00, 0x08, 0x16, 0x00, 0x1b, 0x08, 0x80, 0x16, 0xe6, 0x07, + 0x60, 0x00, 0x00, 0x08, 0x16, 0x00, 0x1b, 0x08, 0x80, 0x16, 0x6e, 0x05, + 0x66, 0x66, 0x80, 0x08, 0x00, 0x00, 0x80, 0x16, 0x00, 0x1a, 0x08, 0x80, + 0x86, 0x16, 0xe6, 0x03, 0x16, 0x66, 0x03, 0x80, 0x08, 0x78, 0x00, 0x80, + 0x16, 0x00, 0x1a, 0x08, 0x80, 0x86, 0x16, 0x66, 0x05, 0x77, 0x70, 0x00, + 0x77, 0x00, 0x08, 0x16, 0x00, 0x1a, 0x08, 0x00, 0x87, 0x16, 0x66, 0x04, + 0x77, 0x77, 0x78, 0x00, 0x88, 0x00, 0x08, 0x16, 0x00, 0x1a, 0x08, 0x00, + 0x87, 0x76, 0x66, 0x66, 0x77, 0x77, 0xff, 0xf7, 0x16, 0x00, 0x03, 0x08, + 0x16, 0x00, 0x1a, 0x80, 0x08, 0xff, 0x16, 0x77, 0x04, 0x16, 0xff, 0x03, + 0x80, 0x16, 0x00, 0x03, 0x80, 0x16, 0x00, 0x19, 0x80, 0x07, 0xff, 0x16, + 0x77, 0x03, 0x7f, 0x16, 0xff, 0x03, 0x70, 0x16, 0x00, 0x03, 0x80, 0x16, + 0x00, 0x18, 0x08, 0x00, 0x8f, 0xff, 0xf7, 0x77, 0x77, 0x16, 0xff, 0x04, + 0xf0, 0x16, 0x00, 0x03, 0x08, 0x16, 0x00, 0x18, 0x80, 0x08, 0x7f, 0x16, + 0xff, 0x08, 0xf8, 0x16, 0x00, 0x04, 0x80, 0x16, 0x00, 0x16, 0x08, 0x00, + 0x08, 0x16, 0xff, 0x09, 0xf7, 0x16, 0x00, 0x04, 0x08, 0x16, 0x00, 0x16, + 0x08, 0x00, 0x08, 0x16, 0xff, 0x0a, 0x16, 0x00, 0x05, 0x80, 0x16, 0x00, + 0x15, 0x80, 0x00, 0x87, 0x16, 0xff, 0x0a, 0x80, 0x16, 0x00, 0x04, 0x08, + 0x16, 0x00, 0x14, 0x08, 0x00, 0x00, 0x87, 0x77, 0xff, 0xf7, 0x77, 0x16, + 0xff, 0x03, 0x16, 0x77, 0x03, 0x78, 0x16, 0x00, 0x04, 0x08, 0x16, 0x00, + 0x14, 0x08, 0x00, 0x00, 0x77, 0x7f, 0xff, 0xff, 0x7f, 0x16, 0xff, 0x04, + 0x77, 0x77, 0x78, 0x00, 0x80, 0x16, 0x00, 0x03, 0x80, 0x16, 0x00, 0x13, + 0x80, 0x00, 0x00, 0x7f, 0x16, 0xff, 0x09, 0xf7, 0x77, 0x00, 0x08, 0x80, + 0x00, 0x00, 0x80, 0x16, 0x00, 0x13, 0x80, 0x80, 0x08, 0x16, 0xff, 0x0b, + 0x77, 0x80, 0x00, 0x08, 0x00, 0x00, 0x08, 0x16, 0x00, 0x12, 0x08, 0x00, + 0x80, 0x07, 0x16, 0xff, 0x0c, 0x78, 0x00, 0x08, 0x80, 0x00, 0x08, 0x16, + 0x00, 0x12, 0x08, 0x08, 0x00, 0x8f, 0x16, 0xff, 0x0c, 0xf7, 0x08, 0x80, + 0x80, 0x00, 0x08, 0x16, 0x00, 0x12, 0x16, 0x08, 0x03, 0x7f, 0x16, 0xff, + 0x0c, 0xf7, 0x08, 0x80, 0x80, 0x00, 0x00, 0x80, 0x16, 0x00, 0x11, 0x80, + 0x08, 0x07, 0x16, 0xff, 0x0e, 0x80, 0x00, 0x08, 0x00, 0x00, 0x80, 0x16, + 0x00, 0x11, 0x80, 0x80, 0x0f, 0x16, 0xff, 0x0e, 0x70, 0x00, 0x08, 0x00, + 0x00, 0x80, 0x16, 0x00, 0x10, 0x08, 0x00, 0x80, 0x8f, 0x16, 0xff, 0x0e, + 0x70, 0x00, 0x08, 0x00, 0x00, 0x80, 0x16, 0x00, 0x10, 0x08, 0x08, 0x00, + 0x7f, 0x16, 0xff, 0x0e, 0x70, 0x00, 0x08, 0x00, 0x00, 0x08, 0x16, 0x00, + 0x10, 0x80, 0x08, 0x00, 0x16, 0xff, 0x05, 0x7f, 0x16, 0xff, 0x09, 0xf0, + 0x00, 0x08, 0x00, 0x00, 0x08, 0x16, 0x00, 0x0f, 0x08, 0x00, 0x08, 0x00, + 0x16, 0xff, 0x05, 0x7f, 0x16, 0xff, 0x09, 0xf0, 0x00, 0x08, 0x00, 0x00, + 0x08, 0x16, 0x00, 0x0f, 0x08, 0x00, 0x08, 0x08, 0x16, 0xff, 0x05, 0x7f, + 0x16, 0xff, 0x09, 0xf0, 0x00, 0x08, 0x00, 0x00, 0x08, 0x16, 0x00, 0x0f, + 0x08, 0x00, 0x08, 0x08, 0x16, 0xff, 0x05, 0x7f, 0x16, 0xff, 0x09, 0xf0, + 0x00, 0x08, 0x00, 0x00, 0x08, 0x16, 0x00, 0x0f, 0x08, 0x00, 0x00, 0x88, + 0x16, 0xff, 0x05, 0x7f, 0x16, 0xff, 0x09, 0xf0, 0x00, 0x08, 0x00, 0x00, + 0x08, 0x16, 0x00, 0x0f, 0x08, 0x00, 0x00, 0x08, 0x16, 0xff, 0x05, 0x7f, + 0x16, 0xff, 0x09, 0xf0, 0x88, 0x88, 0x80, 0x00, 0x08, 0x16, 0x00, 0x0f, + 0x08, 0x06, 0xe6, 0x00, 0x8f, 0x16, 0xff, 0x04, 0x7f, 0x16, 0xff, 0x09, + 0xf8, 0x00, 0x00, 0x08, 0x80, 0x08, 0x16, 0x00, 0x10, 0x6e, 0x6e, 0x60, + 0x08, 0x16, 0xff, 0x04, 0x7f, 0x16, 0xff, 0x08, 0xe6, 0xe0, 0x16, 0x00, + 0x03, 0x88, 0x80, 0x16, 0x00, 0x0f, 0x06, 0x16, 0xe6, 0x03, 0x00, 0x8f, + 0x16, 0xff, 0x0b, 0xfe, 0x6e, 0x60, 0x16, 0x00, 0x04, 0x60, 0x16, 0x00, + 0x0f, 0x16, 0x6e, 0x04, 0x60, 0x08, 0x16, 0xff, 0x0b, 0xf6, 0xe6, 0xe0, + 0x16, 0x00, 0x03, 0x06, 0xe6, 0x16, 0x00, 0x0c, 0x06, 0x16, 0xe6, 0x06, + 0xe0, 0x00, 0x8f, 0x16, 0xff, 0x0a, 0xfe, 0x6e, 0x60, 0x16, 0x00, 0x03, + 0x0e, 0x6e, 0x16, 0x00, 0x0c, 0x16, 0x6e, 0x08, 0x00, 0x08, 0x16, 0xff, + 0x0a, 0x76, 0xe6, 0xe6, 0x16, 0x00, 0x03, 0xe6, 0xe6, 0x16, 0x00, 0x0c, + 0x16, 0xe6, 0x08, 0xe0, 0x00, 0x8f, 0x16, 0xff, 0x08, 0xf7, 0x7e, 0x16, + 0x6e, 0x07, 0x16, 0x00, 0x0c, 0x16, 0x6e, 0x08, 0x60, 0x00, 0x08, 0x16, + 0xff, 0x08, 0xf7, 0x76, 0x16, 0xe6, 0x07, 0xe0, 0x16, 0x00, 0x0b, 0x16, + 0xe6, 0x09, 0x00, 0x00, 0x0f, 0x16, 0xff, 0x07, 0xf7, 0x7e, 0x16, 0x6e, + 0x08, 0x16, 0x00, 0x0b, 0x16, 0x6e, 0x09, 0x60, 0x00, 0x0f, 0x16, 0xff, + 0x07, 0xf7, 0x76, 0x16, 0xe6, 0x08, 0xe0, 0x16, 0x00, 0x0a, 0x16, 0xe6, + 0x09, 0xe0, 0x00, 0x8f, 0x16, 0xff, 0x07, 0xf7, 0x8e, 0x16, 0x6e, 0x09, + 0x16, 0x00, 0x0a, 0x16, 0x6e, 0x0a, 0x88, 0x16, 0xff, 0x08, 0x78, 0x86, + 0x16, 0xe6, 0x0a, 0x16, 0x00, 0x09, 0x16, 0xe6, 0x0a, 0xef, 0x16, 0xff, + 0x07, 0xf7, 0x80, 0x06, 0x16, 0x6e, 0x0a, 0x16, 0x00, 0x09, 0x16, 0x6e, + 0x0b, 0x16, 0xff, 0x07, 0x78, 0x00, 0x06, 0x16, 0xe6, 0x09, 0xe0, 0x16, + 0x00, 0x09, 0x16, 0xe6, 0x0b, 0x7f, 0x16, 0xff, 0x05, 0x78, 0x80, 0x00, + 0x06, 0x16, 0x6e, 0x09, 0x16, 0x00, 0x09, 0x0e, 0x16, 0x6e, 0x0a, 0x66, + 0x67, 0x16, 0xff, 0x04, 0x78, 0x80, 0x00, 0x00, 0x86, 0x16, 0xe6, 0x08, + 0xe0, 0x16, 0x00, 0x09, 0x06, 0x16, 0xe6, 0x0b, 0x60, 0x16, 0x00, 0x08, + 0x86, 0x16, 0x6e, 0x06, 0x66, 0x60, 0x16, 0x00, 0x0a, 0x0e, 0x16, 0x6e, + 0x0a, 0x66, 0x60, 0x16, 0x00, 0x08, 0x86, 0x16, 0xe6, 0x06, 0x60, 0x16, + 0x00, 0x0c, 0x16, 0xe6, 0x0b, 0x60, 0x16, 0x00, 0x08, 0x86, 0x16, 0x6e, + 0x04, 0x66, 0x66, 0x16, 0x00, 0x0f, 0x16, 0x66, 0x03, 0x16, 0x6e, 0x05, + 0x66, 0x60, 0x00, 0x16, 0x88, 0x05, 0x80, 0x00, 0x06, 0x66, 0x16, 0xe6, + 0x03, 0x66, 0x16, 0x00, 0x12, 0x16, 0x66, 0x04, 0xe6, 0xe6, 0x66, 0x88, + 0x88, 0x16, 0x00, 0x05, 0x08, 0x88, 0x86, 0x66, 0x6e, 0x6e, 0x66, 0x60, + 0x16, 0x00, 0x14, 0x06, 0x16, 0x66, 0x04, 0x16, 0x00, 0x09, 0x06, 0x16, + 0x66, 0x04, 0x16, 0x00, 0x16, 0x06, 0x66, 0x66, 0x60, 0x16, 0x00, 0x0a, + 0x16, 0x66, 0x03, 0x60, 0x16, 0x00, 0x82 +}; + +const unsigned char vt_beastie2_vga16[] = { + 0x16, 0x00, 0x11, 0x04, 0x16, 0x00, 0x26, 0x04, 0x44, 0x16, 0x00, 0x26, + 0x44, 0x40, 0x16, 0x00, 0x25, 0x44, 0x44, 0x16, 0x00, 0x0b, 0x44, 0x16, + 0x00, 0x19, 0x04, 0x44, 0x40, 0x16, 0x00, 0x0b, 0x04, 0x40, 0x16, 0x00, + 0x18, 0x44, 0x44, 0x40, 0x16, 0x00, 0x0b, 0x04, 0x44, 0x16, 0x00, 0x17, + 0x04, 0x44, 0x44, 0x16, 0x00, 0x0d, 0x44, 0x40, 0x16, 0x00, 0x16, 0x16, + 0x44, 0x03, 0x16, 0x00, 0x03, 0x04, 0x04, 0x16, 0x00, 0x08, 0x44, 0x44, + 0x16, 0x00, 0x16, 0x16, 0x44, 0x03, 0x00, 0x04, 0x16, 0x44, 0x05, 0x16, + 0x00, 0x06, 0x44, 0x44, 0x16, 0x00, 0x15, 0x04, 0x44, 0x44, 0x40, 0x40, + 0x16, 0x44, 0x07, 0x40, 0x16, 0x00, 0x04, 0x44, 0x44, 0x40, 0x16, 0x00, + 0x14, 0x04, 0x16, 0x44, 0x06, 0x04, 0x04, 0x16, 0x44, 0x03, 0x04, 0x16, + 0x00, 0x03, 0x04, 0x44, 0x44, 0x40, 0x16, 0x00, 0x14, 0x04, 0x16, 0x44, + 0x07, 0x40, 0x16, 0x44, 0x04, 0x40, 0x00, 0x00, 0x16, 0x44, 0x03, 0x40, + 0x16, 0x00, 0x14, 0x04, 0x16, 0x44, 0x03, 0x84, 0x16, 0x44, 0x04, 0x04, + 0x16, 0x44, 0x04, 0x04, 0x16, 0x44, 0x04, 0x40, 0x16, 0x00, 0x14, 0x04, + 0x44, 0x44, 0x0f, 0xf8, 0x44, 0x48, 0x84, 0x16, 0x44, 0x0b, 0x40, 0x16, + 0x00, 0x14, 0x04, 0x44, 0x40, 0xff, 0xf8, 0x40, 0xff, 0xff, 0x16, 0x44, + 0x0b, 0x40, 0x16, 0x00, 0x14, 0x04, 0x44, 0x0f, 0xff, 0x74, 0x47, 0xff, + 0xff, 0x74, 0x16, 0x44, 0x0a, 0x40, 0x16, 0x00, 0x14, 0x04, 0x04, 0xff, + 0xff, 0x44, 0x7f, 0xff, 0xff, 0xf4, 0x16, 0x44, 0x0a, 0x16, 0x00, 0x15, + 0x04, 0x48, 0xff, 0xf7, 0x40, 0x16, 0xff, 0x03, 0xf6, 0x16, 0x44, 0x0a, + 0x16, 0x00, 0x16, 0x4f, 0xff, 0xf8, 0x47, 0x16, 0xff, 0x03, 0xf8, 0x16, + 0x44, 0x09, 0x40, 0x16, 0x00, 0x16, 0x07, 0x07, 0xf8, 0x0f, 0x16, 0xff, + 0x03, 0xf8, 0x16, 0x44, 0x08, 0x40, 0x40, 0x16, 0x00, 0x15, 0x04, 0x77, + 0x80, 0xf4, 0x78, 0x0f, 0xff, 0xff, 0xf8, 0x16, 0x44, 0x09, 0x16, 0x00, + 0x16, 0x04, 0x8f, 0x00, 0xf0, 0x8f, 0x88, 0xff, 0xff, 0xf8, 0x16, 0x44, + 0x08, 0x16, 0x00, 0x17, 0x04, 0x00, 0x00, 0x88, 0x0f, 0x00, 0xff, 0xff, + 0xf6, 0x16, 0x44, 0x07, 0x40, 0x16, 0x00, 0x17, 0x40, 0x00, 0x00, 0x48, + 0x07, 0x00, 0xff, 0xff, 0xf4, 0x16, 0x44, 0x06, 0x40, 0x16, 0x00, 0x18, + 0x44, 0x80, 0x08, 0x48, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x16, 0x44, 0x06, + 0x16, 0x00, 0x18, 0x04, 0x44, 0x40, 0x04, 0x48, 0x00, 0x00, 0xff, 0xff, + 0x84, 0x16, 0x44, 0x06, 0x40, 0x16, 0x00, 0x17, 0x44, 0x44, 0x04, 0x00, + 0x48, 0x00, 0x07, 0xff, 0xff, 0x16, 0x44, 0x07, 0x40, 0x16, 0x00, 0x17, + 0x44, 0x40, 0x16, 0x44, 0x03, 0xf7, 0xff, 0xff, 0xf0, 0x16, 0x44, 0x07, + 0x40, 0x16, 0x00, 0x16, 0x04, 0x44, 0x40, 0x44, 0x44, 0x40, 0x0f, 0xff, + 0xf7, 0x00, 0x16, 0x44, 0x07, 0x40, 0x16, 0x00, 0x14, 0x6e, 0x00, 0x04, + 0x16, 0x44, 0x05, 0x40, 0x40, 0x16, 0x44, 0x08, 0x40, 0x40, 0x16, 0x00, + 0x14, 0x0e, 0xe0, 0x00, 0x44, 0x44, 0x04, 0x16, 0x44, 0x0d, 0x16, 0x00, + 0x15, 0x06, 0x66, 0x00, 0x16, 0x44, 0x03, 0x16, 0x40, 0x03, 0x16, 0x44, + 0x09, 0x04, 0x16, 0x00, 0x13, 0x60, 0x00, 0x00, 0x06, 0x60, 0x44, 0x44, + 0x04, 0x16, 0x44, 0x0c, 0x40, 0x16, 0x00, 0x13, 0x0e, 0xe0, 0x00, 0x00, + 0xe0, 0x04, 0x44, 0x40, 0x16, 0x44, 0x0b, 0x40, 0x40, 0x16, 0x00, 0x13, + 0x06, 0xee, 0x00, 0x00, 0xe0, 0x00, 0x04, 0x16, 0x44, 0x07, 0x40, 0x40, + 0x16, 0x44, 0x04, 0x16, 0x00, 0x14, 0x06, 0x06, 0xe6, 0x00, 0xe0, 0x00, + 0x00, 0x04, 0x04, 0x16, 0x44, 0x04, 0x40, 0x16, 0x44, 0x05, 0x16, 0x00, + 0x17, 0x6e, 0x6e, 0x60, 0x16, 0x00, 0x04, 0x16, 0x44, 0x03, 0x40, 0x16, + 0x44, 0x04, 0x40, 0x40, 0x16, 0x00, 0x13, 0x68, 0x60, 0x00, 0x00, 0x06, + 0xee, 0x60, 0x16, 0x00, 0x05, 0x40, 0x40, 0x16, 0x44, 0x03, 0x04, 0x16, + 0x00, 0x16, 0x0e, 0xe0, 0x00, 0x00, 0x6e, 0xe6, 0xe6, 0x04, 0x44, 0x44, + 0x00, 0x00, 0x16, 0x44, 0x04, 0x04, 0x44, 0x40, 0x40, 0x16, 0x00, 0x15, + 0x6e, 0x66, 0x6e, 0xe6, 0x66, 0xee, 0x04, 0x44, 0x44, 0x16, 0x00, 0x03, + 0x16, 0x40, 0x03, 0x44, 0x44, 0x40, 0x16, 0x00, 0x16, 0x06, 0x6e, 0xee, + 0x68, 0x00, 0x0e, 0x64, 0x44, 0x44, 0x16, 0x00, 0x03, 0x16, 0x44, 0x06, + 0x04, 0x16, 0x00, 0x1b, 0x60, 0x44, 0x40, 0x16, 0x00, 0x03, 0x16, 0x44, + 0x06, 0x40, 0x16, 0x00, 0x1a, 0x04, 0x44, 0x40, 0x16, 0x00, 0x03, 0x04, + 0x16, 0x44, 0x06, 0x04, 0x16, 0x00, 0x1a, 0x04, 0x16, 0x44, 0x05, 0x04, + 0x16, 0x44, 0x06, 0x40, 0x16, 0x00, 0x1a, 0x04, 0x16, 0x44, 0x04, 0x04, + 0x04, 0x44, 0x04, 0x16, 0x44, 0x03, 0x04, 0x40, 0x40, 0x16, 0x00, 0x19, + 0x04, 0x44, 0x44, 0x04, 0x40, 0x44, 0x04, 0x44, 0x44, 0x04, 0x44, 0x40, + 0x44, 0x44, 0x16, 0x00, 0x1b, 0x04, 0x40, 0x44, 0x04, 0x16, 0x44, 0x04, + 0x40, 0x40, 0x44, 0x44, 0x40, 0x40, 0x16, 0x00, 0x1a, 0x04, 0x16, 0x44, + 0x03, 0x40, 0x16, 0x44, 0x08, 0x16, 0x00, 0x1c, 0x04, 0x40, 0x44, 0x04, + 0x16, 0x44, 0x07, 0x40, 0x40, 0x16, 0x00, 0x1e, 0x16, 0x44, 0x09, 0x16, + 0x00, 0x1e, 0x04, 0x16, 0x44, 0x06, 0x40, 0x44, 0x44, 0x04, 0x16, 0x00, + 0x1d, 0x04, 0x16, 0x44, 0x06, 0x40, 0x44, 0x44, 0x40, 0x16, 0x00, 0x1e, + 0x16, 0x44, 0x06, 0x40, 0x44, 0x16, 0x00, 0x20, 0x04, 0x00, 0x16, 0x44, + 0x04, 0x04, 0x00, 0x04, 0x16, 0x00, 0x1f, 0x40, 0x16, 0x44, 0x05, 0x00, + 0x04, 0x16, 0x00, 0x1f, 0x04, 0x44, 0x00, 0x04, 0x04, 0x40, 0x40, 0x04, + 0x00, 0x40, 0x40, 0x16, 0x00, 0x1d, 0x04, 0x44, 0x44, 0x00, 0x40, 0x06, + 0x6e, 0x60, 0x04, 0x16, 0x00, 0x20, 0x16, 0x44, 0x04, 0x40, 0x6e, 0xe6, + 0x00, 0x40, 0x40, 0x16, 0x00, 0x1e, 0x16, 0x44, 0x05, 0x46, 0xee, 0x60, + 0x16, 0x00, 0x20, 0x16, 0x44, 0x05, 0x04, 0x6e, 0xee, 0x04, 0x04, 0x16, + 0x00, 0x1e, 0x04, 0x16, 0x44, 0x05, 0x06, 0x6e, 0xe0, 0x00, 0x04, 0x16, + 0x00, 0x1e, 0x16, 0x44, 0x06, 0x6e, 0x64, 0x04, 0x16, 0x00, 0x1f, 0x04, + 0x04, 0x00, 0x00, 0x16, 0x04, 0x04, 0x00, 0x04, 0x16, 0x00, 0x1e, 0x04, + 0x44, 0x04, 0x04, 0x16, 0x40, 0x04, 0x44, 0x40, 0x04, 0x16, 0x00, 0x1d, + 0x44, 0x84, 0x74, 0x86, 0x87, 0x84, 0x44, 0x04, 0x00, 0x44, 0x40, 0x04, + 0x16, 0x00, 0x1c, 0x87, 0xc7, 0x40, 0x77, 0x74, 0x04, 0x04, 0x80, 0x00, + 0x00, 0x44, 0x40, 0x16, 0x00, 0x1b, 0x7c, 0x7c, 0x84, 0x74, 0x84, 0x44, + 0x84, 0x48, 0x78, 0x40, 0x00, 0x00, 0x44, 0x44, 0x04, 0x16, 0x00, 0x16, + 0x40, 0x48, 0xc8, 0xc7, 0x44, 0x40, 0x84, 0x44, 0x76, 0x04, 0x48, 0x78, + 0x16, 0x00, 0x04, 0x04, 0x40, 0x44, 0x04, 0x16, 0x00, 0x10, 0x08, 0x77, + 0xff, 0x77, 0x84, 0x44, 0x04, 0x00, 0x00, 0x46, 0x48, 0x74, 0x04, 0x44, + 0x40, 0x80, 0x40, 0x16, 0x00, 0x04, 0x04, 0x16, 0x44, 0x05, 0x40, 0x40, + 0x16, 0x00, 0x0a, 0x87, 0x16, 0xff, 0x03, 0xf7, 0x70, 0x88, 0x77, 0x77, + 0x84, 0x04, 0x44, 0x40, 0x44, 0x04, 0x44, 0x44, 0x04, 0x16, 0x00, 0x07, + 0x04, 0x16, 0x44, 0x03, 0x04, 0x40, 0x16, 0x00, 0x08, 0x07, 0x88, 0x16, + 0xff, 0x03, 0x77, 0x87, 0x16, 0xff, 0x03, 0x77, 0x84, 0x04, 0x04, 0x44, + 0x44, 0x16, 0x40, 0x03, 0x80, 0x16, 0x00, 0x09, 0x04, 0x44, 0x44, 0x40, + 0x16, 0x00, 0x07, 0x0f, 0xff, 0x16, 0x88, 0x03, 0x80, 0x7f, 0x16, 0xff, + 0x03, 0xf7, 0x78, 0x16, 0x44, 0x03, 0x04, 0x04, 0x48, 0x87, 0x80, 0x16, + 0x00, 0x0b, 0x04, 0x44, 0x16, 0x00, 0x07, 0x08, 0x16, 0xff, 0x03, 0x77, + 0x88, 0x87, 0x16, 0xff, 0x03, 0x77, 0x77, 0x16, 0x04, 0x03, 0x40, 0x48, + 0x87, 0x77, 0x16, 0x00, 0x0d, 0x44, 0x40, 0x16, 0x00, 0x07, 0x88, 0x77, + 0xf7, 0x77, 0x8f, 0x77, 0x16, 0x88, 0x05, 0x80, 0x88, 0x88, 0x87, 0x77, + 0x77, 0x80, 0x16, 0x00, 0x0d, 0x44, 0x40, 0x16, 0x00, 0x0b, 0x07, 0x16, + 0xff, 0x03, 0x7f, 0x16, 0x77, 0x06, 0x78, 0x16, 0x00, 0x0a, 0x04, 0x40, + 0x16, 0x00, 0x03, 0x44, 0x40, 0x16, 0x00, 0x0c, 0x87, 0x7f, 0xff, 0xff, + 0x16, 0x77, 0x04, 0x88, 0x80, 0x16, 0x00, 0x0a, 0x04, 0x44, 0x44, 0x00, + 0x00, 0x04, 0x44, 0x40, 0x16, 0x00, 0x0e, 0x08, 0x08, 0x88, 0x08, 0x16, + 0x00, 0x0e, 0x16, 0x44, 0x06, 0x40, 0x16, 0x00, 0x20, 0x16, 0x44, 0x06, + 0x16, 0x00, 0x21, 0x16, 0x44, 0x05, 0x40, 0x16, 0x00, 0x22, 0x40, 0x40, + 0x16, 0x00, 0x08 +}; + +const unsigned char vt_orb_vga16[] = { + 0x16, 0x00, 0x52, 0x04, 0x04, 0x16, 0x00, 0x0c, 0x16, 0x80, 0x03, 0x88, + 0x88, 0x16, 0x80, 0x04, 0x16, 0x00, 0x0b, 0x40, 0x40, 0x16, 0x00, 0x03, + 0x04, 0x44, 0x6c, 0xcc, 0x64, 0x16, 0x00, 0x08, 0x08, 0x08, 0x88, 0x77, + 0x16, 0x7f, 0x04, 0x77, 0x78, 0x88, 0x80, 0x80, 0x16, 0x00, 0x07, 0x04, + 0x6c, 0x6c, 0x44, 0x40, 0x00, 0x00, 0x04, 0x46, 0x4c, 0x77, 0x7c, 0xcc, + 0x40, 0x16, 0x00, 0x04, 0x08, 0x08, 0x88, 0x7f, 0x16, 0xff, 0x08, 0xf7, + 0x78, 0x80, 0x80, 0x16, 0x00, 0x05, 0x4c, 0xc7, 0xc7, 0xcc, 0x44, 0x44, + 0x00, 0x00, 0x44, 0x44, 0x46, 0xcc, 0xf7, 0xfc, 0x7c, 0x60, 0x00, 0x00, + 0x08, 0x08, 0x87, 0x16, 0xff, 0x0c, 0xf7, 0x88, 0x08, 0x16, 0x00, 0x03, + 0x6c, 0x16, 0xf7, 0x03, 0xc6, 0x44, 0x44, 0x00, 0x00, 0x16, 0x44, 0x03, + 0xc7, 0x7f, 0xf7, 0x77, 0xc7, 0x60, 0x00, 0x80, 0x77, 0x16, 0xff, 0x0e, + 0xf7, 0x70, 0x80, 0x08, 0x67, 0xff, 0x7f, 0x7f, 0x7c, 0xc4, 0x44, 0x44, + 0x00, 0x00, 0x16, 0x44, 0x03, 0x4c, 0xc7, 0xff, 0xf7, 0xf7, 0x77, 0x68, + 0x8f, 0x16, 0xff, 0x09, 0x16, 0xf7, 0x03, 0x16, 0xff, 0x05, 0x88, 0x67, + 0xff, 0x7f, 0xff, 0xff, 0x7c, 0x64, 0x44, 0x44, 0x00, 0x00, 0x04, 0x16, + 0x44, 0x03, 0x6c, 0xcf, 0x16, 0x7f, 0x04, 0x16, 0xff, 0x0d, 0x16, 0xf7, + 0x03, 0xff, 0xff, 0x7e, 0x16, 0xff, 0x04, 0x7c, 0xc6, 0x16, 0x44, 0x03, + 0x00, 0x00, 0x04, 0x16, 0x44, 0x03, 0x46, 0xcc, 0x7c, 0xf7, 0x16, 0xff, + 0x0d, 0x16, 0x7f, 0x03, 0x7c, 0xc6, 0xcc, 0x7e, 0x16, 0xff, 0x04, 0xf7, + 0x7c, 0x6c, 0x16, 0x44, 0x03, 0x00, 0x00, 0x04, 0x16, 0x44, 0x03, 0x4c, + 0x4c, 0xcc, 0xcf, 0x16, 0xff, 0x0f, 0xf7, 0xc4, 0x44, 0x4c, 0x16, 0xff, + 0x04, 0xf7, 0x7c, 0xcc, 0xc4, 0x16, 0x44, 0x03, 0x00, 0x00, 0x04, 0x16, + 0x44, 0x04, 0x4c, 0xcc, 0x7f, 0x16, 0xff, 0x0e, 0xf7, 0xf7, 0x44, 0x46, + 0xcf, 0x16, 0xff, 0x03, 0xf7, 0xf7, 0x77, 0xcc, 0x16, 0x44, 0x03, 0xc0, + 0x16, 0x00, 0x03, 0x16, 0x44, 0x04, 0xc4, 0xc7, 0x16, 0xff, 0x10, 0xf7, + 0x44, 0x47, 0x16, 0xff, 0x05, 0x77, 0xcc, 0xc4, 0x44, 0x44, 0x46, 0x40, + 0x16, 0x00, 0x03, 0xc4, 0x16, 0x44, 0x03, 0x4c, 0xcf, 0x16, 0xff, 0x11, + 0x44, 0x6f, 0x16, 0xff, 0x04, 0x7f, 0x77, 0x7c, 0x16, 0x44, 0x03, 0x4c, + 0x40, 0x16, 0x00, 0x03, 0x46, 0x16, 0x44, 0x03, 0xcc, 0x16, 0xff, 0x12, + 0xc6, 0xcf, 0x16, 0xff, 0x04, 0xf7, 0x7c, 0xc4, 0x16, 0x44, 0x03, 0x8c, + 0x16, 0x00, 0x04, 0x0c, 0x44, 0x44, 0x64, 0x7f, 0x16, 0xff, 0x12, 0x77, + 0xcf, 0x16, 0xff, 0x04, 0x7f, 0xcc, 0x16, 0x44, 0x03, 0x48, 0xc4, 0x16, + 0x00, 0x04, 0x08, 0xc4, 0x44, 0x4c, 0x16, 0xff, 0x13, 0xfc, 0x7e, 0x16, + 0xff, 0x03, 0xf7, 0xfc, 0x64, 0x16, 0x44, 0x03, 0x4c, 0xc0, 0x16, 0x00, + 0x05, 0xc6, 0x44, 0xc7, 0x16, 0xff, 0x13, 0x7f, 0x77, 0x16, 0xff, 0x03, + 0xfc, 0xcc, 0x16, 0x44, 0x04, 0x67, 0x60, 0x16, 0x00, 0x05, 0x8c, 0x84, + 0x7f, 0x16, 0xff, 0x09, 0x7f, 0xef, 0xff, 0x16, 0xf7, 0x06, 0xff, 0xff, + 0x77, 0xff, 0xff, 0x7c, 0xcc, 0xc4, 0x16, 0x44, 0x03, 0x48, 0xc7, 0x40, + 0x16, 0x00, 0x05, 0x07, 0xc7, 0x16, 0xff, 0x0c, 0x7f, 0x7f, 0xef, 0xef, + 0xfe, 0xff, 0xff, 0x7f, 0x7f, 0x76, 0xcf, 0xc7, 0xcc, 0xcc, 0x16, 0x44, + 0x04, 0x8c, 0x76, 0x16, 0x00, 0x06, 0x06, 0x7f, 0x7f, 0x16, 0xff, 0x08, + 0x16, 0x7f, 0x03, 0xfe, 0xfe, 0x16, 0xf7, 0x07, 0xfc, 0x6c, 0x7c, 0xcc, + 0xc4, 0x16, 0x44, 0x04, 0x67, 0xc8, 0x16, 0x00, 0x07, 0x7f, 0x16, 0xff, + 0x08, 0x7f, 0xf7, 0xf7, 0xfe, 0x7f, 0x7f, 0x7e, 0x7e, 0x16, 0xf7, 0x06, + 0x8c, 0xcc, 0xcc, 0xc4, 0x16, 0x44, 0x03, 0x48, 0xc7, 0x60, 0x16, 0x00, + 0x06, 0x08, 0xff, 0xff, 0xf7, 0x16, 0xff, 0x06, 0x16, 0xf7, 0x03, 0x77, + 0xfc, 0xfc, 0xf7, 0x77, 0x77, 0x16, 0x7f, 0x05, 0xc8, 0xcc, 0xc4, 0x16, + 0x44, 0x04, 0x8c, 0x7c, 0x78, 0x16, 0x00, 0x06, 0x0f, 0x7f, 0xff, 0x7f, + 0x16, 0xff, 0x05, 0x7f, 0x7f, 0x77, 0x7e, 0x7e, 0xcf, 0xcf, 0xce, 0x77, + 0x16, 0x7c, 0x04, 0x16, 0x77, 0x03, 0x4c, 0x4c, 0x16, 0x44, 0x04, 0xc7, + 0x77, 0x77, 0x16, 0x00, 0x06, 0x8f, 0xff, 0xff, 0x7f, 0x7f, 0x16, 0xff, + 0x04, 0xf7, 0xf7, 0x7e, 0x77, 0x77, 0x7c, 0xec, 0xcc, 0xcc, 0x16, 0xc6, + 0x04, 0xcc, 0xc7, 0xc7, 0x76, 0x16, 0x44, 0x04, 0x48, 0xc7, 0xc7, 0xf7, + 0x80, 0x16, 0x00, 0x05, 0x7f, 0x7f, 0xf7, 0x7f, 0x16, 0xff, 0x04, 0x7f, + 0x7f, 0xcf, 0xc7, 0xce, 0xcc, 0xc6, 0x16, 0xc4, 0x03, 0x4c, 0x4c, 0x44, + 0x4c, 0x48, 0x66, 0xc8, 0xc7, 0x84, 0x16, 0x44, 0x03, 0x8c, 0x7c, 0x67, + 0x7f, 0x80, 0x16, 0x00, 0x04, 0x08, 0x7f, 0xff, 0x77, 0xf7, 0x16, 0xff, + 0x04, 0xfe, 0x77, 0x7c, 0xec, 0xec, 0xc6, 0x4c, 0x46, 0x4c, 0x4c, 0x44, + 0x44, 0x4c, 0x16, 0x44, 0x03, 0x64, 0x86, 0xc8, 0x64, 0x44, 0x44, 0xc7, + 0x7c, 0x87, 0x7f, 0x70, 0x16, 0x00, 0x04, 0x08, 0xf7, 0xff, 0xe7, 0x7f, + 0x16, 0xff, 0x03, 0xfe, 0xfc, 0xfc, 0xec, 0xcc, 0x16, 0x44, 0x0b, 0x64, + 0x46, 0x44, 0x8c, 0x86, 0x84, 0x44, 0x6c, 0x46, 0x8c, 0x77, 0xf8, 0x16, + 0x00, 0x04, 0x0f, 0x7f, 0xf7, 0xcf, 0x7f, 0x7f, 0xff, 0xff, 0xed, 0xe7, + 0xce, 0xcc, 0x64, 0x64, 0xc4, 0x16, 0x44, 0x0b, 0x46, 0x16, 0x48, 0x03, + 0x84, 0x84, 0x88, 0x88, 0x77, 0xf8, 0x16, 0x00, 0x04, 0x0f, 0xf7, 0xfe, + 0x7e, 0x7f, 0xff, 0xff, 0xef, 0x7e, 0xcc, 0xcc, 0x64, 0x16, 0x44, 0x10, + 0x48, 0x68, 0x68, 0x88, 0x48, 0x68, 0xc7, 0x7f, 0x16, 0x00, 0x04, 0x7f, + 0x7f, 0x7c, 0x7c, 0xfe, 0xff, 0xff, 0xf7, 0xec, 0x7c, 0x64, 0x4c, 0x16, + 0x44, 0x10, 0x84, 0x48, 0x48, 0x68, 0x88, 0x88, 0x67, 0xf7, 0x80, 0x16, + 0x00, 0x03, 0x7f, 0x7f, 0xc7, 0xce, 0x7f, 0xff, 0xff, 0xe7, 0xec, 0x66, + 0x4c, 0x16, 0x44, 0x11, 0x16, 0x48, 0x03, 0x88, 0x68, 0x68, 0x67, 0x7f, + 0x80, 0x16, 0x00, 0x03, 0xf7, 0x7f, 0xcc, 0xec, 0xfe, 0xff, 0xff, 0x7e, + 0xc6, 0x16, 0x44, 0x15, 0x04, 0x84, 0x88, 0x88, 0x6c, 0x7f, 0x70, 0x00, + 0x00, 0x08, 0x7f, 0x77, 0x6c, 0xc7, 0xef, 0xff, 0xf7, 0xec, 0xc4, 0x64, + 0x16, 0x44, 0x13, 0x04, 0x84, 0x04, 0x84, 0x84, 0x86, 0x7f, 0x70, 0x00, + 0x00, 0x08, 0xf7, 0x7c, 0xc6, 0xec, 0xe7, 0xef, 0xe7, 0xc6, 0x64, 0x16, + 0x44, 0x15, 0x04, 0x84, 0x06, 0x86, 0x46, 0x7f, 0x78, 0x00, 0x00, 0x08, + 0xf7, 0x7c, 0x6c, 0xcc, 0xe7, 0x77, 0xcc, 0xc6, 0xc4, 0x16, 0x44, 0x13, + 0x04, 0x04, 0x16, 0x40, 0x04, 0x46, 0x7f, 0xf0, 0x00, 0x00, 0x08, 0xf7, + 0xcc, 0x6c, 0x6e, 0xce, 0xce, 0xc6, 0x66, 0x64, 0x16, 0x44, 0x17, 0x04, + 0x04, 0x46, 0xcf, 0x78, 0x00, 0x00, 0x07, 0xf7, 0x74, 0x6c, 0x6c, 0xcc, + 0x16, 0xc6, 0x03, 0x64, 0x16, 0x44, 0x13, 0x04, 0x44, 0x40, 0x40, 0x44, + 0x40, 0x46, 0x7f, 0xf8, 0x00, 0x00, 0x08, 0xf7, 0xc6, 0x46, 0x66, 0x6c, + 0x6c, 0x66, 0x46, 0x46, 0x16, 0x44, 0x17, 0x04, 0x04, 0x44, 0xef, 0x78, + 0x00, 0x00, 0x07, 0xf7, 0xc6, 0x46, 0x4c, 0x16, 0x46, 0x03, 0x66, 0x64, + 0x16, 0x44, 0x15, 0x04, 0x04, 0x44, 0x44, 0x46, 0x7f, 0xf8, 0x00, 0x00, + 0x07, 0xf7, 0xc4, 0x16, 0x64, 0x07, 0x16, 0x44, 0x17, 0x04, 0x04, 0x44, + 0xff, 0x78, 0x00, 0x00, 0x08, 0xf7, 0xc4, 0x16, 0x46, 0x07, 0x16, 0x44, + 0x15, 0x04, 0x04, 0x44, 0x44, 0x4c, 0xef, 0xf8, 0x00, 0x00, 0x07, 0xf7, + 0xc4, 0x64, 0x16, 0x46, 0x06, 0x16, 0x44, 0x14, 0x40, 0x44, 0x44, 0x04, + 0x44, 0x4c, 0xff, 0x78, 0x00, 0x00, 0x08, 0xf7, 0x84, 0x46, 0x44, 0x16, + 0x64, 0x06, 0x16, 0x44, 0x14, 0x04, 0x04, 0x44, 0x44, 0x47, 0xef, 0xf8, + 0x00, 0x00, 0x08, 0xff, 0xc4, 0x44, 0x46, 0x44, 0x16, 0x46, 0x04, 0x16, + 0x44, 0x14, 0x04, 0x16, 0x44, 0x04, 0xce, 0xff, 0x78, 0x00, 0x00, 0x08, + 0xff, 0x84, 0x46, 0x44, 0x16, 0x64, 0x05, 0x66, 0x16, 0x44, 0x13, 0x40, + 0x40, 0x44, 0x44, 0x46, 0xcf, 0xef, 0x70, 0x16, 0x00, 0x03, 0xff, 0xc4, + 0x16, 0x44, 0x04, 0x16, 0x46, 0x04, 0x16, 0x44, 0x12, 0x40, 0x16, 0x44, + 0x04, 0x4c, 0xee, 0xff, 0x70, 0x16, 0x00, 0x03, 0x7f, 0x74, 0x44, 0x44, + 0x16, 0x64, 0x07, 0x16, 0x44, 0x12, 0x04, 0x04, 0x44, 0x44, 0x4e, 0xef, + 0xef, 0x70, 0x16, 0x00, 0x03, 0x7f, 0x76, 0x16, 0x44, 0x05, 0x16, 0x46, + 0x04, 0x16, 0x44, 0x11, 0x40, 0x16, 0x44, 0x04, 0xee, 0xfe, 0xff, 0x80, + 0x16, 0x00, 0x03, 0x8f, 0xf8, 0x16, 0x44, 0x03, 0x16, 0x64, 0x06, 0x16, + 0x44, 0x12, 0x40, 0x44, 0x44, 0x4c, 0xee, 0xef, 0xf7, 0x80, 0x16, 0x00, + 0x03, 0x8f, 0xfc, 0x16, 0x44, 0x06, 0x16, 0x46, 0x03, 0x16, 0x44, 0x11, + 0x04, 0x04, 0x44, 0x44, 0x6e, 0xef, 0xef, 0xf7, 0x16, 0x00, 0x04, 0x07, + 0xf7, 0x16, 0x44, 0x04, 0x16, 0x64, 0x03, 0x16, 0x46, 0x03, 0x16, 0x44, + 0x13, 0x46, 0xce, 0xee, 0xff, 0x77, 0x16, 0x00, 0x04, 0x08, 0xff, 0x84, + 0x16, 0x44, 0x05, 0x46, 0x44, 0x16, 0x64, 0x03, 0x16, 0x44, 0x0f, 0x04, + 0x44, 0x44, 0x4c, 0xec, 0xef, 0xef, 0xf8, 0x16, 0x00, 0x04, 0x08, 0x7f, + 0x74, 0x16, 0x44, 0x03, 0x46, 0x46, 0x44, 0x16, 0x46, 0x04, 0x16, 0x44, + 0x12, 0xcc, 0xec, 0xef, 0xff, 0x70, 0x16, 0x00, 0x05, 0x7f, 0xf4, 0x16, + 0x44, 0x05, 0x46, 0x44, 0x44, 0x16, 0x64, 0x03, 0x16, 0x44, 0x10, 0x46, + 0xc6, 0xcc, 0xf7, 0xf7, 0x70, 0x16, 0x00, 0x05, 0x8f, 0xf7, 0x04, 0x16, + 0x44, 0x05, 0x16, 0x46, 0x05, 0x16, 0x44, 0x10, 0xc4, 0xc6, 0xcc, 0xfe, + 0xf7, 0x16, 0x00, 0x06, 0x07, 0xff, 0x16, 0x44, 0x05, 0x46, 0x16, 0x44, + 0x03, 0x16, 0x64, 0x04, 0x16, 0x44, 0x0c, 0x46, 0x66, 0x66, 0x6c, 0x67, + 0x7f, 0x77, 0x16, 0x00, 0x06, 0x08, 0xff, 0x74, 0x04, 0x16, 0x44, 0x04, + 0x16, 0x46, 0x05, 0x4c, 0x46, 0x16, 0x44, 0x0c, 0x64, 0xc4, 0xc4, 0xc6, + 0xc7, 0x7f, 0x70, 0x16, 0x00, 0x07, 0x8f, 0xf6, 0x16, 0x44, 0x09, 0x16, + 0x64, 0x05, 0x16, 0x44, 0x08, 0x46, 0xc6, 0xc6, 0x66, 0x6c, 0x6c, 0x77, + 0x77, 0x80, 0x16, 0x00, 0x07, 0x87, 0xf7, 0x40, 0x16, 0x44, 0x05, 0x16, + 0x46, 0x09, 0x16, 0x44, 0x06, 0xc6, 0xc6, 0x66, 0x66, 0xc6, 0xc6, 0xc7, + 0x77, 0xf7, 0x16, 0x00, 0x08, 0x08, 0xff, 0xc4, 0x16, 0x44, 0x09, 0x16, + 0x64, 0x05, 0x66, 0x66, 0x64, 0x66, 0x6c, 0x16, 0x66, 0x03, 0xc6, 0xc6, + 0x6c, 0x6c, 0xc7, 0x77, 0x78, 0x16, 0x00, 0x09, 0x7f, 0xf6, 0x04, 0x16, + 0x44, 0x05, 0x16, 0x46, 0x08, 0x64, 0x64, 0x6c, 0x66, 0x66, 0x16, 0xc6, + 0x03, 0x66, 0x66, 0xc6, 0x6c, 0x77, 0x7f, 0x80, 0x16, 0x00, 0x09, 0x07, + 0xf7, 0x16, 0x44, 0x0a, 0x16, 0x64, 0x04, 0x66, 0xc6, 0x64, 0x64, 0x16, + 0x66, 0x04, 0xc6, 0xc6, 0x6c, 0xc7, 0xe7, 0x77, 0x16, 0x00, 0x0a, 0x08, + 0x7f, 0x74, 0x16, 0x44, 0x06, 0x16, 0x46, 0x03, 0x44, 0x16, 0x64, 0x05, + 0xc6, 0x66, 0x66, 0x16, 0xc6, 0x03, 0x66, 0x6c, 0x6c, 0xe7, 0x77, 0x70, + 0x16, 0x00, 0x0b, 0x87, 0xfc, 0x16, 0x44, 0x09, 0x64, 0x16, 0x46, 0x03, + 0x4c, 0x16, 0x46, 0x04, 0x16, 0x66, 0x03, 0xc6, 0xc6, 0xce, 0xde, 0x77, + 0x80, 0x16, 0x00, 0x0b, 0x08, 0x7f, 0xc4, 0x16, 0x44, 0x07, 0x64, 0x44, + 0x16, 0x64, 0x05, 0x16, 0x66, 0x03, 0x46, 0xc6, 0xc6, 0x66, 0x6c, 0x77, + 0xe7, 0x78, 0x16, 0x00, 0x0d, 0x87, 0xfc, 0x16, 0x44, 0x08, 0x64, 0x44, + 0x46, 0x46, 0x4c, 0x16, 0x46, 0x04, 0x16, 0x66, 0x03, 0xc6, 0xce, 0x7e, + 0xd7, 0x80, 0x16, 0x00, 0x0d, 0x08, 0x7f, 0xc4, 0x16, 0x44, 0x08, 0x16, + 0x64, 0x06, 0xc6, 0x66, 0x4c, 0x46, 0xc6, 0xce, 0x7c, 0x77, 0x78, 0x16, + 0x00, 0x0f, 0x87, 0xf7, 0x16, 0x44, 0x0a, 0x16, 0x46, 0x06, 0x66, 0x66, + 0x6c, 0xec, 0xe7, 0xe7, 0x16, 0x00, 0x11, 0x8f, 0x7c, 0x16, 0x44, 0x07, + 0x16, 0x64, 0x09, 0x6c, 0xec, 0xe7, 0xc7, 0x80, 0x16, 0x00, 0x11, 0x08, + 0x77, 0xc6, 0x16, 0x44, 0x09, 0x16, 0x46, 0x04, 0x4c, 0x6c, 0xec, 0xee, + 0xc7, 0x78, 0x16, 0x00, 0x13, 0x07, 0x77, 0xcc, 0x16, 0x44, 0x06, 0x16, + 0x64, 0x05, 0xc4, 0xc6, 0xce, 0xce, 0xec, 0x78, 0x16, 0x00, 0x15, 0x88, + 0x77, 0xc6, 0xc4, 0xc4, 0x16, 0x44, 0x07, 0xc6, 0xc6, 0x16, 0xec, 0x03, + 0x78, 0x80, 0x16, 0x00, 0x16, 0x88, 0x77, 0xcc, 0x16, 0x4c, 0x06, 0x16, + 0x6c, 0x03, 0xec, 0xec, 0xe6, 0xe8, 0x80, 0x16, 0x00, 0x18, 0x88, 0x87, + 0xcc, 0x16, 0xc6, 0x03, 0x16, 0xcc, 0x03, 0xe6, 0xec, 0xe6, 0xe6, 0x78, + 0x16, 0x00, 0x1c, 0x88, 0x87, 0x16, 0xcc, 0x06, 0xc6, 0x76, 0x88, 0x16, + 0x00, 0x1f, 0x80, 0x16, 0x88, 0x05, 0x80, 0x16, 0x00, 0x88 +}; Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Tue Jul 21 20:30:06 2015 (r285765) +++ head/sys/dev/vt/vt.h Tue Jul 21 20:33:36 2015 (r285766) @@ -164,7 +164,12 @@ struct vt_device { #define VD_PASTEBUFSZ(vd) ((vd)->vd_pastebuf.vpb_bufsz) #define VD_PASTEBUFLEN(vd) ((vd)->vd_pastebuf.vpb_len) +#define VT_LOCK(vd) mtx_lock(&(vd)->vd_lock) +#define VT_UNLOCK(vd) mtx_unlock(&(vd)->vd_lock) +#define VT_LOCK_ASSERT(vd, what) mtx_assert(&(vd)->vd_lock, what) + void vt_resume(struct vt_device *vd); +void vt_resume_flush_timer(struct vt_device *vd, int ms); void vt_suspend(struct vt_device *vd); /* @@ -363,6 +368,7 @@ struct vt_driver { * Utility macro to make early vt(4) instances work. */ +extern struct terminal vt_consterm; extern const struct terminal_class vt_termclass; void vt_upgrade(struct vt_device *vd); @@ -427,10 +433,29 @@ void vt_mouse_state(int show); #define VT_MOUSE_HIDE 0 /* Utilities. */ +void vt_compute_drawable_area(struct vt_window *); void vt_determine_colors(term_char_t c, int cursor, term_color_t *fg, term_color_t *bg); int vt_is_cursor_in_area(const struct vt_device *vd, const term_rect_t *area); +void vt_termsize(struct vt_device *, struct vt_font *, term_pos_t *); +void vt_winsize(struct vt_device *, struct vt_font *, struct winsize *); + +/* Logos-on-boot. */ +#define VT_LOGOS_DRAW_BEASTIE 0 +#define VT_LOGOS_DRAW_ALT_BEASTIE 1 +#define VT_LOGOS_DRAW_ORB 2 + +extern int vt_draw_logo_cpus; +extern int vt_splash_cpu; +extern int vt_splash_ncpu; +extern int vt_splash_cpu_style; +extern int vt_splash_cpu_duration; + +extern const unsigned int vt_logo_sprite_height; +extern const unsigned int vt_logo_sprite_width; + +void vtterm_draw_cpu_logos(struct vt_device *); #endif /* !_DEV_VT_VT_H_ */ Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Tue Jul 21 20:30:06 2015 (r285765) +++ head/sys/dev/vt/vt_core.c Tue Jul 21 20:33:36 2015 (r285766) @@ -113,10 +113,6 @@ const struct terminal_class vt_termclass #define VT_BELLDURATION ((5 * hz + 99) / 100) #define VT_BELLPITCH 800 -#define VT_LOCK(vd) mtx_lock(&(vd)->vd_lock) -#define VT_UNLOCK(vd) mtx_unlock(&(vd)->vd_lock) -#define VT_LOCK_ASSERT(vd, what) mtx_assert(&(vd)->vd_lock, what) - #define VT_UNIT(vw) ((vw)->vw_device->vd_unit * VT_MAXWINDOWS + \ (vw)->vw_number) @@ -139,6 +135,15 @@ static VT_SYSCTL_INT(kbd_debug, 1, "Enab static VT_SYSCTL_INT(kbd_panic, 0, "Enable request to panic. " "See kbdmap(5) to configure."); +/* Used internally, not a tunable. */ +int vt_draw_logo_cpus; +VT_SYSCTL_INT(splash_cpu, 1, "Show logo CPUs during boot"); +VT_SYSCTL_INT(splash_ncpu, 0, "Override number of logos displayed " + "(0 = do not override)"); +VT_SYSCTL_INT(splash_cpu_style, 1, "Draw logo style " + "(0=Beastie, 1=Alternate 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"); @@ -176,7 +181,7 @@ SET_DECLARE(vt_drv_set, struct vt_driver #define _VTDEFH MAX(100, PIXEL_HEIGHT(VT_FB_DEFAULT_HEIGHT)) #define _VTDEFW MAX(200, PIXEL_WIDTH(VT_FB_DEFAULT_WIDTH)) -static struct terminal vt_consterm; +struct terminal vt_consterm; static struct vt_window vt_conswindow; static struct vt_device vt_consdev = { .vd_driver = NULL, @@ -223,7 +228,7 @@ static struct vt_window vt_conswindow = .vw_kbdmode = K_XLATE, .vw_grabbed = 0, }; -static struct terminal vt_consterm = { +struct terminal vt_consterm = { .tm_class = &vt_termclass, .tm_softc = &vt_conswindow, .tm_flags = TF_CONS, @@ -275,7 +280,7 @@ vt_schedule_flush(struct vt_device *vd, callout_schedule(&vd->vd_timer, hz / (1000 / ms)); } -static void +void vt_resume_flush_timer(struct vt_device *vd, int ms) { @@ -548,11 +553,13 @@ vt_window_switch(struct vt_window *vw) return (0); } -static inline void +void vt_termsize(struct vt_device *vd, struct vt_font *vf, term_pos_t *size) { size->tp_row = vd->vd_height; + if (vt_draw_logo_cpus) + size->tp_row -= vt_logo_sprite_height; size->tp_col = vd->vd_width; if (vf != NULL) { size->tp_row /= vf->vf_height; @@ -561,10 +568,33 @@ vt_termsize(struct vt_device *vd, struct } static inline void +vt_termrect(struct vt_device *vd, struct vt_font *vf, term_rect_t *rect) +{ + + rect->tr_begin.tp_row = rect->tr_begin.tp_col = 0; + if (vt_draw_logo_cpus) + rect->tr_begin.tp_row = vt_logo_sprite_height; + + rect->tr_end.tp_row = vd->vd_height; + rect->tr_end.tp_col = vd->vd_width; + + if (vf != NULL) { + rect->tr_begin.tp_row = + howmany(rect->tr_begin.tp_row, vf->vf_height); + + rect->tr_end.tp_row /= vf->vf_height; + rect->tr_end.tp_col /= vf->vf_width; + } +} + +void vt_winsize(struct vt_device *vd, struct vt_font *vf, struct winsize *size) { - size->ws_row = size->ws_ypixel = vd->vd_height; + size->ws_ypixel = vd->vd_height; + if (vt_draw_logo_cpus) + size->ws_ypixel -= vt_logo_sprite_height; + size->ws_row = size->ws_ypixel; size->ws_col = size->ws_xpixel = vd->vd_width; if (vf != NULL) { size->ws_row /= vf->vf_height; @@ -572,17 +602,20 @@ vt_winsize(struct vt_device *vd, struct } } -static inline void +void vt_compute_drawable_area(struct vt_window *vw) { struct vt_device *vd; struct vt_font *vf; + vt_axis_t height; vd = vw->vw_device; if (vw->vw_font == NULL) { vw->vw_draw_area.tr_begin.tp_col = 0; vw->vw_draw_area.tr_begin.tp_row = 0; + if (vt_draw_logo_cpus) + vw->vw_draw_area.tr_begin.tp_row = vt_logo_sprite_height; vw->vw_draw_area.tr_end.tp_col = vd->vd_width; vw->vw_draw_area.tr_end.tp_row = vd->vd_height; return; @@ -595,12 +628,17 @@ vt_compute_drawable_area(struct vt_windo * the screen. */ + height = vd->vd_height; + if (vt_draw_logo_cpus) + height -= vt_logo_sprite_height; vw->vw_draw_area.tr_begin.tp_col = (vd->vd_width % vf->vf_width) / 2; - vw->vw_draw_area.tr_begin.tp_row = (vd->vd_height % vf->vf_height) / 2; + vw->vw_draw_area.tr_begin.tp_row = (height % vf->vf_height) / 2; + if (vt_draw_logo_cpus) + vw->vw_draw_area.tr_begin.tp_row += vt_logo_sprite_height; vw->vw_draw_area.tr_end.tp_col = vw->vw_draw_area.tr_begin.tp_col + vd->vd_width / vf->vf_width * vf->vf_width; vw->vw_draw_area.tr_end.tp_row = vw->vw_draw_area.tr_begin.tp_row + - vd->vd_height / vf->vf_height * vf->vf_height; + height / vf->vf_height * vf->vf_height; } static void @@ -1111,7 +1149,6 @@ vt_flush(struct vt_device *vd) struct vt_window *vw; struct vt_font *vf; term_rect_t tarea; - term_pos_t size; #ifndef SC_NO_CUTPASTE int cursor_was_shown, cursor_moved; #endif @@ -1166,14 +1203,14 @@ vt_flush(struct vt_device *vd) #endif vtbuf_undirty(&vw->vw_buf, &tarea); - vt_termsize(vd, vf, &size); /* Force a full redraw when the screen contents are invalid. */ if (vd->vd_flags & VDF_INVALID) { - tarea.tr_begin.tp_row = tarea.tr_begin.tp_col = 0; - tarea.tr_end = size; - vd->vd_flags &= ~VDF_INVALID; + + vt_termrect(vd, vf, &tarea); + if (vt_draw_logo_cpus) + vtterm_draw_cpu_logos(vd); } if (tarea.tr_begin.tp_col < tarea.tr_end.tp_col) { @@ -1318,7 +1355,8 @@ vtterm_cnprobe(struct terminal *tm, stru if (vtdbest != NULL) { #ifdef DEV_SPLASH - vtterm_splash(vd); + if (!vt_splash_cpu) + vtterm_splash(vd); #endif vd->vd_flags |= VDF_INITIALIZED; } Added: head/sys/dev/vt/vt_cpulogos.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/vt/vt_cpulogos.c Tue Jul 21 20:33:36 2015 (r285766) @@ -0,0 +1,266 @@ +/*- + * Copyright (c) 2015 Conrad Meyer <cse.cem@gmail.com> + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + +#include <sys/param.h> +#include <sys/callout.h> +#include <sys/cons.h> +#include <sys/kernel.h> +#include <sys/smp.h> +#include <sys/systm.h> +#include <sys/terminal.h> + +#include <dev/vt/vt.h> + +extern const unsigned char vt_beastie_vga16[]; +extern const unsigned char vt_beastie2_vga16[]; +extern const unsigned char vt_orb_vga16[]; + +static struct callout vt_splash_cpu_callout; + +static inline unsigned char +vt_vga2bsd(unsigned char vga) +{ + static const unsigned char lut[8] = { + 0, + 4, /* 1 and 4 swap */ + 2, + 6, /* 3 and 6 swap */ + 1, /* 4 and 1 swap */ + 5, + 3, /* 6 and 3 swap */ + 7, + }; + unsigned int bright; + + bright = (vga & 0x8); + return (lut[vga & 0x7] | bright); +} + +static void +vt_draw_2_vga16_px(struct vt_device *vd, vt_axis_t x, vt_axis_t y, + unsigned char color) +{ + + vd->vd_driver->vd_setpixel(vd, x, y, vt_vga2bsd(color >> 4)); + vd->vd_driver->vd_setpixel(vd, x + 1, y, vt_vga2bsd(color & 0xf)); +} + +static void +vt_draw_1_logo(struct vt_device *vd, vt_axis_t top, vt_axis_t left) +{ + const unsigned char rle_sent = 0x16, *data; + unsigned int xy, run, runcolor, i; + + switch (vt_splash_cpu_style) { + case VT_LOGOS_DRAW_ALT_BEASTIE: + data = vt_beastie2_vga16; + break; + case VT_LOGOS_DRAW_ORB: + data = vt_orb_vga16; + break; + case VT_LOGOS_DRAW_BEASTIE: + /* FALLTHROUGH */ + default: + data = vt_beastie_vga16; + break; + } + + /* Decode basic RLE (gets us to 30-40% of uncompressed data size): */ + for (i = 0, xy = 0; xy < vt_logo_sprite_height * vt_logo_sprite_width;) { + if (data[i] == rle_sent) { + runcolor = data[i + 1]; + run = data[i + 2]; + + for (; run; run--, xy += 2) + vt_draw_2_vga16_px(vd, + left + (xy % vt_logo_sprite_width), + top + (xy / vt_logo_sprite_width), + runcolor); + + i += 3; + } else { + vt_draw_2_vga16_px(vd, left + (xy % vt_logo_sprite_width), + top + (xy / vt_logo_sprite_width), data[i]); + + i++; + xy += 2; + } + } +} + +void +vtterm_draw_cpu_logos(struct vt_device *vd) +{ + unsigned int ncpu, i; + vt_axis_t left; + + if (vt_splash_ncpu) + ncpu = vt_splash_ncpu; + else { + ncpu = mp_ncpus; + if (ncpu < 1) + ncpu = 1; + } + + if (vd->vd_driver->vd_drawrect) + vd->vd_driver->vd_drawrect(vd, 0, 0, vd->vd_width, + vt_logo_sprite_height, 1, TC_BLACK); + /* + * Blank is okay because we only ever draw beasties on full screen + * refreshes. + */ + else if (vd->vd_driver->vd_blank) + vd->vd_driver->vd_blank(vd, TC_BLACK); + + ncpu = MIN(ncpu, vd->vd_width / vt_logo_sprite_width); + for (i = 0, left = 0; i < ncpu; left += vt_logo_sprite_width, i++) + vt_draw_1_logo(vd, 0, left); +} + +static void +vt_fini_logos(void *dummy __unused) +{ + struct vt_device *vd; + struct vt_window *vw; + struct terminal *tm; + struct vt_font *vf; + struct winsize wsz; + term_pos_t size; + + if (!vt_draw_logo_cpus) + return; + if (!vty_enabled(VTY_VT)) + return; + 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; + + VT_LOCK(vd); + if ((vd->vd_flags & (VDF_DEAD | VDF_TEXTMODE)) != 0) + goto out; + + 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); + } + +out: + VT_UNLOCK(vd); +} + +static void +vt_init_logos(void *dummy) +{ + struct vt_device *vd; + struct vt_window *vw; + struct terminal *tm; + struct vt_font *vf; + struct winsize wsz; + term_pos_t size; + + if (!vty_enabled(VTY_VT)) + return; + 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; + + VT_LOCK(vd); + KASSERT((vd->vd_flags & VDF_INITIALIZED) != 0, + ("vd %p not initialized", vd)); + + if ((vd->vd_flags & (VDF_DEAD | VDF_TEXTMODE)) != 0) + goto out; + if (vd->vd_height <= vt_logo_sprite_height) + goto out; + + vt_draw_logo_cpus = 1; + 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); + } + + callout_init(&vt_splash_cpu_callout, 1); + callout_reset(&vt_splash_cpu_callout, vt_splash_cpu_duration * hz, + vt_fini_logos, NULL); + +out: + VT_UNLOCK(vd); +} +SYSINIT(vt_logos, SI_SUB_CPU + 1, SI_ORDER_ANY, vt_init_logos, NULL);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507212033.t6LKXbTj041660>