Off-by-8 error in findPciRange?

Warren Block wblock at wonkity.com
Tue Oct 9 14:39:36 PDT 2007


Following up: I'm now reasonably sure that there isn't an off-by-8 bug 
in findPciRange.  There is something elsewhere that causes a problem 
with reading the VGA BIOS, but apparently few drivers do that anyway.

For reference:

It appears that handlePciBIOS tries to move the framebuffer base address 
before reading the ROM.  To do that, it needs to find a mappable space 
the size of the framebuffer.  If there isn't a usable PCI space that's 
large enough, the call fails and no BIOS is read.  This happens on 
FreeBSD i386, but doesn't apply to Linux, which reads the ROM from 
/sys/bus/pci/devices.

Whether the framebuffer actually needs to be remapped before reading the 
ROM, I don't know.  I can say that reading the ROM works without it on 
my system, but that may be causing ugly problems behind the scenes.

handlePciBIOS is in hw/xfree86/os-support/bus/Pci.c.  The code in 
question is commented "if we use a mem base save it and move it out of 
the way".

-Warren Block * Rapid City, South Dakota USA



More information about the xorg mailing list