Thanks Marcus,

Can you please let me know when you have fixed this.


Regards,

David

 -----Original Message-----
From:   [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]  On Behalf Of Marcus
Sundberg
Sent:   Thursday, 27 April 2000 9:56
To:     [EMAIL PROTECTED]
Cc:     David Craig
Subject:        Re: GGI/FB PPC Crashes

Andreas Beck <[EMAIL PROTECTED]> writes:

> > Don't worry stars definitely isn't going, (paradoxical statement),
however I
> > tested demo instead and here is the debug output, looks like some
infinite
> > looping to me. I pressed q to terminate out to a blank screen but there
is
> > no associated debug info with this action.
> 
> Hmm - it repeats
> 
> LibGGI: display-fbdev: GGIdlcleanup start.
> Terminating on signal 7
> 
> over and over ... This might well be a PPC specific problem, as signal 7
is
> SIGBUS, which is generated on PPC when unaligned accesses are done.

Well, not really. All commonly used load/store instructions are
emulated by the kernel for unaligned accesses, and LibGGI doesn't
do unaligned accesses anyway.

I believe this PPC problem was discussed here earlier. The
problem is the dcbz (Data Cache Block Zero) instruction used by glibc
memset(). dcbz doesn't work on un-cached regions. According to the
manual it should be emulated properly by the OS in this case, but
Linux doesn't do that.

But even if this was fixed we shouldn't use memset() anyway, as the
only reason we use it in the first place is performance. I'll try
to fix this in a nice way this weekend.

> Please use fbset to set a 32 bit wide mode and see if that helps.
> 
> For the others on the list - the relevant last few lines from the debug
> trace are:
> 
> LibGGI: ggiSetMode: calling 0x162a4b4
> LibGGI: ggiCheckMode(0x18158d8, 0x7fffea58) called
> LibGGI: display-fbdev: checkmode 1024x768#1024x768F1[0x4000808]
> LibGGI: display-fbdev: result 0 1024x768#1024x768F1[0x4000808]
> LibGGI: display-fbdev: setmode 1024x768#1024x768F1[0x4000808]
> LibGGI: display-fbdev: cannot get timing from /etc/fb.modes. Just hoping
it
> works.
> LibGGI: display-fbdev: Change mode OK.
> LibGGI: display-fbdev: frame_size=0xc0000 fb_size=0xc0000
> mmap_size=0x1000000
> LibGGI: display-fbdev: FB_PTR=0x30027000
> Terminating on signal 7
> LibGGI: display-fbdev: GGIdlcleanup start.

fbdev target tries to clear the framebuffer with memset. memset
causes SIGBUS which is caught by our error handler, which tries
to clean up after fbdev. Unfortunately part of the cleanup-process
includes clearing the framebuffer, so we get a new SIGBUS. But as
we already are in the SIGBUS handler the program will loop forever
on the same dcbz instruction.

Note that I've run LibGGI just fine on an embedded PPC card where
the framebuffer is in main RAM, so there shouldn't be any other PPC
problems than the dcbz in memset.

//Marcus
-- 
-------------------------------+------------------------------------
        Marcus Sundberg        | http://www.stacken.kth.se/~mackan
 Royal Institute of Technology |       Phone: +46 707 295404
       Stockholm, Sweden       |   E-Mail: [EMAIL PROTECTED]

Reply via email to