| plan 9 kernel history: overview | file list | diff list |
1999/0422/alphapc/pci.c (diff list | history)
| 1999/0422/sys/src/9/alphapc/pci.c:40,50 – 1999/0507/sys/src/9/alphapc/pci.c:40,51 (short | long | prev | next) | ||
| 1999/0415 | maxfno = 0; for(fno = 0; fno <= maxfno; fno++){ /* | |
| 1999/0507 | * For this possible device, form the * bus+device+function triplet needed to address it * and try to read the vendor and device ID. * If successful, allocate a device struct and * start to fill it in with some useful information * from the device's configuration space. | |
| 1999/0415 | */ tbdf = MKBUS(BusPCI, bno, dno, fno); l = pcicfgrw32(tbdf, PciVID, 0, 1); | |
| 1999/0422/sys/src/9/alphapc/pci.c:70,76 – 1999/0507/sys/src/9/alphapc/pci.c:71,79 | ||
| 1999/0415 | pcitail = p; p->intl = pcicfgr8(p, PciINTL); | |
| 1999/0507 | p->ccrp = pcicfgr8(p, PciCCRp); p->ccru = pcicfgr8(p, PciCCRu); p->ccrb = pcicfgr8(p, PciCCRb); | |
| 1999/0415 | /* * If the device is a multi-function device adjust the | |
| 1999/0422/sys/src/9/alphapc/pci.c:84,90 – 1999/0507/sys/src/9/alphapc/pci.c:87,93 | ||
| 1999/0415 | * If appropriate, read the base address registers * and work out the sizes. */ | |
| 1999/0507 | switch(p->ccrb){ | |
| 1999/0415 | case 0x01: /* mass storage controller */ case 0x02: /* network controller */ | |
| 1999/0422/sys/src/9/alphapc/pci.c:129,135 – 1999/0507/sys/src/9/alphapc/pci.c:132,138 | ||
| 1999/0415 | /* * Find PCI-PCI bridges and recursively descend the tree. */ | |
| 1999/0507 | if(p->ccrb != 0x06 || p->ccru != 0x04) | |
| 1999/0415 | continue; /* | |
| 1999/0422/sys/src/9/alphapc/pci.c:311,324 – 1999/0507/sys/src/9/alphapc/pci.c:314,329 | ||
| 1999/0415 | int i; Pcidev *t; | |
| 1999/0507 | if(pcicfgmode == -1) pcicfginit(); | |
| 1999/0415 | if(p == nil) { p = pciroot; print("bus dev type vid did intl memory\n"); } for(t = p; t != nil; t = t->link) { | |
| 1999/0507 | print("%d %2d/%d %.2ux %.2ux %.2ux %.4ux %.4ux %2d ", | |
| 1999/0415 | BUSBNO(t->tbdf), BUSDNO(t->tbdf), BUSFNO(t->tbdf), | |
| 1999/0507 | t->ccrb, t->ccru, t->ccrp, t->vid, t->did, t->intl); | |
| 1999/0415 | for(i = 0; i < nelem(p->mem); i++) { if(t->mem[i].size == 0) | |