diff options
Diffstat (limited to 'xorg-server/hw/xfree86/int10/generic.c')
-rw-r--r-- | xorg-server/hw/xfree86/int10/generic.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/xorg-server/hw/xfree86/int10/generic.c b/xorg-server/hw/xfree86/int10/generic.c index 73a1e5e49..012d1941a 100644 --- a/xorg-server/hw/xfree86/int10/generic.c +++ b/xorg-server/hw/xfree86/int10/generic.c @@ -99,6 +99,20 @@ static void UnmapVRam(xf86Int10InfoPtr pInt); static void *sysMem = NULL; +static Bool +readIntVec(struct pci_device *dev, unsigned char *buf, int len) +{ + void *map; + + if (!pci_device_map_legacy(dev, 0, len, 0, &map)) + return FALSE; + + memcpy(buf, map, len); + pci_device_unmap_legacy(dev, map, len); + + return TRUE; +} + xf86Int10InfoPtr xf86ExtendedInitInt10(int entityIndex, int Flags) { @@ -144,7 +158,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) PCI_DEV_MAP_FLAG_WRITABLE, &sysMem); INTPriv(pInt)->sysMem = sysMem; - if (xf86ReadBIOS(0, 0, base, LOW_PAGE_SIZE) < 0) { + if (!readIntVec(pInt->dev, base, LOW_PAGE_SIZE)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Cannot read int vect\n"); goto error1; } |