Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Jay Estabrook - Alpha Migration Tools - LINUX Project <jestabro@brillig.amt.tay1.dec.com>
Subject: Important TGA-related patch
Date: Sun, 21 Jan 96 16:30:20 -0500	[thread overview]
Message-ID: <9601212130.AA03928@brillig.amt.tay1.dec.com> (raw)

Gang,

Here's a patch for *all* Alpha Linux kernels from 1.3.38 on, which is
MANDATORY for building *any* kernels with TGA console configured. The
problem manifests itself in unpredictable occurance of machine checks,
because of a bogus assumption I made related to the allocation of the
"shadow screen" memory; ie, that it *would* always be below any other VC's
backing store, if I allocated it during console initialization. IT AINT
SO... :-( :-(

The problem is likely to manifest itself on any TGA-configured machine,
especially those with relatively small amounts of physical memory.

Dave Rusling, this should not be a problem in MILO, I believe, but correct
me if I'm wrong.

Anyway, sorry about the late appearance of this, but better late than later,
I always say... :-)

--Jay++

-------------------------------------------------------------------------------

diff -u --recursive old/drivers/char/selection.h new/drivers/char/selection.h
--- old/drivers/char/selection.h	Thu Jan 18 03:18:01 1996
+++ new/drivers/char/selection.h	Thu Dec 21 07:31:00 1995
@@ -77,12 +77,9 @@
  * of the VC's backing store, or the "shadow screen" memory where the screen
  * contents are kept, as the TGA frame buffer is *not* char/attr cells.
  *
- * The "(unsigned long) addr < video_mem_term" tests for an Alpha kernel
- *  virtual address less than the end of the "shadow scrren" memory. This
- *  indicates we really want to write to the screen, so, we do... :-)
- *
- * NOTE: we must guarantee that video_mem_term is less than *any* VC's backing
- * store; to do that, we must allocate it earlier than any VC's are done.
+ * We must test for an Alpha kernel virtual address that falls within
+ *  the "shadow screen" memory. This condition indicates we really want 
+ *  to write to the screen, so, we do... :-)
  *
  * NOTE also: there's only *TWO* operations: to put/get a character/attribute.
  *  All the others needed by VGA support go away, as Not Applicable for TGA.
@@ -94,7 +91,8 @@
 	 * if so, then render the char/attr onto the real screen.
         */
         *addr = val;
-        if ((unsigned long)addr < video_mem_term) {
+        if ((unsigned long)addr < video_mem_term &&
+	    (unsigned long)addr >= video_mem_base) {
                 tga_blitc(val, (unsigned long) addr);
         }
 }

-------------------------------------------------------------------------------
  American Non Sequitur Society: we don't make sense, but we do like pizza...

Jay A Estabrook                         Alpha Migration Tools
Mailstop: TAY1-2                        (DTN) 227-4202
Digital Equipment Corp.                 (external) (508) 952-4202
151 Taylor Street                       enet: jestabro@amt.tay1.dec.com
Littleton, MA 01460-1407                decnet: tallis::jestabro
-------------------------------------------------------------------------------

                 reply	other threads:[~1996-01-21 21:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox