Date: Thu, 14 Aug 1997 17:37:34 +0900 (JST) From: grog@lemis.com To: msmith@atrad.adelaide.edu.au (Michael Smith) Cc: hackers@freebsd.org (FreeBSD Hackers) Subject: Re: reset screen hardware? Message-ID: <199708140837.RAA00646@papillon.lemis.com> In-Reply-To: <199708130318.MAA11651@genesis.atrad.adelaide.edu.au> from Michael Smith at "Aug 13, 97 12:48:19 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Michael Smith writes: > Alfred Perlstein stands accused of saying: >> I'm not familiar with the protection mechanism in freebsd, if i wrote a >> program to reset the text screens by programming the ports what kind of >> skeleton code would it need? > > It wouldn't work. Why not? The X server does just that. Sure, before it starts, it does a lot of checking, but that's relatively recent. Just a few years ago, you had to tell the X server what your board was. And if you were wrong, to quote you: > You would, in fact, stand a reasonable chance of producing a program > which would be able to destroy utterly older monitors and many LCD > panels. Yes, you're right about the consequences. But your conclusions are wrong. This is, in other words, an argument why X can't work on PCs. >> Btw, there are interupts that point to tables of data that is put into >> the videocard to set various modes, could the kernel save the data before >> it switches to protected mode? > > Different cards have different register sets. There is no structure > in a video card BIOS that describes the data and the registers in such > a fashion that you can manipulate them without first knowing what the > card is. Yes, of course, of course, and we've all been through this dozens of times before. Having to tell your system what kind of board(s) it has stinks, but IMO it's still better than having a panic and not being able to enter the debugger because the bugger is still in graphics mode. Alfred: Mike's right. It's a pain, and also a can of worms. But he's wrong when he says it can't be done. If you want to do yourself and everybody else a service, investigate the probe and reset code in XFree86 and figure out how to cannibalize it to save the board state (it makes sense to have this done during boot at probe time) and create an ioctl to use this information to reset to text mode. Greg
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708140837.RAA00646>