Home
last modified time | relevance | path

Searched refs:crc (Results 1 – 14 of 14) sorted by relevance

/lk-master/external/lib/cksum/
A Dcrc16.c16 unsigned short update_crc16(unsigned short crc, const unsigned char *buf, in update_crc16() argument
21 crc = (unsigned char) (crc >> 8) | (crc << 8); in update_crc16()
22 crc ^= buf[i]; in update_crc16()
23 crc ^= (unsigned char) (crc & 0xff) >> 4; in update_crc16()
24 crc ^= (crc << 8) << 4; in update_crc16()
25 crc ^= ((crc & 0xff) << 4) << 1; in update_crc16()
27 return crc; in update_crc16()
37 unsigned short crc = CRC16_INIT_VALUE; in crc16() local
38 return update_crc16(crc, buf, length); in crc16()
A Ddebug.c47 STATIC_COMMAND_END(crc);
57 uint16_t crc = crc16(argv[1].p, argv[2].u); in cmd_crc16() local
59 printf("0x%hx\n", crc); in cmd_crc16()
72 uint32_t crc = crc32(0, argv[1].p, argv[2].u); in cmd_crc32() local
74 printf("0x%x\n", crc); in cmd_crc32()
89 printf("0x%x\n", crc); in cmd_adler32()
113 uint32_t crc; in cmd_cksum_bench() local
118 crc = 0; in cmd_cksum_bench()
120 crc = crc32(crc, buf, BUFSIZE); in cmd_cksum_bench()
128 crc = 0; in cmd_cksum_bench()
[all …]
A Dcrc32.c201 #define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
205 unsigned long ZEXPORT crc32(crc, buf, len) in crc32() argument
206 unsigned long crc; in crc32()
225 return crc32_big(crc, buf, len);
228 crc = crc ^ 0xffffffffUL;
236 return crc ^ 0xffffffffUL;
249 unsigned long crc; in crc32_little()
256 c = (z_crc_t)crc;
288 local unsigned long crc32_big(crc, buf, len) in crc32_big() argument
289 unsigned long crc; in crc32_big()
[all …]
/lk-master/lib/norfs/
A Dnorfs.c48 uint16_t crc; member
149 crc = update_crc16(crc, (unsigned char *) &version, sizeof(version)); in calculate_header_crc()
150 crc = update_crc16(crc, (unsigned char *) &len, sizeof(len)); in calculate_header_crc()
151 crc = update_crc16(crc, (unsigned char *) &flags, sizeof(flags)); in calculate_header_crc()
152 return crc; in calculate_header_crc()
187 sizeof(header->crc), &header->crc); in read_header()
269 memcpy(buff + 2, &crc, sizeof(crc)); in write_obj_header()
300 *crc = update_crc16(*crc, word, sizeof(word)); in copy_iovec_to_disk()
323 *crc = update_crc16(*crc, word, word_ptr); in copy_iovec_to_disk()
376 uint16_t crc = 0; in write_obj_iovec() local
[all …]
/lk-master/external/lib/cksum/include/lib/
A Dcksum.h23 unsigned short update_crc16(unsigned short crc, const unsigned char *buf, unsigned int len);
25 unsigned long crc32(unsigned long crc, const unsigned char *buf, unsigned int len);
/lk-master/app/inetsrv/
A Dinetsrv.c88 uint32_t crc = 0; in discard_worker() local
104 crc = crc32(crc, buf, ret); in discard_worker()
111 count, (uint32_t)t, count * 1000 / t, crc); in discard_worker()
/lk-master/lib/fs/spifs/
A Dspifs.c267 uint32_t crc = 0; in spifs_commit_toc() local
281 crc = crc32(crc, (uint8_t *)&header, SPIFS_ENTRY_LENGTH); in spifs_commit_toc()
305 crc = crc32(crc, (uint8_t *)&file->metadata, SPIFS_ENTRY_LENGTH); in spifs_commit_toc()
309 crc = crc32(crc, (uint8_t *)&empty, SPIFS_ENTRY_LENGTH); in spifs_commit_toc()
326 footer->checksum = crc; in spifs_commit_toc()
420 uint32_t crc = 0; in get_toc_generation() local
421 crc = crc32(crc, (uint8_t *)header, SPIFS_ENTRY_LENGTH); in get_toc_generation()
429 crc = crc32(crc, cursor_get(&cursor), SPIFS_ENTRY_LENGTH); in get_toc_generation()
436 if (footer->checksum != crc) { in get_toc_generation()
/lk-master/app/loader/
A Dloader.c61 unsigned long crc = crc32(0, download->start, len); in output_result() local
63 download->name, download->start, len, crc); in output_result()
/lk-master/lib/ptable/
A Dptable.c592 uint32_t crc; in ptable_scan() local
595 crc = crc32(0, (void *)&header, sizeof(header)); in ptable_scan()
633 crc = crc32(crc, (void *)&entry, sizeof(entry)); in ptable_scan()
639 if (header.crc32 != crc) { in ptable_scan()
640 LTRACEF("failed crc check at the end (0x%08x != 0x%08x)\n", header.crc32, crc); in ptable_scan()
/lk-master/lib/bio/
A Ddebug.c242 ulong crc = 0; in cmd_bio() local
252 crc = crc32(crc, buf, err); in cmd_bio()
257 printf("crc 0x%08lx\n", crc); in cmd_bio()
/lk-master/lib/klog/
A Dklog.c168 uint32_t crc = get_checksum_klog_buffer_header(kbuf); in klog_recover() local
169 if (crc != kbuf->header_crc32) in klog_recover()
199 crc = get_checksum_klog_data(k); in klog_recover()
200 if (crc != k->data_checksum) in klog_recover()
/lk-master/platform/pc/include/
A Dpcnet.h103 uint32_t crc : 1; member
/lk-master/external/lib/miniz/include/lib/
A Dminiz.h87 mz_ulong mz_crc32(mz_ulong crc, const unsigned char *ptr, size_t buf_len);
/lk-master/external/lib/miniz/
A Dminiz.c224 mz_ulong mz_crc32(mz_ulong crc, const mz_uint8 *ptr, size_t buf_len) in mz_crc32() argument
228 mz_uint32 crcu32 = (mz_uint32)crc; in mz_crc32()

Completed in 37 milliseconds