From owner-cvs-sys Mon Nov 11 23:46:01 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id XAA29812 for cvs-sys-outgoing; Mon, 11 Nov 1996 23:46:01 -0800 (PST) Received: from ra.dkuug.dk (ra.dkuug.dk [193.88.44.193]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id XAA29803; Mon, 11 Nov 1996 23:45:53 -0800 (PST) Received: (from sos@localhost) by ra.dkuug.dk (8.6.12/8.6.12) id IAA24378; Tue, 12 Nov 1996 08:45:43 +0100 Message-Id: <199611120745.IAA24378@ra.dkuug.dk> Subject: Re: cvs commit: src/sys/i386/isa syscons.c To: dg@root.com Date: Tue, 12 Nov 1996 08:45:43 +0100 (MET) Cc: sos@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-sys@freefall.freebsd.org In-Reply-To: <199611120358.TAA04500@root.com> from "David Greenman" at Nov 11, 96 07:58:33 pm From: sos@FreeBSD.org Reply-to: sos@FreeBSD.org X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-cvs-sys@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk In reply to David Greenman who wrote: > > > 4. (Most important.) Don't corrupt memory beyond the screen buffers if > > the cursor happens to be off the 80x25 screen when syscons starts. > > Should this patch be brought into 2.1.6? It wont hurt.. > > Index: syscons.c > =================================================================== > RCS file: /home/ncvs/src/sys/i386/isa/syscons.c,v > retrieving revision 1.117.4.12 > diff -c -r1.117.4.12 syscons.c > *** syscons.c 1996/06/27 21:39:55 1.117.4.12 > --- syscons.c 1996/11/12 03:55:19 > *************** > *** 1984,1989 **** > --- 1984,1996 ---- > outb(crtc_addr, 15); > hw_cursor |= inb(crtc_addr + 1); > > + /* > + * Validate cursor location. It may be off the screen. Then we must > + * not use it for the initial buffer offset. > + */ > + if (hw_cursor >= ROW * COL) > + hw_cursor = (ROW - 1) * COL; > + > /* move hardware cursor out of the way */ > outb(crtc_addr, 14); > outb(crtc_addr + 1, 0xff); > > -DG > > David Greenman > Core-team/Principal Architect, The FreeBSD Project > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Soren Schmidt (sos@FreeBSD.org) FreeBSD Core Team So much code to hack -- so little time.