lkml.org 
[lkml]   [1997]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateMon, 6 Oct 1997 10:51:36 +0300 (EET DST)
FromMartynas Kunigelis <>
SubjectWeirdnes!
Hello,

I have noticed that SVGAlib programs lock my system with a 430FX chipset
and a 2MB S3 Trio64V+. All I get is a blank screen and a locked machine
(not just the console!). I thought it was an SVGAlib problem first, but my
friend has a 99% identical system (same mobo, same CPU, same video card,
same amount of mem, same kernel etc.) and SVGAlib works on his machine!
I tracked down the code that triggers the lockup. Boy is it weird! Here it
is:

void main()
{
int fd, i;
char *mem;
fd = open("/dev/mem", O_RDWR);

/* map the last page of video RAM */
mem = mmap(0, 0x1000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0xbf000);
for (i = 0; i < 0x1000; i++)
mem[i] = 0;

/* NOTE: no lockup so far! */
memset(mem, 0, 0x1000); /* TOTAL MACHINE LOCKUP!!! */
}
Gosh, just how on earth is the 'for' loop different from memset in
functionality? Do I have faulty hardware? DOS, Windows and the XFree86 S3
server all work w/o problems. The kernel is 2.1.57, but earlier 2.1.x and
even 2.0.x behave the same.

Please help, I want squake! ;) ;) And even more I want my sanity back.

Martynas


\
 
 \ /
  Last update: 2005-03-22 13:40    [from the cache]
©2003-2010