From owner-freebsd-bugs Tue Nov 19 00:50:04 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id AAA23584 for bugs-outgoing; Tue, 19 Nov 1996 00:50:04 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id AAA23578; Tue, 19 Nov 1996 00:50:03 -0800 (PST) Resent-Date: Tue, 19 Nov 1996 00:50:03 -0800 (PST) Resent-Message-Id: <199611190850.AAA23578@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, ohki@gssm.otsuka.tsukuba.ac.jp Received: from utogw.gssm.otsuka.tsukuba.ac.jp (utogwgw.gssm.otsuka.tsukuba.ac.jp [130.158.176.189]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id AAA23424 for ; Tue, 19 Nov 1996 00:43:48 -0800 (PST) Received: from smri01.gssm.otsuka.tsukuba.ac.jp (smri01 [192.50.17.160]) by utogw.gssm.otsuka.tsukuba.ac.jp (8.6.12/8.6.9) with ESMTP id RAA02236 for ; Tue, 19 Nov 1996 17:42:55 +0900 Received: (from ohki@localhost) by smri01.gssm.otsuka.tsukuba.ac.jp (8.7.5/8.7.3) id RAA07432; Tue, 19 Nov 1996 17:42:23 +0900 (JST) Message-Id: <199611190842.RAA07432@smri01.gssm.otsuka.tsukuba.ac.jp> Date: Tue, 19 Nov 1996 17:42:23 +0900 (JST) From: ohki@gssm.otsuka.tsukuba.ac.jp Reply-To: ohki@gssm.otsuka.tsukuba.ac.jp To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: i386/2058: amity series machines can not show installation menu Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 2058 >Category: i386 >Synopsis: amity series machines can not show installation menu >Confidential: yes >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Nov 19 00:50:01 PST 1996 >Last-Modified: >Originator: Atsuo Ohki >Organization: GSSM, Univ. of Tsukuba, otsuka, tokyo, japan >Release: FreeBSD 2.2-ALPHA >Environment: Mitsubish Amity series Pen Computer (amity/vc, amity/sp) FreeBSD-961014-SNAP and later >Description: After booting the machine with boot.flp, Installation menu should be displayed on the screen, but the screen is filled with meaningless color patches. >How-To-Repeat: Just boot the machine with boot.flp (of 2.2-961014-SNAP or later) >Fix: Video mode map tables of Mitsubishi Amity series machines are somehow different from other DOS machines. In order to make M_VGA_C80x25 mode works (at least), video_mode_ptr (fetched by scinit()) should be adjusted via boot configuration or kernel configuration time. Following context diff supports: boot configuration: via id_flags of sc0 (bit 8 to bit 11) kernel configuration: options "VIDEO_MODE_OFFSET=x" where x=7 for amity/sp, x=5 for amity/vc --- syscons.h Tue Nov 12 18:08:00 1996 +++ syscons.h-new Mon Nov 18 17:50:04 1996 @@ -71,6 +71,7 @@ #define CHAR_CURSOR 0x00004 #define DETECT_KBD 0x00008 #define XT_KEYBD 0x00010 +#define VIDEO_OFF(x) ((x) >> 8) /* attribute flags */ #define NORMAL_ATTR 0x00 --- syscons.c Tue Nov 19 17:28:49 1996 +++ syscons.c-new Tue Nov 19 17:29:09 1996 @@ -102,6 +102,7 @@ static default_attr *current_default; static int flags = 0; static char init_done = COLD; +static char vmp_modified = 0; /* XXX */ static u_short sc_buffer[ROW*COL]; static char switch_in_progress = FALSE; static char write_in_progress = FALSE; @@ -383,6 +384,14 @@ #endif scinit(); +#if 1 /* local modification */ + if (!vmp_modified && video_mode_ptr != NULL) { + int off = VIDEO_OFF(dev->id_flags); + if (off & 0x10) off |= ~0x0f; + video_mode_ptr -= off * 64; + vmp_modified = 1; + } +#endif flags = dev->id_flags; scp = console[0]; @@ -883,6 +892,10 @@ if (!crtc_vga || video_mode_ptr == NULL) return ENXIO; +#ifdef VIDEO_MODE_OFFSET + if ((cmd & 0xff) < VIDEO_MODE_OFFSET) + return ENXIO; +#endif switch (cmd & 0xff) { case M_VGA_C80x60: case M_VGA_M80x60: if (!(fonts_loaded & FONT_8)) @@ -2331,6 +2344,11 @@ pa = (((segoff & 0xffff0000) >> 12) + (segoff & 0xffff)); if (ISMAPPED(pa, 64)) video_mode_ptr = (char *)pa_to_va(pa); +#ifdef VIDEO_MODE_OFFSET + if (video_mode_ptr != NULL) + video_mode_ptr -= (VIDEO_MODE_OFFSET)*64; + vmp_modified = 1; +#endif } } current_default = &user_default; >Audit-Trail: >Unformatted: