diff options
author | marha <marha@users.sourceforge.net> | 2014-10-01 20:12:35 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-10-01 20:12:35 +0200 |
commit | 19b4b68b35a047a83bd291ee8debac1adb0e946c (patch) | |
tree | d4d4520622ecf73fa0d076dc0bf517a1189b7d9f /xorg-server/hw/xfree86/os-support/linux/int10/linux.c | |
parent | 4e080e0165d18887e2a0fccd7f30cf20fd04b178 (diff) | |
parent | 438af0c7d4bf60b408b259c88205ff2193195466 (diff) | |
download | vcxsrv-19b4b68b35a047a83bd291ee8debac1adb0e946c.tar.gz vcxsrv-19b4b68b35a047a83bd291ee8debac1adb0e946c.tar.bz2 vcxsrv-19b4b68b35a047a83bd291ee8debac1adb0e946c.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/mesa/main/macros.h
xorg-server/dix/registry.c
xorg-server/hw/kdrive/ephyr/ephyrinit.c
xorg-server/hw/xwin/Makefile.am
xorg-server/hw/xwin/glx/.gitignore
xorg-server/hw/xwin/glx/gen_gl_wrappers.py
xorg-server/hw/xwin/glx/indirect.c
xorg-server/hw/xwin/glx/winpriv.c
xorg-server/hw/xwin/winclipboardthread.c
xorg-server/hw/xwin/windisplay.c
xorg-server/hw/xwin/winmultiwindowwm.c
xorg-server/hw/xwin/winprefs.c
Diffstat (limited to 'xorg-server/hw/xfree86/os-support/linux/int10/linux.c')
-rw-r--r-- | xorg-server/hw/xfree86/os-support/linux/int10/linux.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/xorg-server/hw/xfree86/os-support/linux/int10/linux.c b/xorg-server/hw/xfree86/os-support/linux/int10/linux.c index 6181eb9c5..79b9a8858 100644 --- a/xorg-server/hw/xfree86/os-support/linux/int10/linux.c +++ b/xorg-server/hw/xfree86/os-support/linux/int10/linux.c @@ -70,6 +70,20 @@ static Int10LinuxSubModuleState int10LinuxLoadSubModule(ScrnInfoPtr pScrn); #endif /* DoSubModules */ +static Bool +readLegacy(struct pci_device *dev, unsigned char *buf, int base, int len) +{ + void *map; + + if (!pci_device_map_legacy(dev, base, len, 0, &map)) + return FALSE; + + memcpy(buf, map, len); + pci_device_unmap_legacy(dev, man, len); + + return TRUE; +} + xf86Int10InfoPtr xf86ExtendedInitInt10(int entityIndex, int Flags) { @@ -222,7 +236,8 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) Int10Current = pInt; DebugF("Mapping int area\n"); - if (xf86ReadBIOS(0, 0, (unsigned char *) 0, LOW_PAGE_SIZE) < 0) { + /* note: yes, we really are writing the 0 page here */ + if (!readLegacy(pInt->dev, (unsigned char *) 0, 0, LOW_PAGE_SIZE)) { xf86DrvMsg(screen, X_ERROR, "Cannot read int vect\n"); goto error3; } @@ -236,7 +251,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) memset((void *) V_BIOS, 0, SYS_BIOS - V_BIOS); DebugF("Reading BIOS\n"); for (cs = V_BIOS; cs < SYS_BIOS; cs += V_BIOS_SIZE) - if (xf86ReadBIOS(cs, 0, (void *) cs, V_BIOS_SIZE) < V_BIOS_SIZE) + if (!readLegacy(pInt->dev, (void *)cs, cs, V_BIOS_SIZE)) xf86DrvMsg(screen, X_WARNING, "Unable to retrieve all of segment 0x%06lX.\n", (long) cs); |