Lines Matching +full:0 +full:xfffe0000

78 static int tdfx_count = 0;
86 { 0, 0 }
147 int rid = PCIR_BAR(0); in tdfx_attach()
166 tdfx_info->addr0 = (pci_read_config(dev, 0x10, 4) & 0xffff0000); in tdfx_attach()
168 device_printf(dev, "Base0 @ 0x%x\n", tdfx_info->addr0); in tdfx_attach()
177 tdfx_info->memrid = 0; in tdfx_attach()
182 device_printf(dev, "Mapped to: 0x%x\n", in tdfx_attach()
190 rid = 0x14; /* 2nd mem map */ in tdfx_attach()
191 tdfx_info->addr1 = (pci_read_config(dev, 0x14, 4) & 0xffff0000); in tdfx_attach()
193 device_printf(dev, "Base1 @ 0x%x\n", tdfx_info->addr1); in tdfx_attach()
201 tdfx_info->memrid2 = 0; in tdfx_attach()
208 tdfx_info->pio0 = pci_read_config(dev, 0x2c, 2); in tdfx_attach()
209 tdfx_info->pio0max = pci_read_config(dev, 0x30, 2) + tdfx_info->pio0; in tdfx_attach()
216 tdfx_info->piorid = 0; in tdfx_attach()
222 tdfx_info->addr1 = 0; in tdfx_attach()
232 if(tdfx_setmtrr(dev) != 0) { in tdfx_attach()
249 return 0; in tdfx_attach()
278 if(retval != 0) in tdfx_detach()
283 return(0); in tdfx_detach()
291 return 0; in tdfx_shutdown()
315 int retval = 0, act; in tdfx_setmtrr()
321 tdfx_info->mrdesc.mr_len = 0x400000; in tdfx_setmtrr()
325 tdfx_info->mrdesc.mr_base = tdfx_info->addr0 & 0xfffe0000; in tdfx_setmtrr()
329 tdfx_info->mrdesc.mr_len = 0x1000000; in tdfx_setmtrr()
333 tdfx_info->mrdesc.mr_base = tdfx_info->addr1 & 0xfffe0000; in tdfx_setmtrr()
336 return 0; in tdfx_setmtrr()
349 if(retval == 0) { in tdfx_setmtrr()
360 tdfx_info->mrdesc.mr_len = 0x1000; in tdfx_setmtrr()
373 return 0; in tdfx_setmtrr()
376 return 0; in tdfx_setmtrr()
387 if(tdfx_info->busy != 0) return EBUSY; in tdfx_open()
393 return 0; in tdfx_open()
404 if(tdfx_info->busy == 0) return EBADF; in tdfx_close()
405 tdfx_info->busy = 0; in tdfx_close()
409 return 0; in tdfx_close()
431 tdfx_info[0] = (struct tdfx_softc*)devclass_get_softc(tdfx_devclass, 0); in tdfx_mmap()
434 if(tdfx_info[0] == NULL) { in tdfx_mmap()
442 if((offset & 0xff000000) == tdfx_info[0]->addr0) { in tdfx_mmap()
443 offset &= 0xffffff; in tdfx_mmap()
444 *paddr = rman_get_start(tdfx_info[0]->memrange) + offset; in tdfx_mmap()
445 return 0; in tdfx_mmap()
450 if((offset & 0xff000000) == tdfx_info[1]->addr0) { in tdfx_mmap()
451 offset &= 0xffffff; in tdfx_mmap()
454 return 0; in tdfx_mmap()
459 /*if(tdfx_info->memrange2 != NULL && (offset & 0xff000000) == in tdfx_mmap()
461 offset &= 0xffffff; in tdfx_mmap()
494 /*piod->device &= 0xf;*/ in tdfx_query_fetch()
496 (piod->device < 0)) { in tdfx_query_fetch()
581 0xf))) { in tdfx_query_update()
624 if (error != 0) in tdfx_query_update()
626 preval = ret_byte << (8 * (piod->port & 0x3)); in tdfx_query_update()
627 mask = 0xff << (8 * (piod->port & 0x3)); in tdfx_query_update()
631 if (error != 0) in tdfx_query_update()
633 preval = ret_word << (8 * (piod->port & 0x3)); in tdfx_query_update()
634 mask = 0xffff << (8 * (piod->port & 0x3)); in tdfx_query_update()
638 if (error != 0) in tdfx_query_update()
641 mask = ~0; in tdfx_query_update()
650 return 0; in tdfx_query_update()
705 if (error == 0) { in tdfx_do_pio_wt()
715 /* There are three sub-commands to the query 0x33 */ in tdfx_do_query()
729 printf("Bad Sub-cmd: 0x%x\n", _IOC_NR(cmd)); in tdfx_do_query()
763 * return value in td->td_retval[0] and place the return value if it is positive
764 * in there, then we can return 0 (good). If the return value is negative, we
770 int retval = 0; in tdfx_ioctl()
773 printf("IOCTL'd by #%d, cmd: 0x%x, data: %p\n", td->td_proc->p_pid, (u_int32_t)cmd, in tdfx_ioctl()
779 case 0x33: in tdfx_ioctl()
780 /* The '3'(0x33) type IOCTL is for querying the installed cards */ in tdfx_ioctl()
781 if((retval = tdfx_do_query(cmd, piod)) > 0) td->td_retval[0] = retval; in tdfx_ioctl()
784 case 0: in tdfx_ioctl()
785 /* The 0 type IOCTL is for programmed I/O methods */ in tdfx_ioctl()
786 if((tdfx_do_pio(cmd, piod)) > 0) td->td_retval[0] = retval; in tdfx_ioctl()
798 return 0; in tdfx_ioctl()
809 error = 0; in tdfx_mod_event()
812 error = 0; in tdfx_mod_event()