[comp.unix.i386] Is SCO KDMAPDISP kernel panic fixed in 3.2.2?

rick@pcrat.uucp (Rick Richardson) (07/29/90)

I wonder if there's someone out there who has upgraded to
the latest SCO UNIX rev (3.2.2?) that would be willing to
run a little test to see if they've fixed the KDMAPDISP
ioctl.  In 3.2.0, this baby would panic the kernel.  In
other variants (AT&T, ISC, ESIX, Dell) that I've tried
it has worked OK all along.

The program is short, but potentially damaging (although
I've never lost or damaged anything trying it) since it
can cause the kernel to panic.  Use at your own risk, etc.
The program doesn't and isn't expected to do anything useful.

Any brave souls with SCO 3.2.2 and an EGA or VGA out there? 

War mongers can also save this posting for the "which SVR3.2
UNIX is better" arguments.  Carry the binary around with
you.  Doesn't matter where you compiled it.  If you feel
you are losing the battle, just load it up on your opponents
machine and run it. What! A user mode process panics your
system?  Heh, heh.

-Rick

#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
#	scobomb.c
# This archive created: Sat Jul 28 20:35:16 1990
export PATH; PATH=/bin:/usr/bin:$PATH
if test -f 'scobomb.c'
then
	echo shar: "will not over-write existing file 'scobomb.c'"
else
sed 's/^X//' << \SHAR_EOF > 'scobomb.c'
X/*
X *	Test program to demonstrate SCO kernel panic
X *
X *	cc -DSCO scobomb.c -o scobomb	# On SCO brand UNIX
X *
X *	cc scobomb.c -o scobomb		# On INTERACTIVE brand UNIX
X */
X#include <stdio.h>
X
X#include <sys/types.h>
X
X#ifdef SCO
X#include <sys/vtkd.h>
X#else
X#include <sys/at_ansi.h>
X#include <sys/kd.h>
X#endif
X
Xmain()
X{
X	struct kd_memloc	mem;
X	char			*vaddr;
X	int			rc;
X	char			*malloc();
X
X/* Sync disk, just in case */
X	sync(); sync(); sync();
X
X/* Into Graphics mode */
X	ioctl(0, SW_ENH_CG640, 0);
X
X/* Map Display memory (this panics SCO 3.2.0) */
X	vaddr = malloc(65536*2 + 4096);
X	vaddr = (char *) ( ((long) vaddr) & ~4095 );
X	mem.vaddr = vaddr;
X	mem.physaddr = (char *) 0xA0000;
X	mem.length = 65536*2;
X	mem.ioflg = 1;
X	rc = ioctl(0, KDMAPDISP, &mem);
X
X/* Unmap display memory */
X	ioctl(0, KDUNMAPDISP, &mem);
X
X/* Back to text mode */
X	ioctl(0, SW_ENHC80x25, 0);
X	printf("map returns %d\n", rc);
X}
SHAR_EOF
fi
exit 0
#	End of shell archive
-- 
Rick Richardson | Looking for FAX software for UNIX/386 ??? Ask About: |Mention
PC Research,Inc.| FaxiX - UNIX Facsimile System (tm)                   |FAX# for
uunet!pcrat!rick| FaxJet - HP LJ PCL to FAX (Send WP,Word,Pagemaker...)|Sample
(201) 389-8963  | JetRoff - troff postprocessor for HP LaserJet and FAX|Output