aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/os-support/linux/int10/linux.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-09-21 18:11:28 +0200
committermarha <marha@users.sourceforge.net>2014-09-21 18:11:28 +0200
commit438af0c7d4bf60b408b259c88205ff2193195466 (patch)
tree46fd6465cb7431f64a3cb475a40587a261983af4 /xorg-server/hw/xfree86/os-support/linux/int10/linux.c
parentd0f70707dde032e662dbd5bc70df6ac915403abe (diff)
downloadvcxsrv-438af0c7d4bf60b408b259c88205ff2193195466.tar.gz
vcxsrv-438af0c7d4bf60b408b259c88205ff2193195466.tar.bz2
vcxsrv-438af0c7d4bf60b408b259c88205ff2193195466.zip
libxtrans xkeyboard-config xserver mesa plink glproto git update 21 Sep 2014
plink revision 10233 xserver commit 28337cb14e4347e1dd7936c5393a22e042866687 xkeyboard-config commit 48e1c0b351b6711edc0f167cbb81e4424b75291a glproto commit bd3d751e1eb17efb39f65093271bb4ac071aa9e0 libxtrans commit fb7f198c88e97d22c8c89e76e9cd06b2b2720a96 mesa commit 4eb2bbefd2bf0359aff7ebbb8e931a1c7833606f
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.c19
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);