| plan 9 kernel history: overview | file list | diff list |
1994/1206/pc/dma.c (diff list | history)
| 1994/1206/sys/src/9/pc/dma.c:56,68 – 1995/0214/sys/src/9/pc/dma.c:56,67 (short | long | prev | next) | ||
| 1991/0803 | uchar mc; /* master clear */ uchar cmask; /* clear mask register */ uchar wam; /* write all mask register bit */ | |
| 1995/0214 | int shift; | |
| 1991/0803 | Lock; DMAxfer x[4]; }; | |
| 1994/1206/sys/src/9/pc/dma.c:71,81 – 1995/0214/sys/src/9/pc/dma.c:70,83 | ||
| 1991/0803 | { 0x00, 0x02, 0x04, 0x06, 0x01, 0x03, 0x05, 0x07, 0x87, 0x83, 0x81, 0x82, | |
| 1995/0214 | 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0 }, { 0xc0, 0xc4, 0xc8, 0xcc, 0xc2, 0xc6, 0xca, 0xce, 0x8f, 0x8b, 0x89, 0x8a, 0xd0, 0xd2, 0xd4, 0xd6, 0xd8, 0xda, 0xdc, 0xde, 1 }, | |
| 1991/0803 | }; /* | |
| 1994/1206/sys/src/9/pc/dma.c:95,100 – 1995/0214/sys/src/9/pc/dma.c:97,104 | ||
| 1993/0915 | xp = &dp->x[chan]; xp->pg.pa = (ulong)xspanalloc(BY2PG, BY2PG, 0); xp->pg.va = KZERO|xp->pg.pa; | |
| 1995/0214 | xp->len = 0; xp->isread = 0; | |
| 1993/0915 | } } } | |
| 1994/1206/sys/src/9/pc/dma.c:143,159 – 1995/0214/sys/src/9/pc/dma.c:147,163 | ||
| 1991/0803 | /* * this setup must be atomic */ | |
| 1995/0214 | ilock(dp); | |
| 1991/0803 | mode = (isread ? 0x44 : 0x48) | chan; outb(dp->mode, mode); /* single mode dma (give CPU a chance at mem) */ | |
| 1995/0214 | outb(dp->cbp, 0); /* set count & address to their first byte */ outb(dp->addr[chan], pa>>dp->shift); /* set address */ outb(dp->addr[chan], pa>>(8+dp->shift)); outb(dp->count[chan], (len>>dp->shift)-1); /* set count */ outb(dp->count[chan], ((len>>dp->shift)-1)>>8); | |
| 1991/0803 | outb(dp->sbm, chan); /* enable the channel */ | |
| 1995/0214 | iunlock(dp); | |
| 1991/0803 | return len; } | |
| 1994/1206/sys/src/9/pc/dma.c:177,185 – 1995/0214/sys/src/9/pc/dma.c:181,189 | ||
| 1991/0803 | /* * disable the channel */ | |
| 1995/0214 | ilock(dp); | |
| 1991/0803 | outb(dp->sbm, 4|chan); | |
| 1995/0214 | iunlock(dp); | |
| 1991/0803 | xp = &dp->x[chan]; | |
| 1994/1206 | if(xp->len == 0 || !xp->isread) | |