linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problem with radeon new ROM probe code
@ 2003-09-24 12:06 Benjamin Herrenschmidt
  2003-09-24 15:18 ` Michel Dänzer
  0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2003-09-24 12:06 UTC (permalink / raw)
  To: Jon Smirl; +Cc: Linux Fbdev development list

Hi Jon !

Your new code for looking at the card's ROM is causing a problem for
me. On some cards, typically the "Mac" cards, the ROM doesn't contain
an x86 BIOS, but rather an OF driver. The current code will blindly
tap that, though it contains none of the expected tables, and will
use completely wrong values.

Do you have ideas how to make some sanity checking on the ROM content ?

Ben.




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem with radeon new ROM probe code
  2003-09-24 12:06 Problem with radeon new ROM probe code Benjamin Herrenschmidt
@ 2003-09-24 15:18 ` Michel Dänzer
  2003-09-24 17:44   ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 6+ messages in thread
From: Michel Dänzer @ 2003-09-24 15:18 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Jon Smirl, Linux Fbdev development list

On Wed, 2003-09-24 at 14:06, Benjamin Herrenschmidt wrote:
> 
> Your new code for looking at the card's ROM is causing a problem for
> me. On some cards, typically the "Mac" cards, the ROM doesn't contain
> an x86 BIOS, but rather an OF driver. The current code will blindly
> tap that, though it contains none of the expected tables, and will
> use completely wrong values.
> 
> Do you have ideas how to make some sanity checking on the ROM content ?

The X radeon driver has this in RADEONGetBIOSParameters():

if (info->VBIOS[0] != 0x55 || info->VBIOS[1] != 0xaa) {
	xfree(info->VBIOS);
	info->FPBIOSstart = 0;
	info->VBIOS = NULL;
	info->BIOSAddr = 0x00000000;
	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
		   "Video BIOS not found!\n");
    }


-- 
Earthling Michel Dänzer   \  Debian (powerpc), XFree86 and DRI developer
Software libre enthusiast  \     http://svcs.affero.net/rm.php?r=daenzer



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem with radeon new ROM probe code
  2003-09-24 15:18 ` Michel Dänzer
@ 2003-09-24 17:44   ` Benjamin Herrenschmidt
       [not found]     ` <20030924181257.78090.qmail@web14914.mail.yahoo.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2003-09-24 17:44 UTC (permalink / raw)
  To: Michel Dänzer; +Cc: Jon Smirl, Linux Fbdev development list

On Wed, 2003-09-24 at 17:18, Michel Dänzer wrote:
> On Wed, 2003-09-24 at 14:06, Benjamin Herrenschmidt wrote:
> > 
> > Your new code for looking at the card's ROM is causing a problem for
> > me. On some cards, typically the "Mac" cards, the ROM doesn't contain
> > an x86 BIOS, but rather an OF driver. The current code will blindly
> > tap that, though it contains none of the expected tables, and will
> > use completely wrong values.
> > 
> > Do you have ideas how to make some sanity checking on the ROM content ?
> 
> The X radeon driver has this in RADEONGetBIOSParameters():
> 
> if (info->VBIOS[0] != 0x55 || info->VBIOS[1] != 0xaa) {

We check that, but that isn't enough, an OF ROM will trigger that
as well

Ben.




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem with radeon new ROM probe code
       [not found]     ` <20030924181257.78090.qmail@web14914.mail.yahoo.com>
@ 2003-09-25  5:39       ` Sven Luther
  2003-09-25 12:10         ` Stefan Reinauer
  0 siblings, 1 reply; 6+ messages in thread
From: Sven Luther @ 2003-09-25  5:39 UTC (permalink / raw)
  To: Jon Smirl
  Cc: Benjamin Herrenschmidt, Michel DXnzer,
	Linux Fbdev development list

On Wed, Sep 24, 2003 at 11:12:57AM -0700, Jon Smirl wrote:
> Is the 'Mac' card being used on a x86 machine?
> I thought the ROM code was compiled out on non-X86 machines.

Notice that not all powerpc boxes are in this case. The pegasos at least
includes an x86 emulator in the OF which runs the cards bios. I know
that the amigaone does the same. So testing for powerpc may well not be
enough for detecting OF cards.

Friendly,

Sven Luther


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem with radeon new ROM probe code
  2003-09-25  5:39       ` Sven Luther
@ 2003-09-25 12:10         ` Stefan Reinauer
  2003-09-25 13:41           ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Reinauer @ 2003-09-25 12:10 UTC (permalink / raw)
  To: Sven Luther
  Cc: Jon Smirl, Benjamin Herrenschmidt, Michel DXnzer,
	Linux Fbdev development list

* Sven Luther <sven.luther@wanadoo.fr> [030925 07:39]:
> On Wed, Sep 24, 2003 at 11:12:57AM -0700, Jon Smirl wrote:
> > Is the 'Mac' card being used on a x86 machine?
> > I thought the ROM code was compiled out on non-X86 machines.
> 
> Notice that not all powerpc boxes are in this case. The pegasos at least
> includes an x86 emulator in the OF which runs the cards bios. I know
> that the amigaone does the same. So testing for powerpc may well not be
> enough for detecting OF cards.

Whether it's an Open Firmware card or not can be read from the PCI
headers stored in the ROM. Check the romheaders utility from OpenBIOS
CVS ( http://www.openbios.org/ )

Look at the code here:
http://cvs.openbios.org/cgi-dom/viewcvs.cgi/utils/romheaders.c?rev=1.2&content-type=text/vnd.viewcvs-markup

The program prints whether the rom is OpenFirmware, x86 or HP PA-Risc.
Note that graphics cards can theoretically contain ROM images for both
x86 and OF in one chip.

  Stefan
-- 
Architecture Team
    SuSE Linux AG


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem with radeon new ROM probe code
  2003-09-25 12:10         ` Stefan Reinauer
@ 2003-09-25 13:41           ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2003-09-25 13:41 UTC (permalink / raw)
  To: Stefan Reinauer
  Cc: Sven Luther, Jon Smirl, Michel DXnzer,
	Linux Fbdev development list


> Whether it's an Open Firmware card or not can be read from the PCI
> headers stored in the ROM. Check the romheaders utility from OpenBIOS
> CVS ( http://www.openbios.org/ )
> 
> Look at the code here:
> http://cvs.openbios.org/cgi-dom/viewcvs.cgi/utils/romheaders.c?rev=1.2&content-type=text/vnd.viewcvs-markup
> 
> The program prints whether the rom is OpenFirmware, x86 or HP PA-Risc.
> Note that graphics cards can theoretically contain ROM images for both
> x86 and OF in one chip.

Yup, "Mac" cards can contain in theory both OF and x86 BIOS drivers, though
I yet have to find a vendor doing that....

Thanks for the pointers to code, I'll dig that out.

Regards,
Ben.




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-09-25 13:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-24 12:06 Problem with radeon new ROM probe code Benjamin Herrenschmidt
2003-09-24 15:18 ` Michel Dänzer
2003-09-24 17:44   ` Benjamin Herrenschmidt
     [not found]     ` <20030924181257.78090.qmail@web14914.mail.yahoo.com>
2003-09-25  5:39       ` Sven Luther
2003-09-25 12:10         ` Stefan Reinauer
2003-09-25 13:41           ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).