Lines Matching refs:pInt
48 static void SetResetBIOSVars(xf86Int10InfoPtr pInt, Bool set);
51 #define REG pInt
54 setup_int(xf86Int10InfoPtr pInt) in setup_int() argument
56 if (pInt != Int10Current) { in setup_int()
57 if (!MapCurrentInt10(pInt)) in setup_int()
59 Int10Current = pInt; in setup_int()
61 X86_EAX = (uint32_t) pInt->ax; in setup_int()
62 X86_EBX = (uint32_t) pInt->bx; in setup_int()
63 X86_ECX = (uint32_t) pInt->cx; in setup_int()
64 X86_EDX = (uint32_t) pInt->dx; in setup_int()
65 X86_ESI = (uint32_t) pInt->si; in setup_int()
66 X86_EDI = (uint32_t) pInt->di; in setup_int()
67 X86_EBP = (uint32_t) pInt->bp; in setup_int()
69 X86_SS = pInt->stackseg >> 4; in setup_int()
73 X86_ES = pInt->es; in setup_int()
78 if (pInt->Flags & SET_BIOS_SCRATCH) in setup_int()
79 SetResetBIOSVars(pInt, TRUE); in setup_int()
86 finish_int(xf86Int10InfoPtr pInt, int sig) in finish_int() argument
89 pInt->ax = (uint32_t) X86_EAX; in finish_int()
90 pInt->bx = (uint32_t) X86_EBX; in finish_int()
91 pInt->cx = (uint32_t) X86_ECX; in finish_int()
92 pInt->dx = (uint32_t) X86_EDX; in finish_int()
93 pInt->si = (uint32_t) X86_ESI; in finish_int()
94 pInt->di = (uint32_t) X86_EDI; in finish_int()
95 pInt->es = (uint16_t) X86_ES; in finish_int()
96 pInt->bp = (uint32_t) X86_EBP; in finish_int()
97 pInt->flags = (uint32_t) X86_FLAGS; in finish_int()
99 if (pInt->Flags & RESTORE_BIOS_SCRATCH) in finish_int()
100 SetResetBIOSVars(pInt, FALSE); in finish_int()
106 getIntVect(xf86Int10InfoPtr pInt, int num) in getIntVect() argument
108 return MEM_RW(pInt, num << 2) + (MEM_RW(pInt, (num << 2) + 2) << 4); in getIntVect()
112 pushw(xf86Int10InfoPtr pInt, uint16_t val) in pushw() argument
115 MEM_WW(pInt, ((uint32_t) X86_SS << 4) + X86_SP, val); in pushw()
119 run_bios_int(int num, xf86Int10InfoPtr pInt) in run_bios_int() argument
125 if (MEM_RW(pInt, (num << 2) + 2) == (SYS_BIOS >> 4)) { /* SYS_BIOS_SEG ? */ in run_bios_int()
128 xf86DrvMsg(pInt->pScrn->scrnIndex, X_NOTICE, in run_bios_int()
136 xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 2, in run_bios_int()
139 dump_registers(pInt); in run_bios_int()
140 stack_trace(pInt); in run_bios_int()
154 pushw(pInt, eflags); in run_bios_int()
155 pushw(pInt, X86_CS); in run_bios_int()
156 pushw(pInt, X86_IP); in run_bios_int()
157 X86_CS = MEM_RW(pInt, (num << 2) + 2); in run_bios_int()
158 X86_IP = MEM_RW(pInt, num << 2); in run_bios_int()
167 dump_code(xf86Int10InfoPtr pInt) in dump_code() argument
172 xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_INFO, 3, "code at 0x%8.8" PRIx32 ":\n", in dump_code()
175 xf86ErrorFVerb(3, " %2.2x", MEM_RB(pInt, lina + i)); in dump_code()
178 xf86ErrorFVerb(3, " %2.2x", MEM_RB(pInt, lina + i)); in dump_code()
183 dump_registers(xf86Int10InfoPtr pInt) in dump_registers() argument
185 xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_INFO, 3, in dump_registers()
189 xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_INFO, 3, in dump_registers()
193 xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_INFO, 3, in dump_registers()
197 xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_INFO, 3, in dump_registers()
203 stack_trace(xf86Int10InfoPtr pInt) in stack_trace() argument
214 xf86ErrorFVerb(3, " %2.2x", MEM_RB(pInt, stack)); in stack_trace()
224 port_rep_inb(xf86Int10InfoPtr pInt, in port_rep_inb() argument
234 MEM_WB(pInt, dst, x_inb(port)); in port_rep_inb()
241 port_rep_inw(xf86Int10InfoPtr pInt, in port_rep_inw() argument
251 MEM_WW(pInt, dst, x_inw(port)); in port_rep_inw()
258 port_rep_inl(xf86Int10InfoPtr pInt, in port_rep_inl() argument
268 MEM_WL(pInt, dst, x_inl(port)); in port_rep_inl()
275 port_rep_outb(xf86Int10InfoPtr pInt, in port_rep_outb() argument
285 x_outb(port, MEM_RB(pInt, dst)); in port_rep_outb()
292 port_rep_outw(xf86Int10InfoPtr pInt, in port_rep_outw() argument
302 x_outw(port, MEM_RW(pInt, dst)); in port_rep_outw()
309 port_rep_outl(xf86Int10InfoPtr pInt, in port_rep_outl() argument
319 x_outl(port, MEM_RL(pInt, dst)); in port_rep_outl()
677 LockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga) in LockLegacyVGA() argument
679 vga->save_msr = pci_io_read8(pInt->io, 0x03CC); in LockLegacyVGA()
680 vga->save_vse = pci_io_read8(pInt->io, 0x03C3); in LockLegacyVGA()
682 vga->save_46e8 = pci_io_read8(pInt->io, 0x46E8); in LockLegacyVGA()
684 vga->save_pos102 = pci_io_read8(pInt->io, 0x0102); in LockLegacyVGA()
685 pci_io_write8(pInt->io, 0x03C2, ~(uint8_t) 0x03 & vga->save_msr); in LockLegacyVGA()
686 pci_io_write8(pInt->io, 0x03C3, ~(uint8_t) 0x01 & vga->save_vse); in LockLegacyVGA()
688 pci_io_write8(pInt->io, 0x46E8, ~(uint8_t) 0x08 & vga->save_46e8); in LockLegacyVGA()
690 pci_io_write8(pInt->io, 0x0102, ~(uint8_t) 0x01 & vga->save_pos102); in LockLegacyVGA()
694 UnlockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga) in UnlockLegacyVGA() argument
696 pci_io_write8(pInt->io, 0x0102, vga->save_pos102); in UnlockLegacyVGA()
698 pci_io_write8(pInt->io, 0x46E8, vga->save_46e8); in UnlockLegacyVGA()
700 pci_io_write8(pInt->io, 0x03C3, vga->save_vse); in UnlockLegacyVGA()
701 pci_io_write8(pInt->io, 0x03C2, vga->save_msr); in UnlockLegacyVGA()
706 SetResetBIOSVars(xf86Int10InfoPtr pInt, Bool set) in SetResetBIOSVars() argument
713 (pInt->dev, 0, pagesize, PCI_DEV_MAP_FLAG_WRITABLE, (void **) &base)) in SetResetBIOSVars()
718 MEM_WW(pInt, i, *(base + i)); in SetResetBIOSVars()
722 *(base + i) = MEM_RW(pInt, i); in SetResetBIOSVars()
725 pci_device_unmap_legacy(pInt->dev, base, pagesize); in SetResetBIOSVars()
729 xf86Int10SaveRestoreBIOSVars(xf86Int10InfoPtr pInt, Bool save) in xf86Int10SaveRestoreBIOSVars() argument
735 if (!xf86IsEntityPrimary(pInt->entityIndex) in xf86Int10SaveRestoreBIOSVars()
736 || (!save && !pInt->BIOSScratch)) in xf86Int10SaveRestoreBIOSVars()
740 (pInt->dev, 0, pagesize, PCI_DEV_MAP_FLAG_WRITABLE, (void **) &base)) in xf86Int10SaveRestoreBIOSVars()
745 if ((pInt->BIOSScratch = xnfalloc(BIOS_SCRATCH_LEN))) in xf86Int10SaveRestoreBIOSVars()
747 *(((char *) pInt->BIOSScratch + i)) = *(base + i); in xf86Int10SaveRestoreBIOSVars()
750 if (pInt->BIOSScratch) { in xf86Int10SaveRestoreBIOSVars()
752 *(base + i) = *(pInt->BIOSScratch + i); in xf86Int10SaveRestoreBIOSVars()
753 free(pInt->BIOSScratch); in xf86Int10SaveRestoreBIOSVars()
754 pInt->BIOSScratch = NULL; in xf86Int10SaveRestoreBIOSVars()
758 pci_device_unmap_legacy(pInt->dev, base - BIOS_SCRATCH_OFF, pagesize); in xf86Int10SaveRestoreBIOSVars()