Package: xorg-server Source: xorg-server Severity: normal Tags: wheezy Machine: Dell PowerEdge 3250 Processor: 2x Itanium Madison 1.5GHz 6M Memory: 4G Graphics: build-in ATI Rage XL 01:01.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI Rage XL [1002:4752] (rev 27) Subsystem: Intel Corporation Device [8086:3404] Hello, I noticed that the build-in int10 driver always reports "Unable to retrieve all of segment 0x0C0000." even though the entire BIOS data is retrieved with success.The associated code is in hw/xfree86/int10/generic.c, in the function xf86ExtendedInitInt10():
if (pci_device_read_rom(pInt->dev, vbiosMem) < V_BIOS_SIZE) {
xf86DrvMsg(screen, X_WARNING,
"Unable to retrieve all of segment 0x0C0000.\n");
}
The function pci_device_read_rom() is from libpciaccess; its return
value is not a size but an error status code: 0 means success.
If pci_device_read_rom() returns 0 for success, the warning is generated.Earlier, in xorg-server-core 1.11.4 the first line of the code snippet used the read_legacy_video_BIOS() function instead:
if (read_legacy_video_BIOS(pInt->dev, vbiosMem) < V_BIOS_SIZE) {
xf86DrvMsg(screen, X_WARNING,
"Unable to retrieve all of segment 0x0C0000.\n");
}
The read_legacy_video_BIOS() function is in hw/xfree86/int10/generic.c
of xorg-server-core-1.11.4:
#ifndef _PC
static int
read_legacy_video_BIOS(struct pci_device *dev, unsigned char *Buf)
{
const ADDRESS Base = 0xC0000;
const int Len = 0x10000 * 2;
const int pagemask = getpagesize() - 1;
const ADDRESS offset = Base & ~pagemask;
const unsigned long size = ((Base + Len + pagemask) & ~pagemask) - offset;
unsigned char *ptr, *src;
int len;
/* Try to use the civilized PCI interface first.
*/
if (pci_device_read_rom(dev, Buf) == 0) {
return dev->rom_size;
}
ptr = xf86MapDomainMemory(-1, VIDMEM_READONLY, dev, offset, size);
if (!ptr)
return -1;
/* Using memcpy() here can hang the system */
src = ptr + (Base - offset);
for (len = 0; len < (Len / 2); len++) {
Buf[len] = src[len];
}
if ((Buf[0] == 0x55) && (Buf[1] == 0xAA) && (Buf[2] > 0x80)) {
for ( /* empty */ ; len < Len; len++) {
Buf[len] = src[len];
}
}
xf86UnMapVidMem(-1, ptr, size);
return Len;
}
#endif /* _PC */
read_legacy_video_BIOS() has been removed, xf86MapDomainMemory() and
xf86UnMapVidMem() are gone.
The call of pci_device_read_rom() is in xf86ExtendedInitInt10() now.The proposed patch corrects the evaluation of the return value of pci_device_read_rom() and of the supplied BIOS size.
Kind regards Stephan Schreiber
Attachment:
int10-warning.patch
Description: int10-warning.patch