1260
1260
pScrn->fbOffset = pVesa->mapOff;
1262
1262
#ifdef XSERVER_LIBPCIACCESS
1263
if ((pVesa->mapPhys != 0xa0000) && (pVesa->pciInfo != NULL)) {
1264
(void) pci_device_map_range(pVesa->pciInfo, pScrn->memPhysBase,
1266
(PCI_DEV_MAP_FLAG_WRITABLE
1267
| PCI_DEV_MAP_FLAG_WRITE_COMBINE),
1271
pVesa->base = xf86MapDomainMemory(pScrn->scrnIndex, 0, pVesa->pciInfo,
1272
pScrn->memPhysBase, pVesa->mapSize);
1275
if (pVesa->mapPhys != 0xa0000)
1276
pVesa->VGAbase = xf86MapDomainMemory(pScrn->scrnIndex, 0,
1280
pVesa->VGAbase = pVesa->base;
1263
if (pVesa->pciInfo != NULL) {
1264
if (pVesa->mapPhys != 0xa0000) {
1265
(void) pci_device_map_range(pVesa->pciInfo, pScrn->memPhysBase,
1267
(PCI_DEV_MAP_FLAG_WRITABLE
1268
| PCI_DEV_MAP_FLAG_WRITE_COMBINE),
1272
(void) pci_device_map_legacy(pVesa->pciInfo, 0xa0000, 0x10000,
1273
PCI_DEV_MAP_FLAG_WRITABLE,
1277
(void) pci_device_map_legacy(pVesa->pciInfo, pScrn->memPhysBase,
1279
PCI_DEV_MAP_FLAG_WRITABLE,
1283
pVesa->VGAbase = pVesa->base;
1284
1287
if (pVesa->mapPhys != 0xa0000 && pVesa->pEnt->location.type == BUS_PCI)
1305
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
1302
1306
pVesa->ioBase = pScrn->domainIOBase;
1304
1311
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, DEBUG_VERB,
1305
1312
"virtual address = %p,\n"
1321
1328
if (pVesa->mapPhys != 0xa0000) {
1322
1329
(void) pci_device_unmap_range(pVesa->pciInfo, pVesa->base,
1323
1330
pVesa->mapSize);
1324
xf86UnMapVidMem(pScrn->scrnIndex, pVesa->VGAbase, 0x10000);
1331
(void) pci_device_unmap_legacy(pVesa->pciInfo, pVesa->VGAbase,
1327
xf86UnMapVidMem(pScrn->scrnIndex, pVesa->base, pVesa->mapSize);
1335
(void) pci_device_unmap_legacy(pVesa->pciInfo, pVesa->base,
1330
1339
xf86UnMapVidMem(pScrn->scrnIndex, pVesa->base, pVesa->mapSize);