/openbmc/qemu/crypto/ |
H A D | cipher-gnutls.c.inc | 69 size_t blocksize; 96 if (len % ctx->blocksize) { 98 len, ctx->blocksize); 112 g_autofree unsigned char *iv = g_new0(unsigned char, ctx->blocksize); 123 gnutls_cipher_set_iv(handle, iv, ctx->blocksize); 126 in, ctx->blocksize, 127 out, ctx->blocksize); 136 len -= ctx->blocksize; 137 in += ctx->blocksize; 138 out += ctx->blocksize; [all …]
|
H A D | cipher-gcrypt.c.inc | 115 size_t blocksize; 133 if (len & (ctx->blocksize - 1)) { 135 len, ctx->blocksize); 155 if (len & (ctx->blocksize - 1)) { 157 len, ctx->blocksize); 178 if (niv != ctx->blocksize) { 180 ctx->blocksize, niv); 201 if (niv != ctx->blocksize) { 203 ctx->blocksize, niv); 275 ctx->blocksize = gcry_cipher_get_algo_blklen(gcryalg);
|
/openbmc/entity-manager/test/ |
H A D | test_fru-utils.cpp | 15 static constexpr size_t blockSize = I2C_SMBUS_BLOCK_MAX; variable 171 data.reserve(blockSize * 2); in TEST() 172 for (size_t i = 0; i < blockSize * 2; i++) in TEST() 176 std::array<uint8_t, blockSize * 2> rdbuf{}; in TEST() 185 for (size_t i = 0; i < blockSize * 2; i++) in TEST() 190 EXPECT_EQ(reader.read(blockSize - 1, 2, rdbuf.data()), 2); in TEST() 191 EXPECT_EQ(rdbuf[0], blockSize - 1); in TEST() 192 EXPECT_EQ(rdbuf[1], blockSize); in TEST() 209 data.resize(blockSize / 2); in TEST() 210 std::array<uint8_t, blockSize> blockData{}; in TEST() [all …]
|
/openbmc/linux/fs/hfsplus/ |
H A D | wrapper.c | 166 u32 blocksize; in hfsplus_read_wrapper() local 170 blocksize = sb_min_blocksize(sb, HFSPLUS_SECTOR_SIZE); in hfsplus_read_wrapper() 171 if (!blocksize) in hfsplus_read_wrapper() 174 sbi->min_io_size = blocksize; in hfsplus_read_wrapper() 232 blocksize = be32_to_cpu(sbi->s_vhdr->blocksize); in hfsplus_read_wrapper() 237 if (blocksize < HFSPLUS_SECTOR_SIZE || ((blocksize - 1) & blocksize)) in hfsplus_read_wrapper() 239 sbi->alloc_blksz = blocksize; in hfsplus_read_wrapper() 240 sbi->alloc_blksz_shift = ilog2(blocksize); in hfsplus_read_wrapper() 241 blocksize = min_t(u32, sbi->alloc_blksz, PAGE_SIZE); in hfsplus_read_wrapper() 246 while (part_start & ((blocksize >> HFSPLUS_SECTOR_SHIFT) - 1)) in hfsplus_read_wrapper() [all …]
|
/openbmc/linux/fs/nilfs2/ |
H A D | the_nilfs.c | 199 * @blocksize: place to store block size 202 * exponent information written in @sbp and stores it in @blocksize, 209 struct nilfs_super_block *sbp, int *blocksize) in nilfs_get_blocksize() argument 215 nilfs_err(sb, "too large filesystem blocksize: 2 ^ %u KiB", in nilfs_get_blocksize() 219 *blocksize = BLOCK_SIZE << shift_bits; in nilfs_get_blocksize() 255 int blocksize; in load_nilfs() local 276 err = nilfs_get_blocksize(sb, sbp[0], &blocksize); in load_nilfs() 280 if (blocksize != nilfs->ns_blocksize) { in load_nilfs() 282 "blocksize differs between two super blocks (%d != %d)", in load_nilfs() 283 blocksize, nilfs->ns_blocksize); in load_nilfs() [all …]
|
/openbmc/u-boot/fs/ext4/ |
H A D | ext4fs.c | 56 int blocksize = (1 << (log2_fs_blocksize + log2blksz)); in ext4fs_read_file() local 66 if (blocksize <= 0) in ext4fs_read_file() 73 blockcnt = lldiv(((len + pos) + blocksize - 1), blocksize); in ext4fs_read_file() 75 for (i = lldiv(pos, blocksize); i < blockcnt; i++) { in ext4fs_read_file() 77 int blockoff = pos - (blocksize * i); in ext4fs_read_file() 78 int blockend = blocksize; in ext4fs_read_file() 88 blockend = (len + pos) - (blocksize * i); in ext4fs_read_file() 90 /* The last portion is exactly blocksize. */ in ext4fs_read_file() 92 blockend = blocksize; in ext4fs_read_file() 96 if (i == lldiv(pos, blocksize)) { in ext4fs_read_file() [all …]
|
/openbmc/linux/block/partitions/ |
H A D | ibm.c | 67 int blocksize, in find_label() argument 93 testsect[0] = info->label_block * (blocksize >> 9); in find_label() 97 testsect[1] = (blocksize >> 9); in find_label() 98 testsect[2] = 2 * (blocksize >> 9); in find_label() 135 int blocksize, in find_vol1_partitions() argument 154 secperblk = blocksize >> 9; in find_vol1_partitions() 197 int blocksize, in find_lnx1_partitions() argument 210 secperblk = blocksize >> 9; in find_lnx1_partitions() 244 int blocksize, in find_cms1_partitions() argument 256 blocksize = label->cms.block_size; in find_cms1_partitions() [all …]
|
/openbmc/u-boot/cmd/ |
H A D | onenand.c | 66 int blocksize = (1 << this->erase_shift); in onenand_block_read() local 74 ops.ooblen = blocksize; in onenand_block_read() 76 ops.len = blocksize; in onenand_block_read() 83 ofs += blocksize; in onenand_block_read() 96 ofs += blocksize; in onenand_block_read() 99 ofs += blocksize; in onenand_block_read() 100 buf += blocksize; in onenand_block_read() 137 int blocksize = (1 << this->erase_shift); in onenand_block_write() local 162 skip_ofs += blocksize; in onenand_block_write() 167 ret = mtd_write(mtd, ofs, blocksize, &_retlen, buf); in onenand_block_write() [all …]
|
/openbmc/linux/sound/pci/emu10k1/ |
H A D | emu10k1_patch.c | 30 int truesize, size, blocksize; in snd_emu10k1_sample_new() local 76 blocksize = truesize; in snd_emu10k1_sample_new() 78 blocksize *= 2; in snd_emu10k1_sample_new() 79 sp->block = snd_emu10k1_synth_alloc(emu, blocksize); in snd_emu10k1_sample_new() 82 "synth malloc failed (size=%d)\n", blocksize); in snd_emu10k1_sample_new() 87 sp->v.truesize = blocksize; in snd_emu10k1_sample_new() 94 if (offset + size > blocksize) in snd_emu10k1_sample_new() 103 if (offset + size > blocksize) in snd_emu10k1_sample_new() 121 if (offset + loopsize * 2 > blocksize) in snd_emu10k1_sample_new() 127 if (offset + loopsize > blocksize) in snd_emu10k1_sample_new() [all …]
|
/openbmc/linux/include/crypto/ |
H A D | ctr.h | 25 int blocksize = crypto_skcipher_chunksize(tfm); in crypto_ctr_encrypt_walk() local 30 /* avoid integer division due to variable blocksize parameter */ in crypto_ctr_encrypt_walk() 31 if (WARN_ON_ONCE(!is_power_of_2(blocksize))) in crypto_ctr_encrypt_walk() 43 tail = walk.nbytes & (blocksize - 1); in crypto_ctr_encrypt_walk() 48 int bsize = min(nbytes, blocksize); in crypto_ctr_encrypt_walk() 53 crypto_inc(walk.iv, blocksize); in crypto_ctr_encrypt_walk()
|
/openbmc/phosphor-mboxd/vpnor/ |
H A D | pnor_partition_table.cpp | 27 blockSize(1 << ctx->erase_size_shift), pnorSize(ctx->flash_size) in Table() 42 table.data.block_size = blockSize; in prepareHeader() 43 table.data.block_count = pnorSize / blockSize; in prepareHeader() 102 parseTocLine(line, blockSize, part); in preparePartitions() 140 const size_t size = part.data.size * blockSize; in preparePartitions() 152 size_t blockOffset = offset / blockSize; in partition() 168 throw UnmappedOffset(offset, part.data.base * blockSize); in partition() 235 size_t blockSize) in writeSizes() argument 238 part.data.base = align_up(start, blockSize) / blockSize; in writeSizes() 239 size_t sizeInBlocks = align_up(size, blockSize) / blockSize; in writeSizes() [all …]
|
/openbmc/estoraged/src/erase/ |
H A D | zero.cpp | 26 const std::array<const std::byte, blockSize> blockOfZeros{}; in writeZero() 30 uint32_t writeSize = currentIndex + blockSize < driveSize in writeZero() 31 ? blockSize in writeZero() 75 std::array<std::byte, blockSize> readArr{}; in verifyZero() 76 const std::array<const std::byte, blockSize> blockOfZeros{}; in verifyZero() 80 uint32_t readSize = currentIndex + blockSize < driveSize in verifyZero() 81 ? blockSize in verifyZero()
|
H A D | pattern.cpp | 35 std::array<std::byte, blockSize> randArr{}; in writePattern() 47 size_t writeSize = currentIndex + blockSize < driveSize in writePattern() 48 ? blockSize in writePattern() 83 std::array<std::byte, blockSize> randArr{}; in verifyPattern() 84 std::array<std::byte, blockSize> readArr{}; in verifyPattern() 88 size_t readSize = currentIndex + blockSize < driveSize in verifyPattern() 89 ? blockSize in verifyPattern()
|
/openbmc/linux/fs/affs/ |
H A D | super.c | 191 int *blocksize, char **prefix, char *volume, unsigned long *mount_opts) in parse_options() argument 202 *blocksize = -1; in parse_options() 221 pr_warn("Invalid blocksize (512, 1024, 2048, 4096 allowed)\n"); in parse_options() 224 *blocksize = n; in parse_options() 340 int size, blocksize; in affs_fill_super() local 374 &blocksize,&sbi->s_prefix, in affs_fill_super() 393 pr_debug("initial blocksize=%d, #blocks=%d\n", 512, size); in affs_fill_super() 400 if (blocksize > 0) { in affs_fill_super() 401 i = j = blocksize; in affs_fill_super() 402 size = size / (blocksize / 512); in affs_fill_super() [all …]
|
/openbmc/hiomapd/vpnor/ |
H A D | table.cpp | 35 blockSize(1 << be->erase_size_shift), pnorSize(be->flash_size) in Table() 50 table.data.block_size = blockSize; in prepareHeader() 51 table.data.block_count = pnorSize / blockSize; in prepareHeader() 115 parseTocLine(line, blockSize, part); in preparePartitions() 157 const size_t size = part.data.size * blockSize; in preparePartitions() 169 size_t blockOffset = offset / blockSize; in partition() 185 throw UnmappedOffset(offset, part.data.base * blockSize); in partition() 252 size_t blockSize) in writeSizes() argument 255 part.data.base = align_up(start, blockSize) / blockSize; in writeSizes() 256 size_t sizeInBlocks = align_up(size, blockSize) / blockSize; in writeSizes() [all …]
|
/openbmc/linux/drivers/mtd/parsers/ |
H A D | bcm47xxpart.c | 95 uint32_t blocksize = master->erasesize; in bcm47xxpart_parse() local 105 if (blocksize < 0x1000) in bcm47xxpart_parse() 106 blocksize = 0x1000; in bcm47xxpart_parse() 121 for (offset = 0; offset <= master->size - blocksize; in bcm47xxpart_parse() 122 offset += blocksize) { in bcm47xxpart_parse() 206 trx_size = max(trx->length, last_subpart + blocksize); in bcm47xxpart_parse() 212 offset += roundup(trx_size, blocksize) - blocksize; in bcm47xxpart_parse() 228 if (offset != master->size - blocksize && in bcm47xxpart_parse() 236 err = mtd_read(master, offset + (blocksize / 2), 0x4, &bytes_read, in bcm47xxpart_parse() 240 offset + (blocksize / 2), err); in bcm47xxpart_parse() [all …]
|
/openbmc/u-boot/drivers/mmc/ |
H A D | sh_sdhi.c | 272 unsigned short blocksize, i; in sh_sdhi_single_read() local 294 blocksize = sh_sdhi_readw(host, SDHI_SIZE); in sh_sdhi_single_read() 296 for (i = 0; i < blocksize / 8; i++) in sh_sdhi_single_read() 299 for (i = 0; i < blocksize / 2; i++) in sh_sdhi_single_read() 313 unsigned short blocksize, i, sec; in sh_sdhi_multi_read() local 323 debug("%s: blocks = %d, blocksize = %d\n", in sh_sdhi_multi_read() 324 __func__, data->blocks, data->blocksize); in sh_sdhi_multi_read() 337 blocksize = sh_sdhi_readw(host, SDHI_SIZE); in sh_sdhi_multi_read() 339 for (i = 0; i < blocksize / 8; i++) in sh_sdhi_multi_read() 342 for (i = 0; i < blocksize / 2; i++) in sh_sdhi_multi_read() [all …]
|
/openbmc/u-boot/drivers/fpga/ |
H A D | zynqpl.c | 337 size_t bsize, u32 blocksize, u32 *swap, in zynq_validate_bitstream() argument 343 buf_start = check_data((u8 *)buf, blocksize, swap); in zynq_validate_bitstream() 375 * send bsize inplace of blocksize as it was not a bitstream in zynq_load() 421 loff_t blocksize, actread; in zynq_loadfs() local 426 blocksize = fsinfo->blocksize; in zynq_loadfs() 435 if (fs_read(filename, (u32) buf, pos, blocksize, &actread) < 0) in zynq_loadfs() 438 if (zynq_validate_bitstream(desc, buf, bsize, blocksize, &swap, in zynq_loadfs() 445 buf = zynq_align_dma_buffer((u32 *)buf, blocksize, swap); in zynq_loadfs() 447 if (zynq_dma_transfer((u32)buf | 1, blocksize >> 2, in zynq_loadfs() 451 bsize -= blocksize; in zynq_loadfs() [all …]
|
/openbmc/linux/drivers/crypto/qce/ |
H A D | sha.c | 193 unsigned int blocksize; in qce_ahash_update() local 195 blocksize = crypto_tfm_alg_blocksize(crypto_ahash_tfm(tfm)); in qce_ahash_update() 201 if (total <= blocksize) { in qce_ahash_update() 220 hash_later = total % blocksize; in qce_ahash_update() 238 hash_later = blocksize; in qce_ahash_update() 246 /* here nbytes is multiple of blocksize */ in qce_ahash_update() 337 unsigned int blocksize; in qce_ahash_hmac_setkey() local 343 blocksize = crypto_tfm_alg_blocksize(crypto_ahash_tfm(tfm)); in qce_ahash_hmac_setkey() 346 if (keylen <= blocksize) { in qce_ahash_hmac_setkey() 408 unsigned int blocksize; member [all …]
|
/openbmc/linux/drivers/gpu/drm/vmwgfx/ |
H A D | vmw_surface_cache.h | 75 desc->blockSize.width); in vmw_surface_get_size_in_blocks() 77 desc->blockSize.height); in vmw_surface_get_size_in_blocks() 79 desc->blockSize.depth); in vmw_surface_get_size_in_blocks() 197 const u32 bw = desc->blockSize.width, bh = desc->blockSize.height; in vmw_surface_get_pixel_offset() 198 const u32 bd = desc->blockSize.depth; in vmw_surface_get_pixel_offset() 400 desc->blockSize.width) * in vmw_surface_setup_cache() 407 desc->blockSize.height) * in vmw_surface_setup_cache() 456 loc->z *= desc->blockSize.depth; in vmw_surface_get_loc() 459 loc->y *= desc->blockSize.height; in vmw_surface_get_loc() 461 loc->x *= desc->blockSize.width; in vmw_surface_get_loc() [all …]
|
/openbmc/u-boot/env/ |
H A D | nand.c | 128 size_t blocksize, len; in writeenv() local 136 blocksize = mtd->erasesize; in writeenv() 137 len = min(blocksize, (size_t)CONFIG_ENV_SIZE); in writeenv() 141 offset += blocksize; in writeenv() 147 offset += blocksize; in writeenv() 249 size_t blocksize, len; in readenv() local 257 blocksize = mtd->erasesize; in readenv() 258 len = min(blocksize, (size_t)CONFIG_ENV_SIZE); in readenv() 262 offset += blocksize; in readenv() 270 offset += blocksize; in readenv()
|
/openbmc/linux/fs/ocfs2/ |
H A D | ocfs2_fs.h | 28 * blocksize of 2K, it is 4096 bytes into disk. 40 * Blocks cannot be bigger than clusters, so the maximum blocksize is the 412 on the blocksize. OCFS2's maximum 413 blocksize, 4K, requires 16 parity bits, 533 * 255 * sizeof(__le16) == 512B, within the 512B block minimum blocksize. 599 __le32 s_blocksize_bits; /* Blocksize for this fs */ 624 * our smallest blocksize, which is 512 bytes. To ensure this, 626 * will not be available on the smallest blocksize. 1229 static inline struct ocfs2_disk_dqtrailer *ocfs2_block_dqtrailer(int blocksize, in ocfs2_block_dqtrailer() argument 1233 ptr += blocksize - OCFS2_QBLK_RESERVED_SPACE; in ocfs2_block_dqtrailer() [all …]
|
/openbmc/linux/drivers/bcma/ |
H A D | driver_chipcommon_sflash.c | 29 u32 blocksize; member 149 sflash->blocksize = e->blocksize; in bcma_sflash_init() 151 sflash->size = sflash->blocksize * sflash->numblocks; in bcma_sflash_init() 154 bcma_info(bus, "Found %s serial flash (size: %dKiB, blocksize: 0x%X, blocks: %d)\n", in bcma_sflash_init() 155 e->name, sflash->size / 1024, sflash->blocksize, in bcma_sflash_init()
|
/openbmc/linux/drivers/ssb/ |
H A D | driver_chipcommon_sflash.c | 28 u32 blocksize; member 149 sflash->blocksize = e->blocksize; in ssb_sflash_init() 151 sflash->size = sflash->blocksize * sflash->numblocks; in ssb_sflash_init() 154 pr_info("Found %s serial flash (size: %dKiB, blocksize: 0x%X, blocks: %d)\n", in ssb_sflash_init() 155 e->name, sflash->size / 1024, e->blocksize, e->numblocks); in ssb_sflash_init()
|
/openbmc/linux/net/sunrpc/auth_gss/ |
H A D | gss_krb5_keys.c | 154 size_t blocksize, keybytes, keylength, n; in krb5_DK() local 169 blocksize = crypto_sync_skcipher_blocksize(cipher); in krb5_DK() 174 inblockdata = kmalloc(blocksize, gfp_mask); in krb5_DK() 178 outblockdata = kmalloc(blocksize, gfp_mask); in krb5_DK() 183 inblock.len = blocksize; in krb5_DK() 186 outblock.len = blocksize; in krb5_DK() 376 unsigned int blocksize, offset; in krb5_kdf_feedback_cmac() local 395 blocksize = crypto_shash_digestsize(tfm); in krb5_kdf_feedback_cmac() 396 n = (outkey->len + blocksize - 1) / blocksize; in krb5_kdf_feedback_cmac() 400 step.len = blocksize; in krb5_kdf_feedback_cmac() [all …]
|