/freebsd-11-stable/sys/dev/snc/ |
H A D | if_snc_cbus.c | 76 int rid; local 80 for (rid = 0; rid < ISA_NMEM; rid++) { 81 if (bus_get_resource(dev, SYS_RES_MEMORY, rid, &start, &count)) 83 config.ic_mem[rid].ir_start = start; 84 config.ic_mem[rid].ir_end = start; 85 config.ic_mem[rid].ir_size = count; 87 config.ic_nmem = rid; 88 for (rid 144 int rid = 0; local [all...] |
/freebsd-11-stable/tools/bus_space/ |
H A D | bus.h | 33 int bs_read(int rid, off_t ofs, void *buf, ssize_t bufsz); 35 int bs_unmap(int rid); 36 int bs_write(int rid, off_t ofs, void *buf, ssize_t bufsz);
|
H A D | bus.c | 44 int rid; member in struct:resource 59 int rid; local 61 for (rid = 0; rid < nrids; rid++) { 62 if (ridtbl[rid].fd == -1) 65 if (rid == nrids) { 74 ridtbl[rid].fd = INT_MAX; 75 return (rid); 79 rid_lookup(int rid) argument 101 int len, rid; local 132 bs_read(int rid, off_t ofs, void *buf, ssize_t bufsz) argument 180 int fd0, rid; local 213 bs_unmap(int rid) argument 230 bs_write(int rid, off_t ofs, void *buf, ssize_t bufsz) argument [all...] |
/freebsd-11-stable/tools/bus_space/C/ |
H A D | lang.c | 38 bus_read_1(int rid, long ofs) argument 42 return ((!bs_read(rid, ofs, &val, sizeof(val))) ? -1 : (int)val); 46 bus_read_2(int rid, long ofs) argument 50 return ((!bs_read(rid, ofs, &val, sizeof(val))) ? -1 : (int)val); 54 bus_read_4(int rid, long ofs) argument 58 return ((!bs_read(rid, ofs, &val, sizeof(val))) ? -1 : (int64_t)val); 62 bus_write_1(int rid, long ofs, uint8_t val) argument 65 return ((!bs_write(rid, ofs, &val, sizeof(val))) ? errno : 0); 69 bus_write_2(int rid, long ofs, uint16_t val) argument 72 return ((!bs_write(rid, of 76 bus_write_4(int rid, long ofs, uint32_t val) argument 90 bus_unmap(int rid) argument 97 bus_subregion(int rid, long ofs, long sz) argument [all...] |
H A D | libbus.h | 33 int16_t bus_read_1(int rid, long ofs); 34 int32_t bus_read_2(int rid, long ofs); 35 int64_t bus_read_4(int rid, long ofs); 36 int bus_subregion(int rid, long ofs, long sz); 37 int bus_unmap(int rid); 38 int bus_write_1(int rid, long ofs, uint8_t val); 39 int bus_write_2(int rid, long ofs, uint16_t val); 40 int bus_write_4(int rid, long ofs, uint32_t val);
|
/freebsd-11-stable/sys/dev/proto/ |
H A D | proto_bus_isa.c | 70 int rid, type; local 72 rid = 0; 74 res = bus_alloc_resource_any(dev, type, &rid, RF_ACTIVE); 77 res = bus_alloc_resource_any(dev, type, &rid, RF_ACTIVE); 87 bus_release_resource(dev, type, rid, res); 96 int count, rid; local 100 for (rid = 0; rid < nrids; rid++) { 101 res = bus_alloc_resource_any(dev, type, &rid, RF_ACTIV [all...] |
H A D | proto_bus_pci.c | 88 int bar, rid, type; local 96 rid = PCIR_BAR(bar); 97 val = pci_read_config(dev, rid, 4); 99 res = bus_alloc_resource_any(dev, type, &rid, RF_ACTIVE); 102 proto_add_resource(sc, type, rid, res); 110 rid = 0; 112 res = bus_alloc_resource_any(dev, type, &rid, RF_ACTIVE | RF_SHAREABLE); 114 proto_add_resource(sc, type, rid, res);
|
/freebsd-11-stable/sys/powerpc/mpc85xx/ |
H A D | isa.c | 48 isa_alloc_resource(device_t bus, device_t child, int type, int *rid, argument 59 resource_list_find(rl, type, *rid) == NULL) { 66 if (*rid < 0 || *rid >= rids) 69 resource_list_add(rl, type, *rid, start, end, count); 72 return (resource_list_alloc(rl, bus, child, type, rid, start, end, 77 isa_release_resource(device_t bus, device_t child, int type, int rid, argument 83 return (resource_list_release(rl, bus, child, type, rid, r));
|
/freebsd-11-stable/sys/dev/mca/ |
H A D | mca_bus.c | 184 int rid = 0; local 186 while (resource_list_find(&(m_dev->rl), SYS_RES_IRQ, rid)) rid++; 187 resource_list_add(&(m_dev->rl), SYS_RES_IRQ, rid, irq, irq, 1); 198 int rid = 0; local 200 while (resource_list_find(&(m_dev->rl), SYS_RES_DRQ, rid)) rid++; 201 resource_list_add(&(m_dev->rl), SYS_RES_DRQ, rid, drq, drq, 1); 213 int rid = 0; local 215 while (resource_list_find(&(m_dev->rl), SYS_RES_MEMORY, rid)) ri 229 int rid = 0; local 354 int rid; local 458 mca_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) argument [all...] |
/freebsd-11-stable/sys/dev/atkbdc/ |
H A D | atkbdc_isa.c | 53 int type, int *rid, rman_res_t start, rman_res_t end, 56 int type, int rid, struct resource *r); 103 int rid; local 129 rid = 0; 130 if (bus_get_resource(dev, SYS_RES_IOPORT, rid, &start, &count) != 0) 137 bus_set_resource(dev, SYS_RES_IOPORT, rid, start, 1); 138 port0 = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); 141 rid = 1; 142 if (bus_get_resource(dev, SYS_RES_IOPORT, rid, NULL, NULL) != 0) 145 port1 = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIV 193 int rid; local 297 atkbdc_isa_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) argument 310 atkbdc_isa_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r) argument [all...] |
H A D | atkbdc_ebus.c | 95 int error, rid; local 132 rid = 0; 133 if (bus_get_resource(dev, SYS_RES_MEMORY, rid, &start, &count) != 0) { 138 port0 = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, start, start, 1, 146 rid = 1; 147 if (bus_get_resource(dev, SYS_RES_MEMORY, rid, &start, &count) != 0) { 153 port1 = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, start, start, 1, 180 int children, error, rid, unit; local 199 rid = 0; 200 if (bus_get_resource(dev, SYS_RES_MEMORY, rid, [all...] |
/freebsd-11-stable/sys/dev/fdc/ |
H A D | fdc_cbus.c | 55 int i, rid; local 58 rid = 0; 59 res = isa_alloc_resourcev(dev, SYS_RES_IOPORT, &rid, fdc_iat, 3, 68 fdc->ridio[i] = rid; 74 rid = 3; 75 bus_set_resource(dev, SYS_RES_IOPORT, rid, IO_FDPORT, 1); 76 res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); 82 fdc->ridio[3] = rid; 87 rid = 4; 88 bus_set_resource(dev, SYS_RES_IOPORT, rid, [all...] |
/freebsd-11-stable/sys/dev/ppc/ |
H A D | ppcvar.h | 31 int ppc_probe(device_t dev, int rid); 44 int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); 45 int ppc_release_resource(device_t bus, device_t child, int type, int rid,
|
/freebsd-11-stable/sys/x86/isa/ |
H A D | isa.c | 90 isa_alloc_resource(device_t bus, device_t child, int type, int *rid, argument 103 rle = resource_list_find(rl, type, *rid); 105 if (*rid < 0) 109 if (*rid >= ISA_NIRQ) 113 if (*rid >= ISA_NDRQ) 117 if (*rid >= ISA_NMEM) 121 if (*rid >= ISA_NPORT) 127 resource_list_add(rl, type, *rid, start, end, count); 131 return resource_list_alloc(rl, bus, child, type, rid, 141 isa_alloc_resourcev(device_t child, int type, int *rid, argument 213 isa_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r) argument [all...] |
H A D | orm.c | 65 int rid[MAX_ROMS]; member in struct:orm_softc 89 int rid; local 106 rid = sc->rnum; 107 res = bus_alloc_resource_any(child, SYS_RES_MEMORY, &rid, 129 bus_release_resource(child, SYS_RES_MEMORY, rid, res); 138 rid = sc->rnum; 139 res = bus_alloc_resource_any(child, SYS_RES_MEMORY, &rid, 0); 145 sc->rid[sc->rnum] = rid; 166 bus_release_resource(dev, SYS_RES_MEMORY, sc->rid[ [all...] |
/freebsd-11-stable/sys/dev/eisa/ |
H A D | eisaconf.c | 96 static struct irq_node *eisa_find_irq(struct eisa_device *e_dev, int rid); 97 static struct resvaddr *eisa_find_maddr(struct eisa_device *e_dev, int rid); 98 static struct resvaddr *eisa_find_ioaddr(struct eisa_device *e_dev, int rid); 244 int rid; local 250 rid = 0; 251 while ((resv = eisa_find_ioaddr(e_dev, rid++))) { 253 retval += printf("%s%lx", rid == 1 ? " port 0x" : ",0x", 256 retval += printf("%s%lx-0x%lx", rid == 1 ? " port 0x" : 259 rid = 0; 260 while ((resv = eisa_find_maddr(e_dev, rid 279 eisa_find_irq(struct eisa_device *e_dev, int rid) argument 292 eisa_find_maddr(struct eisa_device *e_dev, int rid) argument 305 eisa_find_ioaddr(struct eisa_device *e_dev, int rid) argument 354 eisa_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) argument 422 eisa_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r) argument [all...] |
/freebsd-11-stable/tools/bus_space/Python/ |
H A D | lang.c | 39 int rid; local 42 if (!PyArg_ParseTuple(args, "il", &rid, &ofs)) 44 if (!bs_read(rid, ofs, &val, sizeof(val))) { 55 int rid; local 58 if (!PyArg_ParseTuple(args, "il", &rid, &ofs)) 60 if (!bs_read(rid, ofs, &val, sizeof(val))) { 71 int rid; local 74 if (!PyArg_ParseTuple(args, "il", &rid, &ofs)) 76 if (!bs_read(rid, ofs, &val, sizeof(val))) { 87 int rid; local 103 int rid; local 119 int rid; local 135 int rid; local 150 int rid; local 165 int rid0, rid; local [all...] |
/freebsd-11-stable/sys/sparc64/isa/ |
H A D | isa.c | 149 int i, ndrq, nintr, nreg, nregidx, rid, rtype; local 200 rid = 0; 201 while (resource_list_find(rl, rtype, rid) != NULL) 202 rid++; 203 bus_set_resource(cdev, rtype, rid, start, 224 rid = 0; 226 rid) != NULL) 227 rid++; 228 bus_set_resource(cdev, rtype, rid, 275 isa_alloc_resource(device_t bus, device_t child, int type, int *rid, argument 356 isa_release_resource(device_t bus, device_t child, int type, int rid, struct resource *res) argument [all...] |
/freebsd-11-stable/sys/dev/pci/ |
H A D | pcib_support.c | 74 pcib_decode_rid(device_t pcib, uint16_t rid, int *bus, int *slot, argument 78 *bus = PCI_RID2BUS(rid); 79 *slot = PCI_RID2SLOT(rid); 80 *func = PCI_RID2FUNC(rid);
|
/freebsd-11-stable/sys/dev/joy/ |
H A D | joyvar.h | 37 int rid; member in struct:joy_softc
|
/freebsd-11-stable/sys/amd64/vmm/io/ |
H A D | iommu.h | 42 typedef void (*iommu_add_device_t)(void *domain, uint16_t rid); 43 typedef void (*iommu_remove_device_t)(void *dom, uint16_t rid); 71 void iommu_add_device(void *dom, uint16_t rid); 72 void iommu_remove_device(void *dom, uint16_t rid);
|
/freebsd-11-stable/sys/dev/cfe/ |
H A D | cfe_resource.c | 56 int rid[MAX_CFE_RESERVATIONS]; member in struct:cferes_softc 81 int rid; local 103 rid = sc->rnum; 104 res = bus_alloc_resource_any(child, SYS_RES_MEMORY, &rid, 0); 109 sc->rid[sc->rnum] = rid; 132 bus_release_resource(dev, SYS_RES_MEMORY, sc->rid[i],
|
/freebsd-11-stable/sys/dev/cm/ |
H A D | if_cm_isa.c | 63 int rid; local 65 rid = 0; 67 dev, SYS_RES_IOPORT, &rid, CM_IO_PORTS, RF_ACTIVE); 76 rid = 0; 78 dev, SYS_RES_MEMORY, &rid, CM_MEM_SIZE, RF_ACTIVE); 84 rid = 0; 85 sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE);
|
/freebsd-11-stable/sys/dev/ata/ |
H A D | ata-isa.c | 64 int rid; local 71 rid = ATA_IOADDR_RID; 72 if (!(io = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid, 83 rid = ATA_CTLADDR_RID; 84 if (!(ctlio = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid, 104 int i, rid; local 111 rid = ATA_IOADDR_RID; 112 if (!(io = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid, 123 rid = ATA_CTLADDR_RID; 124 if (!(ctlio = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid, [all...] |
H A D | ata-cbus.c | 69 int rid; local 77 rid = ATA_IOADDR_RID; 78 if (!(io = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid, 83 rid = ATA_PC98_CTLADDR_RID; 84 if (bus_get_resource(dev, SYS_RES_IOPORT, rid, &tmp, &tmp)) { 85 bus_set_resource(dev, SYS_RES_IOPORT, rid, 90 rid = ATA_PC98_BANKADDR_RID; 91 if (bus_get_resource(dev, SYS_RES_IOPORT, rid, &tmp, &tmp)) { 92 bus_set_resource(dev, SYS_RES_IOPORT, rid, 105 int rid, uni local 170 ata_cbus_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) argument [all...] |