Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Nov 1996 17:42:23 +0900 (JST)
From:      ohki@gssm.otsuka.tsukuba.ac.jp
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   i386/2058: amity series machines can not show installation menu
Message-ID:  <199611190842.RAA07432@smri01.gssm.otsuka.tsukuba.ac.jp>
Resent-Message-ID: <199611190850.AAA23578@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611190842.RAA07432>