Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Apr 2000 21:39:31 -0400 (EDT)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        naddy@mips.rhein-neckar.de (Christian Weisgerber)
Cc:        freebsd-alpha@FreeBSD.ORG, yokota@FreeBSD.ORG
Subject:   Re: vidcontrol kills 4.0-STABLE
Message-ID:  <14596.62653.979522.393187@grasshopper.cs.duke.edu>
In-Reply-To: <8e27qa$2u90$1@bigeye.rhein-neckar.de>
References:  <8e27qa$2u90$1@bigeye.rhein-neckar.de>

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

Christian Weisgerber writes:
 > Apparently I have managed to crash 4.0-STABLE on alpha (AXPpci33
 > with VGA) by doing a simple
 > 
 > # vidcontrol -i adapter </dev/ttyv0
 > 
 > I'm not sure what happened exactly since I won't have access to
 > the console before tomorrow. The box doesn't respond to ping and
 > it doesn't get up again, so it looks pretty fatal.
 > 
 > Can anybody else reproduce this?


The machine probably crashed.  I've duplicated the crash on my home
box:

#0  0xfffffc0000399174 in boot (howto=256) at ../../kern/kern_shutdown.c:302
#1  0xfffffc0000399930 in panic (fmt=0xfffffc000057de6c "trap")
    at ../../kern/kern_shutdown.c:554
#2  0xfffffc0000510250 in trap (a0=18446744065119617760, a1=1, a2=0, entry=2, 
    framep=0xfffffe0007e1b850) at ../../alpha/alpha/trap.c:546
#3  0xfffffc00005021cc in XentMM () at ../../alpha/alpha/exception.s:94
#4  0xfffffc000052daa8 in fb_commonioctl (adp=0xfffffc00005fe988,cmd=0, 
    arg=0xfffffe0000942400 "") at machine/pmap.h:140
#5  0xfffffc0000532920 in vga_dev_ioctl (adp=0xfffffc00005fe988,cmd=0, 
    arg=0xfffffe0000942400 "") at ../../dev/fb/vga.c:2951
#6  0xfffffc000053fd5c in sc_vid_ioctl (tp=0xfffffc0000600790, cmd=0, 
    data=0xfffffe0000942400 "", flag=0, p=0x0)
    at ../../dev/syscons/scvidctl.c:580
#7  0xfffffc0000541fe0 in scioctl (dev=0x0, cmd=3233309541, 
    data=0xfffffe0000942400 "", flag=3, p=0xfffffe00076b66c0)
    at ../../dev/syscons/syscons.c:674
#8  0xfffffc00003c2afc in cnioctl (dev=0xfffffc00005e6728,cmd=3233309541, 
    data=0xfffffe0000942400 "", flag=3, p=0xfffffe00076b66c0)
    at ../../kern/tty_cons.c:383
#9  0xfffffc00003f9ff4 in spec_ioctl (ap=0xfffffe0007e1bd30)
    at ../../miscfs/specfs/spec_vnops.c:304
#10 0xfffffc00003f9acc in spec_vnoperate (ap=0x0)
    at ../../miscfs/specfs/spec_vnops.c:117
<...>

The problem is the call to vtophys around line of sys/dev/fb.c
From the value in my crash, it looks like this is an IO address, not a 
virtual address:

(kgdb) p/x adp->va_info->vi_window
$7 = 0xb8000

I don't know enough about how the return values of this ioctl are used 
to know how to fix it  My knee jerk reaction is to do the following.
I'm wondering what the syscons author thinks?

Index: fb.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/fb/fb.c,v
retrieving revision 1.11
diff -u -r1.11 fb.c
--- fb.c	1999/12/07 11:23:58	1.11
+++ fb.c	2000/04/25 01:36:14
@@ -719,7 +719,11 @@
 		((video_adapter_info_t *)arg)->va_mem_base = adp->va_mem_base;
 		((video_adapter_info_t *)arg)->va_mem_size = adp->va_mem_size;
 		((video_adapter_info_t *)arg)->va_window
+#ifdef __i386__
 			= vtophys(adp->va_window);
+#else
+			= adp->va_window;
+#endif
 		((video_adapter_info_t *)arg)->va_window_size
 			= adp->va_window_size;
 		((video_adapter_info_t *)arg)->va_window_gran
@@ -727,7 +731,11 @@
 		((video_adapter_info_t *)arg)->va_window_orig
 			= adp->va_window_orig;
 		((video_adapter_info_t *)arg)->va_unused0
+#ifdef __i386__
 			= (adp->va_buffer) ? vtophys(adp->va_buffer) : 0;
+#else
+			= adp->va_buffer;
+#endif
 		((video_adapter_info_t *)arg)->va_buffer_size
 			= adp->va_buffer_size;
 		((video_adapter_info_t *)arg)->va_mode = adp->va_mode;


Cheers,

Drew
------------------------------------------------------------------------------
Andrew Gallatin, Sr Systems Programmer	http://www.cs.duke.edu/~gallatin
Duke University				Email: gallatin@cs.duke.edu
Department of Computer Science		Phone: (919) 660-6590


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




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