summaryrefslogtreecommitdiff
path: root/hw/xfree86/int10
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2014-05-02 12:46:45 -0400
committerAdam Jackson <ajax@redhat.com>2014-09-16 11:58:53 -0400
commit21b216ad6ce2e9c89359b95e4196e42d91bf9420 (patch)
tree264736d4cb540ae6a521a70f4d7cf6cc7b4affe9 /hw/xfree86/int10
parent96c0da812a563d8229dc1396ac801329b3bcba91 (diff)
int10: Port off xf86ReadBIOS
If the linux vm86 backend changes look somewhat horrifying to you, that's because you have taste. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'hw/xfree86/int10')
-rw-r--r--hw/xfree86/int10/generic.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c
index 73a1e5e49..012d1941a 100644
--- a/hw/xfree86/int10/generic.c
+++ b/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;
}