Re: [PATCH] quiet non-x86 option ROM warnings

Jon Smirl
2005-02-16T00:36:27Z

You're removing the check for 55AA at the start of the ROM. I though
the PCI standard was that all ROMs had to start with the no matter
what object code they contain. Then if you look for PCIR there is a
field in the stucture that says what language the ROM is in. Maybe the
problem is in the BIOS_IN16() function and things are getting byte
swapped wrong.

void __iomem *pds;
/* Standard PCI ROMs start out with these bytes 55 AA */
if (readb(image) != 0x55)
break;
if (readb(image + 1) != 0xAA)
break;
/* get the PCI data structure and check its signature */
pds = image + readw(image + 24);
if (readb(pds) != 'P')
break;
if (readb(pds + 1) != 'C')
break;
if (readb(pds + 2) != 'I')
break;
if (readb(pds + 3) != 'R')
break;
last_image = readb(pds + 21) & 0x80;
/* this length is reliable */
image += readw(pds + 16) * 512;

On Tue, 15 Feb 2005 15:57:05 -0800, Jesse Barnes <jbarnes@sgi.com> wrote:
> Both the r128 and radeon drivers complain if they don't find an x86 option ROM
> on the device they're talking to. This would be fine, except that the
> message is incorrect--not all option ROMs are required to be x86 based. This
> small patch just removes the messages altogether, causing the drivers to
> *silently* fall back to the non-x86 option ROM behavior (it works fine and
> there's no cause for alarm).
>
> Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
>
>
>

--
Jon Smirl
jonsmirl@gmail.com