| plan 9 kernel history: overview | file list | diff list |
1999/0424/alphapc/dma.c (diff list | history)
| 1999/0424/sys/src/9/alphapc/dma.c:85,90 – 1999/0501/sys/src/9/alphapc/dma.c:85,91 (short | long | prev | next) | ||
| 1999/0423 | return 1; return 0; | |
| 1999/0415 | } | |
| 1999/0501 | outb(dp->mc, 0); | |
| 1999/0423 | xp->bva = xspanalloc(maxtransfer, BY2PG, 64*1024); if(xp->bva == nil) | |
| 1999/0424/sys/src/9/alphapc/dma.c:126,131 – 1999/0501/sys/src/9/alphapc/dma.c:127,135 | ||
| 1999/0415 | dp = &dma[(chan>>2)&1]; chan = chan & 3; | |
| 1999/0501 | //print("va%lux+", va); #define tryPCI #ifdef notdef | |
| 1999/0415 | xp = &dp->x[chan]; /* | |
| 1999/0424/sys/src/9/alphapc/dma.c:132,139 – 1999/0501/sys/src/9/alphapc/dma.c:136,141 | ||
| 1999/0415 | * if this isn't kernel memory or crossing 64k boundary or above 16 meg | |
| 1999/0423 | * use the bounce buffer. | |
| 1999/0415 | */ | |
| 1999/0424 |
| |
| 1999/0423 |
| |
| 1999/0415 | pa = PADDR(va); if((((ulong)va)&0xF0000000) != KZERO || (pa&0xFFFF0000) != ((pa+len)&0xFFFF0000) | |
| 1999/0424/sys/src/9/alphapc/dma.c:151,159 – 1999/0501/sys/src/9/alphapc/dma.c:153,165 | ||
| 1999/0415 | } else xp->len = 0; | |
| 1999/0423 |
| |
| 1999/0424 |
| |
| 1999/0423 | #endif /* notdef */ | |
| 1999/0501 | #ifdef tryISA pa = ISAWADDR(va); #endif /* tryISA */ #ifdef tryPCI pa = PCIWADDR(va); #endif /* tryPCI */ | |
| 1999/0415 | /* * this setup must be atomic | |
| 1999/0424/sys/src/9/alphapc/dma.c:165,176 – 1999/0501/sys/src/9/alphapc/dma.c:171,184 | ||
| 1999/0415 | outb(dp->addr[chan], pa>>dp->shift); /* set address */ outb(dp->addr[chan], pa>>(8+dp->shift)); | |
| 1999/0423 | outb(dp->page[chan], pa>>16); | |
| 1999/0424 |
| |
| 1999/0501 | #ifdef tryPCI outb(0x400|dp->page[chan], pa>>24); #endif /* tryPCI */ | |
| 1999/0415 | outb(dp->count[chan], (len>>dp->shift)-1); /* set count */ outb(dp->count[chan], ((len>>dp->shift)-1)>>8); outb(dp->sbm, chan); /* enable the channel */ iunlock(dp); | |
| 1999/0424 |
| |
| 1999/0501 | //print("pa%lux+", pa); | |
| 1999/0415 | return len; } | |
| 1999/0424/sys/src/9/alphapc/dma.c:215,221 – 1999/0501/sys/src/9/alphapc/dma.c:223,229 | ||
| 1999/0424 | i |= inb(dp->addr[chan])<<8; i |= inb(dp->page[chan])<<16; i |= inb(0x400|dp->page[chan])<<24; | |
| 1999/0501 | //print("X%uX+", i); | |
| 1999/0424 | } | |
| 1999/0415 | xp = &dp->x[chan]; | |