Lines Matching defs:pInt

23 static CARD8 read_b(xf86Int10InfoPtr pInt,int addr);
24 static CARD16 read_w(xf86Int10InfoPtr pInt,int addr);
25 static CARD32 read_l(xf86Int10InfoPtr pInt,int addr);
26 static void write_b(xf86Int10InfoPtr pInt,int addr, CARD8 val);
27 static void write_w(xf86Int10InfoPtr pInt,int addr, CARD16 val);
28 static void write_l(xf86Int10InfoPtr pInt,int addr, CARD32 val);
56 static void MapVRam(xf86Int10InfoPtr pInt);
57 static void UnmapVRam(xf86Int10InfoPtr pInt);
124 xf86Int10InfoPtr pInt;
144 pInt = (xf86Int10InfoPtr)xnfcalloc(1, sizeof(xf86Int10InfoRec));
145 pInt->entityIndex = entityIndex;
146 if (!xf86Int10ExecSetup(pInt))
149 pInt->mem = &genericMem;
150 pInt->private = (pointer)xnfcalloc(1, sizeof(genericInt10Priv));
151 INTPriv(pInt)->alloc = (pointer)xnfcalloc(1, ALLOC_ENTRIES(getpagesize()));
152 pInt->scrnIndex = screen;
153 base = INTPriv(pInt)->base = xnfalloc(SYS_BIOS);
159 pInt->dev = xf86GetPciInfoForEntity(entityIndex);
165 MapVRam(pInt);
170 INTPriv(pInt)->sysMem = sysMem;
190 INTPriv(pInt)->highMemory = V_BIOS;
193 if (!xf86int10GetBiosSegment(pInt, (unsigned char *)sysMem - V_BIOS))
196 set_return_trap(pInt);
198 pInt->Flags = Flags & (SET_BIOS_SCRATCH | RESTORE_BIOS_SCRATCH);
199 if (! (pInt->Flags & SET_BIOS_SCRATCH))
200 pInt->Flags &= ~RESTORE_BIOS_SCRATCH;
201 xf86Int10SaveRestoreBIOSVars(pInt, TRUE);
204 const BusType location_type = xf86int10GetBiosLocationType(pInt);
207 reset_int_vect(pInt);
208 set_return_trap(pInt);
214 xf86GetPciInfoForEntity(pInt->entityIndex);
223 INTPriv(pInt)->highMemory = GET_HIGH_BASE(rom_device->rom_size);
229 pInt->BIOSseg = V_BIOS >> 4;
230 pInt->num = 0xe6;
231 LockLegacyVGA(pInt, &vga);
232 xf86ExecX86int10(pInt);
233 UnlockLegacyVGA(pInt, &vga);
240 INTPriv(pInt)->sysMem = sysMem;
241 setup_int_vect(pInt);
242 set_return_trap(pInt);
249 if (read_legacy_video_BIOS(pInt->dev, vbiosMem) < V_BIOS_SIZE) {
274 xf86GetPciInfoForEntity(pInt->entityIndex);
290 pInt->BIOSseg = V_BIOS >> 4;
291 pInt->num = 0xe6;
292 LockLegacyVGA(pInt, &vga);
293 xf86ExecX86int10(pInt);
294 UnlockLegacyVGA(pInt, &vga);
297 return pInt;
301 UnmapVRam(pInt);
302 free(INTPriv(pInt)->alloc);
303 free(pInt->private);
305 free(pInt);
312 MapVRam(xf86Int10InfoPtr pInt)
317 INTPriv(pInt)->vRam = xf86MapDomainMemory(pInt->scrnIndex, VIDMEM_MMIO,
318 pInt->dev, V_RAM, size);
320 pInt->ioBase = xf86Screens[pInt->scrnIndex]->domainIOBase;
324 UnmapVRam(xf86Int10InfoPtr pInt)
326 int screen = pInt->scrnIndex;
330 xf86UnMapVidMem(screen, INTPriv(pInt)->vRam, size);
334 MapCurrentInt10(xf86Int10InfoPtr pInt)
341 xf86FreeInt10(xf86Int10InfoPtr pInt)
343 if (!pInt)
346 xf86Int10SaveRestoreBIOSVars(pInt, FALSE);
348 if (Int10Current == pInt)
350 free(INTPriv(pInt)->base);
351 UnmapVRam(pInt);
352 free(INTPriv(pInt)->alloc);
353 free(pInt->private);
354 free(pInt);
358 xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num, int *off)
365 if (INTPriv(pInt)->alloc[i] == 0) {
367 if (INTPriv(pInt)->alloc[j] != 0)
378 INTPriv(pInt)->alloc[j] = 1;
382 return (char *)INTPriv(pInt)->base + *off;
386 xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num)
389 int first = (((char *)pbase - (char *)INTPriv(pInt)->base) / pagesize) - 1;
393 INTPriv(pInt)->alloc[i] = 0;
398 # define HIGH_OFFSET (INTPriv(pInt)->highMemory)
406 (SYS(addr) ? ((char*)INTPriv(pInt)->sysMem) + (addr - HIGH_BASE) \
407 : (((char*)(INTPriv(pInt)->base) + addr)))
409 #define VRAM_BASE (INTPriv(pInt)->vRam)
440 read_b(xf86Int10InfoPtr pInt, int addr)
446 read_w(xf86Int10InfoPtr pInt, int addr)
456 read_l(xf86Int10InfoPtr pInt, int addr)
469 write_b(xf86Int10InfoPtr pInt, int addr, CARD8 val)
475 write_w(xf86Int10InfoPtr pInt, int addr, CARD16 val)
486 write_l(xf86Int10InfoPtr pInt, int addr, CARD32 val)
499 xf86int10Addr(xf86Int10InfoPtr pInt, CARD32 addr)