| /netbsd-src/sys/arch/mac68k/dev/ |
| H A D | if_ae.c | 39 ae_size_card_memory(bus_space_tag_t bst, bus_space_handle_t bsh, int ofs) in ae_size_card_memory() argument 54 bus_space_write_2(bst, bsh, ofs + i8, 0x8888); in ae_size_card_memory() 55 bus_space_write_2(bst, bsh, ofs + i4, 0x4444); in ae_size_card_memory() 56 bus_space_write_2(bst, bsh, ofs + i3, 0x3333); in ae_size_card_memory() 57 bus_space_write_2(bst, bsh, ofs + i2, 0x2222); in ae_size_card_memory() 58 bus_space_write_2(bst, bsh, ofs + i1, 0x1111); in ae_size_card_memory() 69 if (bus_space_read_2(bst, bsh, ofs + i1) == 0x1111 && in ae_size_card_memory() 70 bus_space_read_2(bst, bsh, ofs + i2) == 0x2222 && in ae_size_card_memory() 71 bus_space_read_2(bst, bsh, ofs + i3) == 0x3333 && in ae_size_card_memory() 72 bus_space_read_2(bst, bsh, ofs + i4) == 0x4444 && in ae_size_card_memory() [all …]
|
| /netbsd-src/sys/ufs/chfs/ |
| H A D | chfs_readinode.c | 85 return (tdi1->tmpnode->node->ofs - tdi2->tmpnode->node->ofs); in tmp_node_compare_nodes() 92 uint64_t ofs = *(const uint64_t *)key; in tmp_node_compare_key() local 94 return (tdi->tmpnode->node->ofs - ofs); in tmp_node_compare_key() 112 return (frag1->ofs - frag2->ofs); in frag_compare_nodes() 119 uint64_t ofs = *(const uint64_t *)key; in frag_compare_key() local 121 return (frag->ofs - ofs); in frag_compare_key() 147 uint64_t ofs; in chfs_check_td_data() local 154 ofs = CHFS_GET_OFS(nref->nref_offset) + sizeof(struct chfs_flash_data_node); in chfs_check_td_data() 161 err = chfs_read_leb(chmp, nref->nref_lnr, buf, ofs, len, &retlen); in chfs_check_td_data() 323 uint64_t end_ofs = newtd->node->ofs + newtd->node->size; in chfs_add_tmp_dnode_to_tree() [all …]
|
| H A D | chfs_scan.c | 103 struct chfs_eraseblock *cheb, void *buf, off_t ofs) in chfs_scan_check_vnode() argument 142 nref->nref_offset = ofs; in chfs_scan_check_vnode() 279 struct chfs_eraseblock *cheb, void *buf, off_t ofs) in chfs_scan_check_dirent_node() argument 333 fd->nref->nref_offset = ofs; in chfs_scan_check_dirent_node() 352 struct chfs_eraseblock *cheb, void *buf, off_t ofs) in chfs_scan_check_data_node() argument 377 nref->nref_offset = CHFS_GET_OFS(ofs) | CHFS_UNCHECKED_NODE_MASK; in chfs_scan_check_data_node() 433 off_t ofs = 0; in chfs_scan_eraseblock() local 444 while((ofs + CHFS_NODE_HDR_SIZE) < chmp->chm_ebh->eb_size) { in chfs_scan_eraseblock() 447 lnr, buf, ofs, CHFS_NODE_HDR_SIZE, &retlen); in chfs_scan_eraseblock() 469 ofs += CHFS_NODE_HDR_SIZE; in chfs_scan_eraseblock() [all …]
|
| H A D | ebh.c | 147 off_t ofs = pebnr * ebh->flash_if->erasesize; in nor_read_eb_hdr() local 152 ofs, CHFS_EB_EC_HDR_SIZE, in nor_read_eb_hdr() 158 ofs += CHFS_EB_EC_HDR_SIZE; in nor_read_eb_hdr() 160 ofs, CHFS_EB_HDR_NOR_SIZE, in nor_read_eb_hdr() 185 off_t ofs; in nand_read_eb_hdr() local 190 ofs = pebnr * ebh->flash_if->erasesize; in nand_read_eb_hdr() 192 ofs, CHFS_EB_EC_HDR_SIZE, &retlen, in nand_read_eb_hdr() 198 ofs += ebh->flash_if->page_size; in nand_read_eb_hdr() 200 ofs, CHFS_EB_HDR_NAND_SIZE, &retlen, in nand_read_eb_hdr() 224 off_t ofs in nor_write_eb_hdr() local 261 flash_off_t ofs; nand_write_eb_hdr() local 439 off_t ofs; nor_mark_eb_hdr_dirty_flash() local 472 off_t ofs; nor_invalidate_eb_hdr() local 508 off_t ofs; mark_eb_hdr_free() local 933 off_t ofs; free_peb() local [all...] |
| /netbsd-src/sys/arch/i386/pci/ |
| H A D | opti82c700.c | 131 opti82c700_addr(int link, int *addrofs, int *ofs) in opti82c700_addr() argument 146 *ofs = (regofs & 3) << 3; in opti82c700_addr() 155 *ofs = regofs << 2; in opti82c700_addr() 199 int val, addrofs, ofs; in opti82c700_get_intr() local 201 if (opti82c700_addr(clink, &addrofs, &ofs)) in opti82c700_get_intr() 205 val = (reg >> ofs) & FIRESTAR_CFG_PIRQ_MASK; in opti82c700_get_intr() 217 int addrofs, ofs; in opti82c700_set_intr() local 223 if (opti82c700_addr(clink, &addrofs, &ofs)) in opti82c700_set_intr() 227 reg &= ~(FIRESTAR_CFG_PIRQ_MASK << ofs); in opti82c700_set_intr() 228 reg |= (irq << ofs); in opti82c700_set_intr() [all …]
|
| /netbsd-src/external/bsd/nsd/dist/compat/ |
| H A D | b64_pton.c | 174 uint8_t ofs; in b64_pton_do() local 182 ofs = b64rmap[ch]; in b64_pton_do() 184 if (ofs >= b64rmap_special) { in b64_pton_do() 186 if (ofs == b64rmap_space) in b64_pton_do() 189 if (ofs == b64rmap_end) in b64_pton_do() 199 target[tarindex] = ofs << 2; in b64_pton_do() 205 target[tarindex] |= ofs >> 4; in b64_pton_do() 206 target[tarindex+1] = (ofs & 0x0f) in b64_pton_do() 214 target[tarindex] |= ofs >> 2; in b64_pton_do() 215 target[tarindex+1] = (ofs & 0x03) in b64_pton_do() [all …]
|
| /netbsd-src/usr.bin/mkcsmapper/ |
| H A D | yacc.y | 221 put8(void *ptr, size_t ofs, u_int32_t val) in put8() argument 223 *((u_int8_t *)ptr + ofs) = val; in put8() 227 put16(void *ptr, size_t ofs, u_int32_t val) in put16() argument 230 memcpy((u_int16_t *)ptr + ofs, &oval, 2); in put16() 234 put32(void *ptr, size_t ofs, u_int32_t val) in put32() argument 237 memcpy((u_int32_t *)ptr + ofs, &oval, 4); in put32() 301 size_t ofs, i, len; in create_rowcol_info() local 303 ofs = 0; in create_rowcol_info() 307 put32(ptr, ofs, rowcol_bits); ofs++; in create_rowcol_info() 308 put32(ptr, ofs, dst_invalid); ofs++; in create_rowcol_info() [all …]
|
| /netbsd-src/sys/dev/ic/ |
| H A D | bwivar.h | 801 #define MOBJ_WRITE_2(mac, objid, ofs, val) \ 802 bwi_memobj_write_2((mac), (objid), (ofs), (val)) 803 #define MOBJ_WRITE_4(mac, objid, ofs, val) \ 804 bwi_memobj_write_4((mac), (objid), (ofs), (val)) 805 #define MOBJ_READ_2(mac, objid, ofs) \ 806 bwi_memobj_read_2((mac), (objid), (ofs)) 807 #define MOBJ_READ_4(mac, objid, ofs) \ 808 bwi_memobj_read_4((mac), (objid), (ofs)) 810 #define MOBJ_SETBITS_4(mac, objid, ofs, bits) \ 811 MOBJ_WRITE_4((mac), (objid), (ofs), \ 679 MOBJ_WRITE_2(mac,objid,ofs,val) global() argument 681 MOBJ_WRITE_4(mac,objid,ofs,val) global() argument 683 MOBJ_READ_2(mac,objid,ofs) global() argument 685 MOBJ_READ_4(mac,objid,ofs) global() argument 688 MOBJ_SETBITS_4(mac,objid,ofs,bits) global() argument 691 MOBJ_CLRBITS_4(mac,objid,ofs,bits) global() argument 695 MOBJ_FILT_SETBITS_2(mac,objid,ofs,filt,bits) global() argument 699 TMPLT_WRITE_4(mac,ofs,val) global() argument 777 RF_WRITE(mac,ofs,val) global() argument 778 RF_READ(mac,ofs) global() argument 780 RF_SETBITS(mac,ofs,bits) global() argument 782 RF_CLRBITS(mac,ofs,bits) global() argument 784 RF_FILT_SETBITS(mac,ofs,filt,bits) global() argument [all...] |
| H A D | rtwreg.h | 970 #define RTW_READ8(regs, ofs) \ argument 971 bus_space_read_1((regs)->r_bt, (regs)->r_bh, (ofs)) 973 #define RTW_READ16(regs, ofs) \ argument 974 bus_space_read_2((regs)->r_bt, (regs)->r_bh, (ofs)) 976 #define RTW_READ(regs, ofs) \ argument 977 bus_space_read_4((regs)->r_bt, (regs)->r_bh, (ofs)) 979 #define RTW_WRITE8(regs, ofs, val) \ argument 980 bus_space_write_1((regs)->r_bt, (regs)->r_bh, (ofs), (val)) 982 #define RTW_WRITE16(regs, ofs, val) \ argument 983 bus_space_write_2((regs)->r_bt, (regs)->r_bh, (ofs), (val)) [all …]
|
| /netbsd-src/sys/arch/hpc/stand/hpcboot/ |
| H A D | file_fat.cpp | 86 FatFile::read(void *buf, size_t bytes, off_t ofs) in read() argument 90 if (ofs != -1) in read() 91 SetFilePointer(_handle, ofs, 0, FILE_BEGIN); in read() 98 FatFile::write(const void *buf, size_t bytes, off_t ofs) in write() argument 102 if (ofs != -1) in write() 103 SetFilePointer(_handle, ofs, 0, FILE_BEGIN); in write() 110 FatFile::seek(off_t ofs) in seek() argument 113 SetFilePointer(_handle, ofs, 0, FILE_BEGIN); in seek()
|
| H A D | file_ufs.cpp | 111 UfsFile::read(void *buf, size_t bytes, off_t ofs) in read() argument 115 if (ofs != -1) in read() 116 ufs_seek(_f, ofs, SEEK_SET); in read() 123 UfsFile::write(const void *buf, size_t bytes, off_t ofs) in write() argument 127 if (ofs != -1) in write() 128 ufs_seek(_f, ofs, SEEK_SET); in write() 135 UfsFile::seek(off_t ofs) in seek() argument 137 ufs_seek(_f, ofs, SEEK_SET); in seek()
|
| H A D | file_http.cpp | 222 HttpFile::_read_from_cache(void *buf, size_t bytes, off_t ofs) in _read_from_cache() argument 226 if (ofs >= _buffer_size) in _read_from_cache() 229 transfer = ofs + bytes > _buffer_size ? _buffer_size - ofs : bytes; in _read_from_cache() 231 memcpy(buf, &_buffer[ofs], transfer); in _read_from_cache() 248 off_t ofs; in read() local 251 ofs = offset; in read() 253 ofs = _cur_pos; in read() 258 return _read_from_cache(buf, bytes, ofs); in read() 286 return _read_from_cache(buf, bytes, ofs); in read() 288 int i, n = ofs / bytes; in read() [all …]
|
| /netbsd-src/sys/dev/pci/ |
| H A D | pci.c | 530 unsigned int ofs; in pci_get_capability() local 541 ofs = PCI_CAPLISTPTR_REG; in pci_get_capability() 544 ofs = PCI_CARDBUS_CAPLISTPTR_REG; in pci_get_capability() 550 ofs = PCI_CAPLIST_PTR(pci_conf_read(pc, tag, ofs)); in pci_get_capability() 551 while (ofs != 0) { in pci_get_capability() 552 if ((ofs & 3) || (ofs < 0x40)) { in pci_get_capability() 561 reg = pci_conf_read(pc, tag, ofs); in pci_get_capability() 564 *offset = ofs; in pci_get_capability() 569 ofs = PCI_CAPLIST_NEXT(reg); in pci_get_capability() 580 unsigned int ofs; in pci_get_ht_capability() local [all …]
|
| /netbsd-src/sys/fs/v7fs/ |
| H A D | v7fs_inode.c | 223 v7fs_daddr_t blk, ofs; in v7fs_inode_load() local 227 if (v7fs_inode_inquire_disk_location(fs, n, &blk, &ofs) != 0) in v7fs_inode_load() 239 v7fs_inode_setup_memory_image(fs, p, di + ofs); in v7fs_inode_load() 254 v7fs_daddr_t ofs; in v7fs_inode_writeback() local 258 if (v7fs_inode_inquire_disk_location(fs, ino, &blk, &ofs) != 0) in v7fs_inode_writeback() 269 di[ofs] = disk; /* structure copy; */ in v7fs_inode_writeback() 284 v7fs_daddr_t ofs, blk; in v7fs_inode_inquire_disk_location() local 288 ofs = (n - 1/*inode start from 1*/) * in v7fs_inode_inquire_disk_location() 290 blk = ofs >> V7FS_BSHIFT; in v7fs_inode_inquire_disk_location() 293 *offset = (ofs in v7fs_inode_inquire_disk_location() [all...] |
| /netbsd-src/sys/arch/hpcmips/tx/ |
| H A D | txcom.c | 310 int slot, ofs; in txcom_reset() local 315 ofs = TX39_UARTCTRL1_REG(slot); in txcom_reset() 323 tx_conf_write(tc, ofs, 0); in txcom_reset() 331 int slot, ofs, timeout; in txcom_enable() local 335 ofs = TX39_UARTCTRL1_REG(slot); in txcom_enable() 355 reg = tx_conf_read(tc, ofs); in txcom_enable() 357 tx_conf_write(tc, ofs, reg); in txcom_enable() 360 reg = tx_conf_read(tc, ofs); in txcom_enable() 363 tx_conf_write(tc, ofs, reg); in txcom_enable() 367 while(!(tx_conf_read(tc, ofs) in txcom_enable() 408 int ofs = TX39_UARTCTRL1_REG(chip->sc_slot); __txcom_txbufready() local 424 int ofs; txcom_pulse_mode() local 445 int ofs, c, s; txcom_cngetc() local 495 int ofs = TX39_UARTCTRL1_REG(chip->sc_slot); txcom_setmode() local 538 int ofs = TX39_UARTCTRL1_REG(chip->sc_slot); txcom_setbaudrate() local [all...] |
| H A D | tx39icu.c | 352 int ofs; in TX_INTR() local 357 ofs = TX39_INTRSTATUS_REG(i); in TX_INTR() 361 tx_conf_write(tc, ofs, reg); in TX_INTR() 442 int i, pri, ofs, set; in tx39_irqhigh_intr() local 466 ofs = TX39_INTRSTATUS_REG(set); in tx39_irqhigh_intr() 468 tx_conf_write(tc, ofs, he_mask); in tx39_irqhigh_intr() 554 int bit, set, highpri, ofs; in tx_intr_establish() local 572 ofs = TX39_INTRENABLE_REG(set); in tx_intr_establish() 573 reg = tx_conf_read(tc, ofs); in tx_intr_establish() 575 tx_conf_write(tc, ofs, reg); in tx_intr_establish() [all …]
|
| /netbsd-src/lib/libc/citrus/ |
| H A D | citrus_db_factory.c | 267 size_t i, ofs, keyofs, dataofs, nextofs; in _citrus_db_factory_serialize() local 270 ofs = 0; in _citrus_db_factory_serialize() 273 dump_header(r, magic, &ofs, 0); in _citrus_db_factory_serialize() 313 dump_header(r, magic, &ofs, df->df_num_entries); in _citrus_db_factory_serialize() 324 put32(r, &ofs, de->de_hashvalue); in _citrus_db_factory_serialize() 325 put32(r, &ofs, nextofs); in _citrus_db_factory_serialize() 326 put32(r, &ofs, keyofs); in _citrus_db_factory_serialize() 327 put32(r, &ofs, _region_size(&de->de_key)); in _citrus_db_factory_serialize() 328 put32(r, &ofs, dataofs); in _citrus_db_factory_serialize() 329 put32(r, &ofs, _region_size(&de->de_data)); in _citrus_db_factory_serialize() [all …]
|
| H A D | citrus_region.h | 64 _citrus_region_check(const struct _citrus_region *r, size_t ofs, size_t sz) in _citrus_region_check() argument 66 return r->r_size >= ofs + sz ? 0 : -1; in _citrus_region_check() 100 size_t ofs, size_t sz) in _citrus_region_get_subregion() argument 102 if (_citrus_region_check(r, ofs, sz)) in _citrus_region_get_subregion() 104 _citrus_region_init(subr, _citrus_region_offset(r, ofs), sz); in _citrus_region_get_subregion()
|
| /netbsd-src/sys/external/bsd/drm/dist/shared-core/ |
| H A D | sis_ds.c | 161 memHeap_t *mmInit(int ofs, int size) in mmInit() argument 170 blocks->ofs = ofs; in mmInit() 203 if (startofs > p->ofs) { in SliceBlock() 206 newblock->ofs = startofs; in SliceBlock() 207 newblock->size = p->size - (startofs - p->ofs); in SliceBlock() 219 newblock->ofs = startofs + size; in SliceBlock() 247 startofs = (p->ofs + mask) & ~mask; in mmAllocMem() 252 if (endofs <= (p->ofs + p->size)) in mmAllocMem()
|
| /netbsd-src/sys/arch/hppa/hppa/ |
| H A D | db_disasm.c | 428 #define wdalign(ofs) (ofs &= ~3) argument 1303 addDasm(const struct inst *i, OFS ofs, union insn w) in addDasm() argument 1312 unitDasm(const struct inst *i, OFS ofs, union insn w) in unitDasm() argument 1324 iaDasm(const struct inst *i, OFS ofs, union insn w) in iaDasm() argument 1337 shdDasm(const struct inst *i, OFS ofs, union insn w) in shdDasm() argument 1350 extrDasm(const struct inst *i, OFS ofs, union insn w) in extrDasm() argument 1360 vextrDasm(const struct inst *i, OFS ofs, union insn w) in vextrDasm() argument 1370 depDasm(const struct inst *i, OFS ofs, union insn w) in depDasm() argument 1380 vdepDasm(const struct inst *i, OFS ofs, union insn w) in vdepDasm() argument 1390 depiDasm(const struct inst *i, OFS ofs, union insn w) in depiDasm() argument [all …]
|
| /netbsd-src/external/mpl/dhcp/dist/common/ |
| H A D | inet.c | 372 int ofs, val; in range2cidr() local 437 ofs = addr.len - (bit / 8) - 1; in range2cidr() 439 if (ofs >= 0) { in range2cidr() 440 mask.iabuf[ofs] |= val; in range2cidr() 447 if ((ofs < 0) || in range2cidr() 472 tmp = addr.iabuf[ofs] + val; in range2cidr() 473 while ((ofs >= 0) && (tmp > 255)) { in range2cidr() 474 addr.iabuf[ofs] = tmp - 256; in range2cidr() 475 ofs--; in range2cidr() 476 tmp = addr.iabuf[ofs] + 1; in range2cidr() [all …]
|
| /netbsd-src/sbin/gpt/ |
| H A D | migrate.c | 176 off_t ofs, rawofs; in migrate_disklabel() local 199 ofs = le32toh(dl->d_partitions[i].p_offset) * in migrate_disklabel() 201 if (ofs < rawofs) in migrate_disklabel() 221 ofs = (le32toh(dl->d_partitions[i].p_offset) * in migrate_disklabel() 223 ofs = (ofs > 0) ? ofs - rawofs : 0; in migrate_disklabel() 224 ent->ent_lba_start = htole64((uint64_t)ofs); in migrate_disklabel() 225 ent->ent_lba_end = htole64((uint64_t)(ofs + in migrate_disklabel()
|
| /netbsd-src/sys/arch/mac68k/nubus/ |
| H A D | nubus.c | 334 u_long ofs, hdr; in nubus_probe_slot() local 354 ofs = NBMEMSIZE; in nubus_probe_slot() 358 ofs--; in nubus_probe_slot() 360 if (!mac68k_bus_space_probe(bst, bsh, ofs, 1)) { in nubus_probe_slot() 364 if (bus_space_read_1(bst, bsh, ofs) == in nubus_probe_slot() 539 u_long ofs) in nubus_read_1() argument 541 return bus_space_read_1(bst, bsh, ofs); in nubus_read_1() 548 u_long ofs) in nubus_read_2() argument 552 s = (nubus_read_1(bst, bsh, lanes, ofs) << 8); in nubus_read_2() 553 ofs = nubus_adjust_ptr(lanes, ofs, 1); in nubus_read_2() [all …]
|
| /netbsd-src/external/gpl3/gcc/dist/gcc/config/alpha/ |
| H A D | alpha.cc | 881 rtx ofs = XEXP (x, 1); in alpha_legitimate_address_p() local 894 && CONST_INT_P (ofs)) in alpha_legitimate_address_p() 899 && CONSTANT_ADDRESS_P (ofs)) in alpha_legitimate_address_p() 915 rtx ofs = XEXP (x, 1); in alpha_legitimate_address_p() local 932 if (local_symbolic_operand (ofs, Pmode) in alpha_legitimate_address_p() 933 || dtp32_symbolic_operand (ofs, Pmode) in alpha_legitimate_address_p() 934 || tp32_symbolic_operand (ofs, Pmode)) in alpha_legitimate_address_p() 1596 get_unaligned_offset (rtx addr, HOST_WIDE_INT ofs) in get_unaligned_offset() argument 1600 ofs += INTVAL (XEXP (addr, 1)); in get_unaligned_offset() 1604 return expand_simple_binop (Pmode, PLUS, addr, GEN_INT (ofs & 7), in get_unaligned_offset() [all …]
|
| /netbsd-src/external/gpl3/gcc.old/dist/gcc/config/alpha/ |
| H A D | alpha.c | 881 rtx ofs = XEXP (x, 1); in alpha_legitimate_address_p() local 894 && CONST_INT_P (ofs)) in alpha_legitimate_address_p() 899 && CONSTANT_ADDRESS_P (ofs)) in alpha_legitimate_address_p() 915 rtx ofs = XEXP (x, 1); in alpha_legitimate_address_p() local 932 if (local_symbolic_operand (ofs, Pmode) in alpha_legitimate_address_p() 933 || dtp32_symbolic_operand (ofs, Pmode) in alpha_legitimate_address_p() 934 || tp32_symbolic_operand (ofs, Pmode)) in alpha_legitimate_address_p() 1596 get_unaligned_offset (rtx addr, HOST_WIDE_INT ofs) in get_unaligned_offset() argument 1600 ofs += INTVAL (XEXP (addr, 1)); in get_unaligned_offset() 1604 return expand_simple_binop (Pmode, PLUS, addr, GEN_INT (ofs & 7), in get_unaligned_offset() [all …]
|