| plan 9 kernel history: overview | file list | diff list |
1999/0504/alphapc/dma.c (diff list | history)
| 1999/0501/sys/src/9/alphapc/dma.c:107,112 – 1999/0504/sys/src/9/alphapc/dma.c:107,142 (short | long | prev | next) | ||
| 1999/0423 | return 0; | |
| 1999/0415 | } | |
| 1999/0504 | static void dmastatus(DMA *dp, int chan) { int a, l, s; ilock(dp); outb(dp->cbp, 0); a = inb(dp->addr[chan]); a |= inb(dp->addr[chan])<<8; a |= inb(dp->page[chan])<<16; a |= inb(0x400|dp->page[chan])<<24; outb(dp->cbp, 0); l = inb(dp->count[chan]); l |= inb(dp->count[chan])<<8; s = inb(dp->cmd); iunlock(dp); print("addr %uX len %uX stat %uX\n", a, l, s); } void xdmastatus(int chan) { DMA *dp; dp = &dma[(chan>>2)&1]; chan = chan & 3; dmastatus(dp, chan); } | |
| 1999/0415 | /* * setup a dma transfer. if the destination is not in kernel * memory, allocate a page for the transfer. | |
| 1999/0501/sys/src/9/alphapc/dma.c:174,184 – 1999/0504/sys/src/9/alphapc/dma.c:204,215 | ||
| 1999/0501 | #ifdef tryPCI outb(0x400|dp->page[chan], pa>>24); #endif /* tryPCI */ | |
| 1999/0504 | outb(dp->cbp, 0); /* set count & address to their first byte */ | |
| 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/0501 |
| |
| 1999/0504 | dmastatus(dp, chan); | |
| 1999/0415 | return len; } | |
| 1999/0501/sys/src/9/alphapc/dma.c:210,215 – 1999/0504/sys/src/9/alphapc/dma.c:241,247 | ||
| 1999/0415 | dp = &dma[(chan>>2)&1]; chan = chan & 3; | |
| 1999/0504 | dmastatus(dp, chan); | |
| 1999/0415 | /* * disable the channel */ | |
| 1999/0501/sys/src/9/alphapc/dma.c:216,230 – 1999/0504/sys/src/9/alphapc/dma.c:248,253 | ||
| 1999/0415 | ilock(dp); outb(dp->sbm, 4|chan); iunlock(dp); | |
| 1999/0424 |
| |
| 1999/0501 |
| |
| 1999/0424 |
| |
| 1999/0415 | xp = &dp->x[chan]; if(xp->len == 0 || !xp->isread) | |