Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 80) sorted by relevance

1234

/trusted-firmware-a/lib/zlib/
A Dadler32.c16 #define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;} argument
17 #define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); argument
18 #define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); argument
19 #define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); argument
20 #define DO16(buf) DO8(buf,0); DO8(buf,8); argument
65 const Bytef *buf;
87 if (buf == Z_NULL)
108 buf += 16;
118 DO16(buf);
119 buf += 16;
[all …]
A Dcrc32.c204 const unsigned char FAR *buf;
207 if (buf == Z_NULL) return 0UL;
237 unsigned long ZEXPORT crc32(crc, buf, len) in crc32() argument
239 const unsigned char FAR *buf;
242 return crc32_z(crc, buf, len);
268 const unsigned char FAR *buf;
276 while (len && ((ptrdiff_t)buf & 3)) {
290 buf = (const unsigned char FAR *)buf4;
308 const unsigned char FAR *buf;
316 while (len && ((ptrdiff_t)buf & 3)) {
[all …]
A Dzutil.c219 voidpf buf; in zcalloc() local
228 buf = farmalloc(bsize); in zcalloc()
229 if (*(ush*)&buf != 0) return buf; in zcalloc()
231 buf = farmalloc(bsize + 16L); in zcalloc()
233 if (buf == NULL || next_ptr >= MAX_PTR) return NULL; in zcalloc()
234 table[next_ptr].org_ptr = buf; in zcalloc()
237 *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4; in zcalloc()
238 *(ush*)&buf = 0; in zcalloc()
239 table[next_ptr++].new_ptr = buf; in zcalloc()
240 return buf; in zcalloc()
/trusted-firmware-a/lib/libfdt/
A Dfdt_empty_tree.c13 int fdt_create_empty_tree(void *buf, int bufsize) in fdt_create_empty_tree() argument
17 err = fdt_create(buf, bufsize); in fdt_create_empty_tree()
21 err = fdt_finish_reservemap(buf); in fdt_create_empty_tree()
25 err = fdt_begin_node(buf, ""); in fdt_create_empty_tree()
29 err = fdt_end_node(buf); in fdt_create_empty_tree()
33 err = fdt_finish(buf); in fdt_create_empty_tree()
37 return fdt_open_into(buf, buf, bufsize); in fdt_create_empty_tree()
A Dfdt_sw.c113 void *fdt = buf; in fdt_create_with_flags()
121 memset(buf, 0, bufsize); in fdt_create_with_flags()
143 int fdt_create(void *buf, int bufsize) in fdt_create() argument
145 return fdt_create_with_flags(buf, bufsize, 0); in fdt_create()
169 newtail = (char *)buf + bufsize - tailsize; in fdt_resize()
173 if (buf <= fdt) { in fdt_resize()
174 memmove(buf, fdt, headsize); in fdt_resize()
178 memmove(buf, fdt, headsize); in fdt_resize()
181 fdt_set_totalsize(buf, bufsize); in fdt_resize()
182 if (fdt_off_dt_strings(buf)) in fdt_resize()
[all …]
A Dfdt_rw.c442 err = fdt_move(fdt, buf, bufsize); in fdt_open_into()
445 fdt_set_version(buf, 17); in fdt_open_into()
446 fdt_set_size_dt_struct(buf, struct_size); in fdt_open_into()
447 fdt_set_totalsize(buf, bufsize); in fdt_open_into()
459 tmp = buf; in fdt_open_into()
464 if ((tmp + newsize) > ((char *)buf + bufsize)) in fdt_open_into()
469 memmove(buf, tmp, newsize); in fdt_open_into()
471 fdt_set_magic(buf, FDT_MAGIC); in fdt_open_into()
472 fdt_set_totalsize(buf, bufsize); in fdt_open_into()
473 fdt_set_version(buf, 17); in fdt_open_into()
[all …]
/trusted-firmware-a/plat/socionext/uniphier/
A Duniphier_usb.c65 static int uniphier_ld11_usb_read(int lba, uintptr_t buf, size_t size) in uniphier_ld11_usb_read() argument
68 unsigned int size, uintptr_t buf); in uniphier_ld11_usb_read()
74 return rom_usb_read(UNIPHIER_LD11_USB_DESC_BASE, lba, size, buf); in uniphier_ld11_usb_read()
89 unsigned int size, uintptr_t buf); in uniphier_ld20_usb_read()
97 ret = rom_usb_read(UNIPHIER_LD20_USB_DESC_BASE, lba, size, buf); in uniphier_ld20_usb_read()
116 unsigned int size, uintptr_t buf); in uniphier_pxs3_usb_read()
122 ret = rom_usb_read(UNIPHIER_PXS3_USB_DESC_BASE, lba, size, buf); in uniphier_pxs3_usb_read()
129 int (*read)(int lba, uintptr_t buf, size_t size);
151 inv_dcache_range(buf, size); in uniphier_usb_read()
153 ret = __uniphier_usb_read(lba, buf, size); in uniphier_usb_read()
[all …]
A Duniphier_nand.c120 static int uniphier_nand_read_pages(struct uniphier_nand *nand, uintptr_t buf, in uniphier_nand_read_pages() argument
142 mmio_write_32(nand->host_base + DENALI_HOST_DATA, buf); in uniphier_nand_read_pages()
145 mmio_write_32(nand->host_base + DENALI_HOST_DATA, buf >> 32); in uniphier_nand_read_pages()
163 uintptr_t buf, size_t size) in __uniphier_nand_read() argument
171 uintptr_t p = buf; in __uniphier_nand_read()
211 return MIN(size, p - buf); in __uniphier_nand_read()
214 static size_t uniphier_nand_read(int lba, uintptr_t buf, size_t size) in uniphier_nand_read() argument
218 inv_dcache_range(buf, size); in uniphier_nand_read()
220 count = __uniphier_nand_read(&uniphier_nand, lba, buf, size); in uniphier_nand_read()
222 inv_dcache_range(buf, size); in uniphier_nand_read()
/trusted-firmware-a/plat/rpi/common/
A Drpi3_stack_protector.c20 u_register_t buf[TRNG_NBYTES / sizeof(u_register_t)]; in plat_get_stack_protector_canary() local
23 rpi3_rng_read(buf, sizeof(buf)); in plat_get_stack_protector_canary()
25 for (i = 0U; i < ARRAY_SIZE(buf); i++) in plat_get_stack_protector_canary()
26 ret ^= buf[i]; in plat_get_stack_protector_canary()
/trusted-firmware-a/plat/hisilicon/hikey960/
A Dhikey960_bl2_setup.c51 int *buf; in plat_hikey960_bl2_handle_scp_bl2() local
61 buf = (int *)scp_bl2_image_info->image_base; in plat_hikey960_bl2_handle_scp_bl2()
66 buf[i], buf[i+1], buf[i+2], buf[i+3]); in plat_hikey960_bl2_handle_scp_bl2()
68 buf = (int *)(scp_bl2_image_info->image_base + in plat_hikey960_bl2_handle_scp_bl2()
74 buf[i], buf[i+1], buf[i+2], buf[i+3]); in plat_hikey960_bl2_handle_scp_bl2()
79 (void)buf; in plat_hikey960_bl2_handle_scp_bl2()
A Dhikey960_io_storage.c37 size_t ufs_read_lun3_blks(int lba, uintptr_t buf, size_t size);
38 size_t ufs_write_lun3_blks(int lba, const uintptr_t buf, size_t size);
303 size_t ufs_read_lun3_blks(int lba, uintptr_t buf, size_t size) in ufs_read_lun3_blks() argument
305 return ufs_read_blocks(3, lba, buf, size); in ufs_read_lun3_blks()
308 size_t ufs_write_lun3_blks(int lba, const uintptr_t buf, size_t size) in ufs_write_lun3_blks() argument
310 return ufs_write_blocks(3, lba, buf, size); in ufs_write_lun3_blks()
/trusted-firmware-a/drivers/ufs/
A Dufs.c330 flush_dcache_range(buf, length); in ufs_prepare_cmd()
332 inv_dcache_range(buf, length); in ufs_prepare_cmd()
350 buf += MAX_PRDT_SIZE; in ufs_prepare_cmd()
400 (void *)buf, length); in ufs_prepare_query()
590 memcpy((void *)buf, in ufs_query()
651 uintptr_t buf; in ufs_read_capacity() local
661 buf = (uintptr_t)data; in ufs_read_capacity()
662 buf = (buf + CACHE_WRITEBACK_GRANULE - 1) & in ufs_read_capacity()
669 buf, READ_CAPACITY_LENGTH); in ufs_read_capacity()
706 memset((void *)buf, 0, size); in ufs_read_blocks()
[all …]
/trusted-firmware-a/common/
A Dtf_crc32.c27 uint32_t tf_crc32(uint32_t crc, const unsigned char *buf, size_t size) in tf_crc32() argument
29 assert(buf != NULL); in tf_crc32()
32 const unsigned char *local_buf = buf; in tf_crc32()
/trusted-firmware-a/drivers/rpi3/rng/
A Drpi3_rng.c53 void rpi3_rng_read(void *buf, size_t len) in rpi3_rng_read() argument
57 uint32_t *dst = buf; in rpi3_rng_read()
59 assert(buf != NULL); in rpi3_rng_read()
61 assert(check_uptr_overflow((uintptr_t) buf, (uintptr_t) len) == 0); in rpi3_rng_read()
/trusted-firmware-a/include/drivers/
A Dmmc.h131 int (*prepare)(int lba, uintptr_t buf, size_t size);
132 int (*read)(int lba, uintptr_t buf, size_t size);
133 int (*write)(int lba, const uintptr_t buf, size_t size);
233 size_t mmc_read_blocks(int lba, uintptr_t buf, size_t size);
234 size_t mmc_write_blocks(int lba, const uintptr_t buf, size_t size);
236 size_t mmc_rpmb_read_blocks(int lba, uintptr_t buf, size_t size);
237 size_t mmc_rpmb_write_blocks(int lba, const uintptr_t buf, size_t size);
239 size_t mmc_boot_part_read_blocks(int lba, uintptr_t buf, size_t size);
/trusted-firmware-a/drivers/io/
A Dio_block.c248 io_block_spec_t *buf; in block_read() local
270 buf = &(cur->dev_spec->buffer); in block_read()
299 if ((skip + left) > buf->length) { in block_read()
305 request = buf->length; in block_read()
317 request = ops->read(lba, buf->offset, request); in block_read()
338 (void *)(buf->offset + skip), in block_read()
360 io_block_spec_t *buf; in block_write() local
382 buf = &(cur->dev_spec->buffer); in block_write()
412 if ((skip + left) > buf->length) { in block_write()
418 request = buf->length; in block_write()
[all …]
/trusted-firmware-a/drivers/nxp/i2c/
A Di2c.c145 unsigned char *buf, int len) in read_data() argument
176 buf[i] = i2c_in(&ccsr_i2c->dr); in read_data()
183 const unsigned char *buf, int len) in write_data() argument
189 ret = tx_byte(ccsr_i2c, buf[i]); in write_data()
201 unsigned char *buf, int len) in i2c_read() argument
223 return read_data(ccsr_i2c, chip, buf, len); in i2c_read()
227 const unsigned char *buf, int len) in i2c_write() argument
237 return write_data(ccsr_i2c, chip, buf, len); in i2c_write()
/trusted-firmware-a/tools/amlogic/
A Ddoimage.c49 uint8_t buf[BUFLEN]; in main() local
78 while ((len = read(fin, buf, sizeof(buf))) > 0) in main()
79 if (fdwrite(fout, buf, len) < 0) in main()
/trusted-firmware-a/plat/brcm/board/stingray/src/
A Dbl2_setup.c246 uint32_t buf[2]; in read_avs_otp_bits() local
248 if (bcm_otpc_read(offset, &buf[0], BYTES_TO_READ, 1) == -1) in read_avs_otp_bits()
252 offset/WORD_SIZE, buf[1], buf[0]); in read_avs_otp_bits()
257 buf[1]); in read_avs_otp_bits()
313 uint32_t buf[2]; in set_swreg_based_on_otp() local
316 if (bcm_otpc_read(offset, &buf[0], BYTES_TO_READ, 1) == -1) in set_swreg_based_on_otp()
320 offset/WORD_SIZE, buf[1], buf[0]); in set_swreg_based_on_otp()
322 if (IS_SR_B0(buf[1])) { in set_swreg_based_on_otp()
353 if (IS_SR_B0(buf[1])) { in set_swreg_based_on_otp()
/trusted-firmware-a/drivers/synopsys/emmc/
A Ddw_mmc.c126 static int dw_prepare(int lba, uintptr_t buf, size_t size);
127 static int dw_read(int lba, uintptr_t buf, size_t size);
128 static int dw_write(int lba, uintptr_t buf, size_t size);
342 static int dw_prepare(int lba, uintptr_t buf, size_t size) in dw_prepare() argument
348 assert(((buf & DWMMC_ADDRESS_MASK) == 0) && in dw_prepare()
354 flush_dcache_range(buf, size); in dw_prepare()
373 desc[i].des2 = buf + DWMMC_DMA_MAX_BUFFER_SIZE * i; in dw_prepare()
396 static int dw_read(int lba, uintptr_t buf, size_t size) in dw_read() argument
406 inv_dcache_range(buf, size); in dw_read()
411 static int dw_write(int lba, uintptr_t buf, size_t size) in dw_write() argument
/trusted-firmware-a/drivers/mmc/
A Dmmc.c530 size_t mmc_read_blocks(int lba, uintptr_t buf, size_t size) in mmc_read_blocks() argument
540 ret = ops->prepare(lba, buf, size); in mmc_read_blocks()
574 ret = ops->read(lba, buf, size); in mmc_read_blocks()
597 size_t mmc_write_blocks(int lba, const uintptr_t buf, size_t size) in mmc_write_blocks() argument
605 ((buf & MMC_BLOCK_MASK) == 0U) && in mmc_write_blocks()
608 ret = ops->prepare(lba, buf, size); in mmc_write_blocks()
641 ret = ops->write(lba, buf, size); in mmc_write_blocks()
710 size_t mmc_rpmb_read_blocks(int lba, uintptr_t buf, size_t size) in mmc_rpmb_read_blocks() argument
715 size_read = mmc_read_blocks(lba, buf, size); in mmc_rpmb_read_blocks()
726 size_written = mmc_write_blocks(lba, buf, size); in mmc_rpmb_write_blocks()
[all …]
/trusted-firmware-a/drivers/imx/usdhc/
A Dimx_usdhc.c23 static int imx_usdhc_prepare(int lba, uintptr_t buf, size_t size);
24 static int imx_usdhc_read(int lba, uintptr_t buf, size_t size);
25 static int imx_usdhc_write(int lba, uintptr_t buf, size_t size);
268 static int imx_usdhc_prepare(int lba, uintptr_t buf, size_t size) in imx_usdhc_prepare() argument
272 mmio_write_32(reg_base + DSADDR, buf); in imx_usdhc_prepare()
279 static int imx_usdhc_read(int lba, uintptr_t buf, size_t size) in imx_usdhc_read() argument
284 static int imx_usdhc_write(int lba, uintptr_t buf, size_t size) in imx_usdhc_write() argument
/trusted-firmware-a/tools/marvell/doimage/
A Ddoimage.c286 memset(buf, 0, sizeof(buf)); in create_rsa_signature()
320 memcpy(signature, buf, 256); in create_rsa_signature()
522 if (buf[i] != test_img[i]) { in image_encrypt()
1139 main_hdr = (header_t *)buf; in print_header()
1220 ext_header_t *ext_hdr = buf; in print_extension()
1252 main_hdr = (header_t *)buf; in parse_image()
1482 char *buf; in write_prolog() local
1494 buf = calloc(prolog_size, 1); in write_prolog()
1495 if (buf == NULL) { in write_prolog()
1500 header = (header_t *)buf; in write_prolog()
[all …]
/trusted-firmware-a/include/drivers/io/
A Dio_block.h14 size_t (*read)(int lba, uintptr_t buf, size_t size);
15 size_t (*write)(int lba, const uintptr_t buf, size_t size);
/trusted-firmware-a/drivers/st/mmc/
A Dstm32_sdmmc2.c126 static int stm32_sdmmc2_prepare(int lba, uintptr_t buf, size_t size);
127 static int stm32_sdmmc2_read(int lba, uintptr_t buf, size_t size);
128 static int stm32_sdmmc2_write(int lba, uintptr_t buf, size_t size);
484 sdmmc2_params.use_dma = plat_sdmmc2_use_dma(base, buf); in stm32_sdmmc2_prepare()
487 inv_dcache_range(buf, size); in stm32_sdmmc2_prepare()
517 mmio_write_32(base + SDMMC_IDMABASE0R, buf); in stm32_sdmmc2_prepare()
519 flush_dcache_range(buf, size); in stm32_sdmmc2_prepare()
531 static int stm32_sdmmc2_read(int lba, uintptr_t buf, size_t size) in stm32_sdmmc2_read() argument
544 assert((buf & GENMASK(1, 0)) == 0U); in stm32_sdmmc2_read()
546 buffer = (uint32_t *)buf; in stm32_sdmmc2_read()
[all …]

Completed in 49 milliseconds

1234