Lines Matching defs:pInt

59 static uint8_t read_b(xf86Int10InfoPtr pInt, int addr);
60 static uint16_t read_w(xf86Int10InfoPtr pInt, int addr);
61 static uint32_t read_l(xf86Int10InfoPtr pInt, int addr);
62 static void write_b(xf86Int10InfoPtr pInt, int addr, uint8_t val);
63 static void write_w(xf86Int10InfoPtr pInt, int addr, uint16_t val);
64 static void write_l(xf86Int10InfoPtr pInt, int addr, uint32_t val);
92 static void MapVRam(xf86Int10InfoPtr pInt);
93 static void UnmapVRam(xf86Int10InfoPtr pInt);
119 xf86Int10InfoPtr pInt;
135 pInt = (xf86Int10InfoPtr) xnfcalloc(1, sizeof(xf86Int10InfoRec));
136 pInt->entityIndex = entityIndex;
137 if (!xf86Int10ExecSetup(pInt))
139 pInt->mem = &genericMem;
140 pInt->private = (void *) xnfcalloc(1, sizeof(genericInt10Priv));
141 INTPriv(pInt)->alloc = (void *) xnfcalloc(1, ALLOC_ENTRIES(getpagesize()));
142 pInt->pScrn = pScrn;
143 base = INTPriv(pInt)->base = xnfalloc(SYS_BIOS);
148 pInt->dev = xf86GetPciInfoForEntity(entityIndex);
154 MapVRam(pInt);
157 pci_device_map_legacy(pInt->dev, V_BIOS, BIOS_SIZE + SYS_BIOS - V_BIOS,
159 INTPriv(pInt)->sysMem = sysMem;
161 if (!readIntVec(pInt->dev, base, LOW_PAGE_SIZE)) {
171 INTPriv(pInt)->highMemory = V_BIOS;
174 if (!xf86int10GetBiosSegment(pInt, (unsigned char *) sysMem - V_BIOS))
177 set_return_trap(pInt);
179 pInt->Flags = Flags & (SET_BIOS_SCRATCH | RESTORE_BIOS_SCRATCH);
180 if (!(pInt->Flags & SET_BIOS_SCRATCH))
181 pInt->Flags &= ~RESTORE_BIOS_SCRATCH;
182 xf86Int10SaveRestoreBIOSVars(pInt, TRUE);
186 const BusType location_type = xf86int10GetBiosLocationType(pInt);
189 reset_int_vect(pInt);
190 set_return_trap(pInt);
196 xf86GetPciInfoForEntity(pInt->entityIndex);
205 INTPriv(pInt)->highMemory = GET_HIGH_BASE(rom_device->rom_size);
211 pInt->BIOSseg = V_BIOS >> 4;
212 pInt->num = 0xe6;
213 LockLegacyVGA(pInt, &vga);
214 xf86ExecX86int10(pInt);
215 UnlockLegacyVGA(pInt, &vga);
222 INTPriv(pInt)->sysMem = sysMem;
223 setup_int_vect(pInt);
224 set_return_trap(pInt);
231 if (pci_device_read_rom(pInt->dev, vbiosMem) != 0
232 || pInt->dev->rom_size < V_BIOS_SIZE) {
257 xf86GetPciInfoForEntity(pInt->entityIndex);
268 pInt->BIOSseg = V_BIOS >> 4;
269 pInt->num = 0xe6;
270 LockLegacyVGA(pInt, &vga);
271 xf86ExecX86int10(pInt);
272 UnlockLegacyVGA(pInt, &vga);
275 return pInt;
279 UnmapVRam(pInt);
280 free(INTPriv(pInt)->alloc);
281 free(pInt->private);
283 free(pInt);
290 MapVRam(xf86Int10InfoPtr pInt)
295 pci_device_map_legacy(pInt->dev, V_RAM, size, PCI_DEV_MAP_FLAG_WRITABLE,
296 &(INTPriv(pInt)->vRam));
297 pInt->io = pci_legacy_open_io(pInt->dev, 0, 64 * 1024);
301 UnmapVRam(xf86Int10InfoPtr pInt)
306 pci_device_unmap_legacy(pInt->dev, INTPriv(pInt)->vRam, size);
307 pci_device_close_io(pInt->dev, pInt->io);
308 pInt->io = NULL;
312 MapCurrentInt10(xf86Int10InfoPtr pInt)
319 xf86FreeInt10(xf86Int10InfoPtr pInt)
321 if (!pInt)
324 xf86Int10SaveRestoreBIOSVars(pInt, FALSE);
326 if (Int10Current == pInt)
328 free(INTPriv(pInt)->base);
329 UnmapVRam(pInt);
330 free(INTPriv(pInt)->alloc);
331 free(pInt->private);
332 free(pInt);
336 xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num, int *off)
343 if (INTPriv(pInt)->alloc[i] == 0) {
345 if (INTPriv(pInt)->alloc[j] != 0)
356 INTPriv(pInt)->alloc[j] = 1;
360 return (char *) INTPriv(pInt)->base + *off;
364 xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num)
368 (((char *) pbase - (char *) INTPriv(pInt)->base) / pagesize) - 1;
372 INTPriv(pInt)->alloc[i] = 0;
377 #define HIGH_OFFSET (INTPriv(pInt)->highMemory)
385 (SYS(addr) ? ((char*)INTPriv(pInt)->sysMem) + (addr - HIGH_BASE) \
386 : (((char*)(INTPriv(pInt)->base) + addr)))
388 #define VRAM_BASE (INTPriv(pInt)->vRam)
419 read_b(xf86Int10InfoPtr pInt, int addr)
425 read_w(xf86Int10InfoPtr pInt, int addr)
435 read_l(xf86Int10InfoPtr pInt, int addr)
447 write_b(xf86Int10InfoPtr pInt, int addr, uint8_t val)
453 write_w(xf86Int10InfoPtr pInt, int addr, CARD16 val)
465 write_l(xf86Int10InfoPtr pInt, int addr, uint32_t val)
479 xf86int10Addr(xf86Int10InfoPtr pInt, uint32_t addr)