/freebsd/tools/bus_space/ |
H A D | bus.c | 42 int rid; member 57 int rid; in rid_alloc() local 59 for (rid = 0; rid < nrids; rid++) { in rid_alloc() 60 if (ridtbl[rid].fd == -1) in rid_alloc() 63 if (rid == nrids) { in rid_alloc() 72 ridtbl[rid].fd = INT_MAX; in rid_alloc() 73 return (rid); in rid_alloc() 77 rid_lookup(int rid) in rid_lookup() argument 81 if (rid < 0 || rid >= nrids) { in rid_lookup() 85 r = ridtbl + rid; in rid_lookup() [all …]
|
/freebsd/tools/bus_space/C/ |
H A D | lang.c | 35 bus_read_1(int rid, long ofs) in bus_read_1() argument 39 return ((!bs_read(rid, ofs, &val, sizeof(val))) ? -1 : (int)val); in bus_read_1() 43 bus_read_2(int rid, long ofs) in bus_read_2() argument 47 return ((!bs_read(rid, ofs, &val, sizeof(val))) ? -1 : (int)val); in bus_read_2() 51 bus_read_4(int rid, long ofs) in bus_read_4() argument 55 return ((!bs_read(rid, ofs, &val, sizeof(val))) ? -1 : (int64_t)val); in bus_read_4() 59 bus_write_1(int rid, long ofs, uint8_t val) in bus_write_1() argument 62 return ((!bs_write(rid, ofs, &val, sizeof(val))) ? errno : 0); in bus_write_1() 66 bus_write_2(int rid, long ofs, uint16_t val) in bus_write_2() argument 69 return ((!bs_write(rid, ofs, &val, sizeof(val))) ? errno : 0); in bus_write_2() [all …]
|
H A D | libbus.h | 31 int16_t bus_read_1(int rid, long ofs); 32 int32_t bus_read_2(int rid, long ofs); 33 int64_t bus_read_4(int rid, long ofs); 34 int bus_subregion(int rid, long ofs, long sz); 35 int bus_unmap(int rid); 36 int bus_write_1(int rid, long ofs, uint8_t val); 37 int bus_write_2(int rid, long ofs, uint16_t val); 38 int bus_write_4(int rid, long ofs, uint32_t val);
|
/freebsd/sys/dev/atkbdc/ |
H A D | atkbdc_isa.c | 53 int type, int *rid, rman_res_t start, rman_res_t end, 102 int rid; in atkbdc_isa_probe() local 128 rid = 0; in atkbdc_isa_probe() 129 if (bus_get_resource(dev, SYS_RES_IOPORT, rid, &start, &count) != 0) in atkbdc_isa_probe() 136 bus_set_resource(dev, SYS_RES_IOPORT, rid, start, 1); in atkbdc_isa_probe() 137 port0 = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); in atkbdc_isa_probe() 140 rid = 1; in atkbdc_isa_probe() 141 if (bus_get_resource(dev, SYS_RES_IOPORT, rid, NULL, NULL) != 0) in atkbdc_isa_probe() 144 port1 = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); in atkbdc_isa_probe() 192 int rid; in atkbdc_isa_attach() local [all …]
|
H A D | atkbd_atkbdc.c | 87 int rid; in atkbdprobe() local 95 rid = KBDC_RID_KBD; in atkbdprobe() 96 res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); in atkbdprobe() 103 bus_release_resource(dev, SYS_RES_IRQ, rid, res); in atkbdprobe() 116 int rid; in atkbdattach() local 121 rid = KBDC_RID_KBD; in atkbdattach() 122 irq = bus_get_resource_start(dev, SYS_RES_IRQ, rid); in atkbdattach() 129 sc->intr = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); in atkbdattach() 135 bus_release_resource(dev, SYS_RES_IRQ, rid, sc->intr); in atkbdattach()
|
/freebsd/tools/bus_space/Python/ |
H A D | lang.c | 37 int rid; in bus_read_1() local 40 if (!PyArg_ParseTuple(args, "il", &rid, &ofs)) in bus_read_1() 42 if (!bs_read(rid, ofs, &val, sizeof(val))) { in bus_read_1() 53 int rid; in bus_read_2() local 56 if (!PyArg_ParseTuple(args, "il", &rid, &ofs)) in bus_read_2() 58 if (!bs_read(rid, ofs, &val, sizeof(val))) { in bus_read_2() 69 int rid; in bus_read_4() local 72 if (!PyArg_ParseTuple(args, "il", &rid, &ofs)) in bus_read_4() 74 if (!bs_read(rid, ofs, &val, sizeof(val))) { in bus_read_4() 85 int rid; in bus_write_1() local [all …]
|
/freebsd/usr.bin/usbhidctl/ |
H A D | usbhid.c | 304 int dlen, havedata, i, match, r, rid, use_rid; in dumpdata() local 309 rid = -1; in dumpdata() 313 if (++rid >= 256) { in dumpdata() 314 rid = 0; in dumpdata() 318 rid = -1; in dumpdata() 320 if (rid == var->h.report_ID && in dumpdata() 327 dlen = hid_report_size(rd, kind < 3 ? kind : hid_input, rid); in dumpdata() 333 dbuf[0] = rid; in dumpdata() 336 warn("hid_get_report(rid %d)", rid); in dumpdata() 337 havedata = !r && (rid == 0 || dbuf[0] == rid); in dumpdata() [all …]
|
/freebsd/sys/x86/isa/ |
H A D | isa.c | 87 isa_alloc_resource(device_t bus, device_t child, int type, int *rid, in isa_alloc_resource() argument 100 rle = resource_list_find(rl, type, *rid); in isa_alloc_resource() 102 if (*rid < 0) in isa_alloc_resource() 106 if (*rid >= ISA_NIRQ) in isa_alloc_resource() 110 if (*rid >= ISA_NDRQ) in isa_alloc_resource() 114 if (*rid >= ISA_NMEM) in isa_alloc_resource() 118 if (*rid >= ISA_NPORT) in isa_alloc_resource() 124 resource_list_add(rl, type, *rid, start, end, count); in isa_alloc_resource() 128 return resource_list_alloc(rl, bus, child, type, rid, in isa_alloc_resource()
|
H A D | orm.c | 65 int rid[MAX_ROMS]; member 89 int rid; in orm_identify() local 106 rid = sc->rnum; in orm_identify() 107 res = bus_alloc_resource_any(child, SYS_RES_MEMORY, &rid, in orm_identify() 129 bus_release_resource(child, SYS_RES_MEMORY, rid, res); in orm_identify() 138 rid = sc->rnum; in orm_identify() 139 res = bus_alloc_resource_any(child, SYS_RES_MEMORY, &rid, 0); in orm_identify() 145 sc->rid[sc->rnum] = rid; in orm_identify() 166 bus_release_resource(dev, SYS_RES_MEMORY, sc->rid[ in orm_detach() [all...] |
/freebsd/sys/dev/pci/ |
H A D | vga_pci.c | 68 static struct vga_resource *lookup_res(struct vga_pci_softc *sc, int rid); 70 int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, 170 int i, rid, found; in vga_pci_map_bios() local 204 rid = PCIR_BIOS_1; in vga_pci_map_bios() 207 rid = 0; in vga_pci_map_bios() 210 rid = PCIR_BIOS; in vga_pci_map_bios() 213 if (rid == 0) in vga_pci_map_bios() 215 res = vga_pci_alloc_resource(dev, NULL, SYS_RES_MEMORY, &rid, 0, in vga_pci_map_bios() 239 rom_addr = pci_read_config(dev, rid, 4); in vga_pci_map_bios() 242 pci_write_config(dev, rid, rom_addr, 4); in vga_pci_map_bios() [all …]
|
/freebsd/sys/arm64/iommu/ |
H A D | smmu_fdt.c | 84 int rid; in smmu_fdt_attach() local 91 rid = 0; in smmu_fdt_attach() 92 sc->res[0] = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, in smmu_fdt_attach() 105 &rid); in smmu_fdt_attach() 112 sc->res[1] = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); in smmu_fdt_attach() 126 &rid); in smmu_fdt_attach() 133 sc->res[3] = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); in smmu_fdt_attach() 141 &rid); in smmu_fdt_attach() 148 sc->res[4] = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); in smmu_fdt_attach()
|
/freebsd/sys/dev/ata/ |
H A D | ata-isa.c | 63 int rid; in ata_isa_probe() local 70 rid = ATA_IOADDR_RID; in ata_isa_probe() 71 if (!(io = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid, in ata_isa_probe() 82 rid = ATA_CTLADDR_RID; in ata_isa_probe() 83 if (!(ctlio = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid, in ata_isa_probe() 103 int i, rid; in ata_isa_attach() local 110 rid = ATA_IOADDR_RID; in ata_isa_attach() 111 if (!(io = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid, in ata_isa_attach() 122 rid = ATA_CTLADDR_RID; in ata_isa_attach() 123 if (!(ctlio = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid, in ata_isa_attach()
|
/freebsd/crypto/openssh/ |
H A D | mux.c | 90 u_int rid; member 95 u_int rid; member 101 u_int rid; /* request id */ member 267 mux_master_process_hello(struct ssh *ssh, u_int rid, in mux_master_process_hello() argument 311 reply_ok(struct sshbuf *reply, u_int rid) in reply_ok() argument 316 (r = sshbuf_put_u32(reply, rid)) != 0) in reply_ok() 322 reply_error(struct sshbuf *reply, u_int type, u_int rid, const char *msg) in reply_error() argument 327 (r = sshbuf_put_u32(reply, rid)) != 0 || in reply_error() 333 mux_master_process_new_session(struct ssh *ssh, u_int rid, in mux_master_process_new_session() argument 345 cctx->rid = rid; in mux_master_process_new_session() [all …]
|
/freebsd/sys/x86/iommu/ |
H A D | intel_intrmap.c | 62 static struct dmar_unit *dmar_ir_find(device_t src, uint16_t *rid, 65 uint64_t low, uint16_t rid); 102 uint16_t rid; in dmar_map_msi_intr() local 105 unit = dmar_ir_find(src, &rid, &is_dmar); in dmar_map_msi_intr() 128 dmar_ir_program_irte(unit, cookie, low, rid); in dmar_map_msi_intr() 162 uint16_t rid; in dmar_map_ioapic_intr() local 164 unit = dmar_find_ioapic(ioapic_id, &rid); in dmar_map_ioapic_intr() 197 dmar_ir_program_irte(unit, idx, low, rid); in dmar_map_ioapic_intr() 233 dmar_ir_find(device_t src, uint16_t *rid, int *is_dmar) in dmar_ir_find() argument 253 unit = dmar_find_hpet(src, rid); in dmar_ir_find() [all …]
|
H A D | amd_intrmap.c | 76 static struct amdiommu_ctx *amdiommu_ir_find(device_t src, uint16_t *rid, 115 uint16_t rid; in amdiommu_map_msi_intr() local 118 ctx = amdiommu_ir_find(src, &rid, &is_iommu); in amdiommu_map_msi_intr() 183 iommu_get_requester(src, &rid); in amdiommu_map_msi_intr() 185 amdiommu_qi_invalidate_ir_locked(unit, rid); in amdiommu_map_msi_intr() 226 uint16_t rid; in amdiommu_ir_find() local 247 error = amdiommu_find_unit_for_hpet(src, &unit, &rid, &dte, in amdiommu_ir_find() 251 error = amdiommu_find_unit(src, &unit, &rid, &dte, &edte, in amdiommu_ir_find() 254 iommu_get_requester(src, &rid); in amdiommu_ir_find() 256 rid, 0, false /* XXXKIB */, false, dte, edte); in amdiommu_ir_find() [all …]
|
H A D | amd_ctx.c | 80 return (&CTX2AMD(ctx)->dev_tbl[ctx->context.rid]); in amdiommu_get_dtep() 275 amdiommu_ctx_alloc(struct amdiommu_domain *domain, uint16_t rid) in amdiommu_ctx_alloc() argument 283 ctx->context.rid = rid; in amdiommu_ctx_alloc() 321 amdiommu_find_ctx_locked(struct amdiommu_unit *unit, uint16_t rid) in amdiommu_find_ctx_locked() argument 330 if (ctx->rid == rid) in amdiommu_find_ctx_locked() 338 amdiommu_find_domain(struct amdiommu_unit *unit, uint16_t rid) in amdiommu_find_domain() argument 346 if (ctx->rid == rid) in amdiommu_find_domain() 388 amdiommu_qi_invalidate_ir_locked_nowait(unit, ctx->context.rid); in amdiommu_free_ctx_locked() 493 PCI_RID2BUS(ctx->context.rid))) { in dte_entry_init() 505 amdiommu_get_ctx_for_dev(struct amdiommu_unit *unit, device_t dev, uint16_t rid, in amdiommu_get_ctx_for_dev() argument [all …]
|
/freebsd/crypto/openssl/crypto/cms/ |
H A D | cms_kari.c | 119 CMS_KeyAgreeRecipientIdentifier *rid = rek->rid; in CMS_RecipientEncryptedKey_get0_id() local 121 if (rid->type == CMS_REK_ISSUER_SERIAL) { in CMS_RecipientEncryptedKey_get0_id() 123 *issuer = rid->d.issuerAndSerialNumber->issuer; in CMS_RecipientEncryptedKey_get0_id() 125 *sno = rid->d.issuerAndSerialNumber->serialNumber; in CMS_RecipientEncryptedKey_get0_id() 132 } else if (rid->type == CMS_REK_KEYIDENTIFIER) { in CMS_RecipientEncryptedKey_get0_id() 134 *keyid = rid->d.rKeyId->subjectKeyIdentifier; in CMS_RecipientEncryptedKey_get0_id() 136 *tm = rid->d.rKeyId->date; in CMS_RecipientEncryptedKey_get0_id() 138 *other = rid->d.rKeyId->other; in CMS_RecipientEncryptedKey_get0_id() 151 CMS_KeyAgreeRecipientIdentifier *rid = rek->rid; in CMS_RecipientEncryptedKey_cert_cmp() local 153 if (rid->type == CMS_REK_ISSUER_SERIAL) in CMS_RecipientEncryptedKey_cert_cmp() [all …]
|
/freebsd/sys/dev/bhnd/cores/pmu/ |
H A D | bhnd_pmu_core.c | 84 int rid; in bhnd_pmu_core_attach() local 89 rid = 0; in bhnd_pmu_core_attach() 90 res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); in bhnd_pmu_core_attach() 106 bhnd_release_resource(dev, SYS_RES_MEMORY, rid, res); in bhnd_pmu_core_attach() 110 sc->rid = rid; in bhnd_pmu_core_attach() 126 bhnd_release_resource(dev, SYS_RES_MEMORY, sc->rid, sc->res); in bhnd_pmu_core_detach()
|
/freebsd/sys/contrib/libsodium/packaging/dotnet-core/ |
H A D | prepare.py | 59 def __init__(self, version, rid, platform): argument 62 self.packfile = os.path.join(version.builddir, 'runtimes', rid, 'native', LIBRARY + '.dll') 64 self.tempdir = os.path.join(version.tempdir, rid) 83 def __init__(self, version, rid, codename): argument 86 self.packfile = os.path.join(version.builddir, 'runtimes', rid, 'native', LIBRARY + '.dylib') 88 self.tempdir = os.path.join(version.tempdir, rid) 107 def __init__(self, version, rid, docker_image): argument 110 self.packfile = os.path.join(version.builddir, 'runtimes', rid, 'native', LIBRARY + '.so') 111 self.tempdir = os.path.join(version.tempdir, rid) 114 self.recipe = rid [all …]
|
/freebsd/sys/dev/sfxge/ |
H A D | sfxge_intr.c | 241 int rid; in sfxge_intr_alloc() local 254 rid = i + 1; in sfxge_intr_alloc() 255 res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, in sfxge_intr_alloc() 259 "message %d\n", rid); in sfxge_intr_alloc() 263 table[i].eih_rid = rid; in sfxge_intr_alloc() 282 int rid; in sfxge_intr_teardown_msix() local 287 rid = rman_get_rid(resp); in sfxge_intr_teardown_msix() 288 bus_release_resource(dev, SYS_RES_MEMORY, rid, resp); in sfxge_intr_teardown_msix() 298 int rid; in sfxge_intr_setup_msix() local 312 rid = PCIR_BAR(4); in sfxge_intr_setup_msix() [all …]
|
/freebsd/sys/dev/gve/ |
H A D | gve_utils.c | 228 int rid; in gve_free_irqs() local 244 rid = rman_get_rid(irq->res); in gve_free_irqs() 249 rid); in gve_free_irqs() 252 rid, irq->res); in gve_free_irqs() 255 rid); in gve_free_irqs() 277 int rid; in gve_alloc_irqs() local 305 rid = i + 1; in gve_alloc_irqs() 308 &rid, RF_ACTIVE); in gve_alloc_irqs() 311 rid, i); in gve_alloc_irqs() 321 "err: %d\n", rid, i, err); in gve_alloc_irqs() [all …]
|
/freebsd/sys/i386/bios/ |
H A D | smapi.c | 64 int rid; member 143 int rid; in smapi_identify() local 151 rid = 0; in smapi_identify() 156 bus_set_resource(child, SYS_RES_MEMORY, rid, addr, length); in smapi_identify() 167 int rid; in smapi_probe() local 171 rid = 0; in smapi_probe() 172 res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); in smapi_probe() 187 bus_release_resource(dev, SYS_RES_MEMORY, rid, res); in smapi_probe() 202 sc->rid = 0; in smapi_attach() 203 sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->rid, in smapi_attach() [all...] |
/freebsd/sys/x86/bios/ |
H A D | vpd.c | 74 int rid; member 134 int rid; in vpd_identify() local 141 rid = 0; in vpd_identify() 146 bus_set_resource(child, SYS_RES_MEMORY, rid, addr, length); in vpd_identify() 157 int rid; in vpd_probe() local 161 rid = 0; in vpd_probe() 162 res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); in vpd_probe() 174 bus_release_resource(dev, SYS_RES_MEMORY, rid, res); in vpd_probe() 189 sc->rid = 0; in vpd_attach() 190 sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->rid, in vpd_attach() [all...] |
/freebsd/sys/dev/cfe/ |
H A D | cfe_resource.c | 55 int rid[MAX_CFE_RESERVATIONS]; member 80 int rid; in cferes_identify() local 102 rid = sc->rnum; in cferes_identify() 103 res = bus_alloc_resource_any(child, SYS_RES_MEMORY, &rid, 0); in cferes_identify() 108 sc->rid[sc->rnum] = rid; in cferes_identify() 131 bus_release_resource(dev, SYS_RES_MEMORY, sc->rid[i], in cferes_detach()
|
/freebsd/sys/powerpc/mpc85xx/ |
H A D | isa.c | 47 isa_alloc_resource(device_t bus, device_t child, int type, int *rid, in isa_alloc_resource() argument 58 resource_list_find(rl, type, *rid) == NULL) { in isa_alloc_resource() 65 if (*rid < 0 || *rid >= rids) in isa_alloc_resource() 68 resource_list_add(rl, type, *rid, start, end, count); in isa_alloc_resource() 71 return (resource_list_alloc(rl, bus, child, type, rid, start, end, in isa_alloc_resource()
|