Home
last modified time | relevance | path

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

12345678910>>...31

/openbmc/linux/lib/
H A Dcrc32.c58 crc32_body(u32 crc, unsigned char const *buf, size_t len, const u32 (*tab)[256]) argument
61 # define DO_CRC(x) crc = t0[(crc ^ (x)) & 255] ^ (crc >> 8)
67 # define DO_CRC(x) crc = t0[((crc >> 24) ^ (x)) & 255] ^ (crc << 8)
106 q = crc ^ *++b; /* use pre increment for speed */
108 crc = DO_CRC4;
110 crc = DO_CRC8;
112 crc ^= DO_CRC4;
128 return crc;
146 static inline u32 __pure crc32_le_generic(u32 crc, unsigned char const *p, argument
153 crc ^= *p++;
[all …]
H A Dgen_crc32table.c41 uint32_t crc = 1; in crc32init_le_generic() local
46 crc = (crc >> 1) ^ ((crc & 1) ? polynomial : 0); in crc32init_le_generic()
48 tab[0][i + j] = crc ^ tab[0][j]; in crc32init_le_generic()
51 crc = tab[0][i]; in crc32init_le_generic()
53 crc = tab[0][crc & 0xff] ^ (crc >> 8); in crc32init_le_generic()
54 tab[j][i] = crc; in crc32init_le_generic()
75 uint32_t crc = 0x80000000; in crc32init_be() local
80 crc = (crc << 1) ^ ((crc & 0x80000000) ? CRC32_POLY_BE : 0); in crc32init_be()
82 crc32table_be[0][i + j] = crc ^ crc32table_be[0][j]; in crc32init_be()
85 crc = crc32table_be[0][i]; in crc32init_be()
[all …]
H A Dgen_crc64table.c27 uint64_t i, j, c, crc; in generate_reflected_crc64_table() local
30 crc = 0ULL; in generate_reflected_crc64_table()
34 if ((crc ^ (c >> j)) & 1) in generate_reflected_crc64_table()
35 crc = (crc >> 1) ^ poly; in generate_reflected_crc64_table()
37 crc >>= 1; in generate_reflected_crc64_table()
39 table[i] = crc; in generate_reflected_crc64_table()
45 uint64_t i, j, c, crc; in generate_crc64_table() local
48 crc = 0; in generate_crc64_table()
52 if ((crc ^ c) & 0x8000000000000000ULL) in generate_crc64_table()
53 crc = (crc << 1) ^ poly; in generate_crc64_table()
[all …]
H A Dcrc64.c51 u64 __pure crc64_be(u64 crc, const void *p, size_t len) in crc64_be() argument
58 t = ((crc >> 56) ^ (*_p++)) & 0xFF; in crc64_be()
59 crc = crc64table[t] ^ (crc << 8); in crc64_be()
62 return crc; in crc64_be()
73 u64 __pure crc64_rocksoft_generic(u64 crc, const void *p, size_t len) in crc64_rocksoft_generic() argument
78 crc = ~crc; in crc64_rocksoft_generic()
81 crc = (crc >> 8) ^ crc64rocksofttable[(crc & 0xff) ^ *_p++]; in crc64_rocksoft_generic()
83 return ~crc; in crc64_rocksoft_generic()
/openbmc/linux/drivers/gpu/drm/
H A Ddrm_debugfs_crc.c100 if (strcmp(sources[i], crtc->crc.source)) in crc_control_show()
109 seq_printf(m, "%s*\n", crtc->crc.source); in crc_control_show()
125 struct drm_crtc_crc *crc = &crtc->crc; in crc_control_write() local
152 spin_lock_irq(&crc->lock); in crc_control_write()
154 if (crc->opened) { in crc_control_write()
155 spin_unlock_irq(&crc->lock); in crc_control_write()
160 kfree(crc->source); in crc_control_write()
161 crc->source = source; in crc_control_write()
163 spin_unlock_irq(&crc->lock); in crc_control_write()
178 static int crtc_crc_data_count(struct drm_crtc_crc *crc) in crtc_crc_data_count() argument
[all …]
/openbmc/u-boot/drivers/mtd/ubi/
H A Dcrc32.c61 u32 crc32_le(u32 crc, unsigned char const *p, size_t len);
69 u32 crc32_le(u32 crc, unsigned char const *p, size_t len) in crc32_le() argument
73 crc ^= *p++; in crc32_le()
75 crc = (crc >> 1) ^ ((crc & 1) ? CRCPOLY_LE : 0); in crc32_le()
77 return crc; in crc32_le()
81 u32 crc32_le(u32 crc, unsigned char const *p, size_t len) in crc32_le() argument
88 # define DO_CRC(x) crc = tab[ (crc ^ (x)) & 255 ] ^ (crc>>8) in crc32_le()
90 # define DO_CRC(x) crc = tab[ ((crc >> 24) ^ (x)) & 255] ^ (crc<<8) in crc32_le()
93 crc = __cpu_to_le32(crc); in crc32_le()
108 crc ^= *++b; in crc32_le()
[all …]
/openbmc/linux/drivers/gpu/drm/nouveau/dispnv50/
H A Dcrc.c77 core->func->crc->set_ctx(head, ctx); in nv50_crc_program_ctx()
84 struct nv50_crc *crc = container_of(work, struct nv50_crc, flip_work); in nv50_crc_ctx_flip_work() local
85 struct nv50_head *head = container_of(crc, struct nv50_head, crc); in nv50_crc_ctx_flip_work()
91 u8 new_idx = crc->ctx_idx ^ 1; in nv50_crc_ctx_flip_work()
104 crtc->name, crc->ctx_idx, new_idx); in nv50_crc_ctx_flip_work()
107 nv50_crc_program_ctx(head, &crc->ctx[new_idx]); in nv50_crc_ctx_flip_work()
116 spin_lock_irq(&crc->lock); in nv50_crc_ctx_flip_work()
117 crc->ctx_changed = true; in nv50_crc_ctx_flip_work()
118 spin_unlock_irq(&crc->lock); in nv50_crc_ctx_flip_work()
132 struct nv50_crc *crc = &head->crc; in nv50_crc_get_entries() local
[all …]
/openbmc/linux/drivers/crypto/stm32/
H A Dstm32-crc32.c104 struct stm32_crc *crc; in stm32_crc_get_next_crc() local
107 crc = list_first_entry_or_null(&crc_list.dev_list, struct stm32_crc, list); in stm32_crc_get_next_crc()
108 if (crc) in stm32_crc_get_next_crc()
109 list_move_tail(&crc->list, &crc_list.dev_list); in stm32_crc_get_next_crc()
112 return crc; in stm32_crc_get_next_crc()
119 struct stm32_crc *crc; in stm32_crc_init() local
122 crc = stm32_crc_get_next_crc(); in stm32_crc_init()
123 if (!crc) in stm32_crc_init()
126 pm_runtime_get_sync(crc->dev); in stm32_crc_init()
128 spin_lock_irqsave(&crc->lock, flags); in stm32_crc_init()
[all …]
/openbmc/linux/arch/mips/crypto/
H A Dcrc32-mips.c46 #define __CRC32(crc, value, op, SZ, TYPE) \ argument
54 : "+r" (crc) \
58 #define _CRC32_crc32b(crc, value) __CRC32(crc, value, crc32b, 0, 0) argument
59 #define _CRC32_crc32h(crc, value) __CRC32(crc, value, crc32h, 1, 0) argument
60 #define _CRC32_crc32w(crc, value) __CRC32(crc, value, crc32w, 2, 0) argument
61 #define _CRC32_crc32d(crc, value) __CRC32(crc, value, crc32d, 3, 0) argument
62 #define _CRC32_crc32cb(crc, value) __CRC32(crc, value, crc32cb, 0, 1) argument
63 #define _CRC32_crc32ch(crc, value) __CRC32(crc, value, crc32ch, 1, 1) argument
64 #define _CRC32_crc32cw(crc, value) __CRC32(crc, value, crc32cw, 2, 1) argument
65 #define _CRC32_crc32cd(crc, value) __CRC32(crc, value, crc32cd, 3, 1) argument
[all …]
/openbmc/openbmc/poky/meta/conf/machine/include/arm/
H A Darch-armv8r.inc11 require conf/machine/include/arm/feature-arm-crc.inc
18 AVAILTUNES += "armv8r armv8r-crc armv8r-crypto armv8r-simd armv8r-crc-crypto armv8r-crc-simd armv8r…
20 ARMPKGARCH:tune-armv8r-crc = "armv8r"
23 ARMPKGARCH:tune-armv8r-crc-crypto = "armv8r"
24 ARMPKGARCH:tune-armv8r-crc-simd = "armv8r"
25 ARMPKGARCH:tune-armv8r-crc-crypto-simd = "armv8r"
27 TUNE_FEATURES:tune-armv8r-crc = "${TUNE_FEATURES:tune-armv8r} crc"
30 TUNE_FEATURES:tune-armv8r-crc-crypto = "${TUNE_FEATURES:tune-armv8r-crc} crypto"
31 TUNE_FEATURES:tune-armv8r-crc-simd = "${TUNE_FEATURES:tune-armv8r-crc} simd"
32 TUNE_FEATURES:tune-armv8r-crc-crypto-simd = "${TUNE_FEATURES:tune-armv8r-crc-crypto} simd"
[all …]
H A Darch-armv8a.inc1 DEFAULTTUNE ?= "armv8a-crc"
8 require conf/machine/include/arm/feature-arm-crc.inc
12 AVAILTUNES += "armv8a armv8a-crc armv8a-crc-crypto armv8a-crypto"
14 ARMPKGARCH:tune-armv8a-crc ?= "armv8a"
16 ARMPKGARCH:tune-armv8a-crc-crypto ?= "armv8a"
18 TUNE_FEATURES:tune-armv8a-crc = "${TUNE_FEATURES:tune-armv8a} crc"
20 TUNE_FEATURES:tune-armv8a-crc-crypto = "${TUNE_FEATURES:tune-armv8a-crc} crypto"
22 PACKAGE_EXTRA_ARCHS:tune-armv8a-crc = "${PACKAGE_EXTRA_ARCHS:tune-armv8a} armv8a-crc"
24 PACKAGE_EXTRA_ARCHS:tune-armv8a-crc-crypto = "${PACKAGE_EXTRA_ARCHS:tune-armv8a-crc} armv8a-crypto …
26 BASE_LIB:tune-armv8a-crc = "lib64"
[all …]
/openbmc/linux/arch/loongarch/crypto/
H A Dcrc32-loongarch.c18 #define _CRC32(crc, value, size, type) \ argument
22 : "+r" (crc) \
27 #define CRC32(crc, value, size) _CRC32(crc, value, size, crc) argument
28 #define CRC32C(crc, value, size) _CRC32(crc, value, size, crcc) argument
32 u32 crc = crc_; in crc32_loongarch_hw() local
37 CRC32(crc, value, d); in crc32_loongarch_hw()
45 CRC32(crc, value, w); in crc32_loongarch_hw()
52 CRC32(crc, value, h); in crc32_loongarch_hw()
59 CRC32(crc, value, b); in crc32_loongarch_hw()
62 return crc; in crc32_loongarch_hw()
[all …]
/openbmc/linux/drivers/net/can/spi/mcp251xfd/
H A Dmcp251xfd-crc16.c58 static inline u16 mcp251xfd_crc16_byte(u16 crc, const u8 data) in mcp251xfd_crc16_byte() argument
60 u8 index = (crc >> 8) ^ data; in mcp251xfd_crc16_byte()
62 return (crc << 8) ^ mcp251xfd_crc16_table[index]; in mcp251xfd_crc16_byte()
65 static u16 mcp251xfd_crc16(u16 crc, u8 const *buffer, size_t len) in mcp251xfd_crc16() argument
68 crc = mcp251xfd_crc16_byte(crc, *buffer++); in mcp251xfd_crc16()
70 return crc; in mcp251xfd_crc16()
75 u16 crc = 0xffff; in mcp251xfd_crc16_compute() local
77 return mcp251xfd_crc16(crc, data, data_size); in mcp251xfd_crc16_compute()
83 u16 crc; in mcp251xfd_crc16_compute2() local
85 crc = mcp251xfd_crc16_compute(cmd, cmd_size); in mcp251xfd_crc16_compute2()
[all …]
/openbmc/u-boot/common/
H A Dddr_spd.c71 int crc, i; in crc16() local
73 crc = 0; in crc16()
75 crc = crc ^ (int)*ptr++ << 8; in crc16()
77 if (crc & 0x8000) in crc16()
78 crc = crc << 1 ^ 0x1021; in crc16()
80 crc = crc << 1; in crc16()
82 return crc & 0xffff; in crc16()
106 if (spd->crc[0] == crc_lsb && spd->crc[1] == crc_msb) { in ddr3_spd_check()
112 spd->crc[0], crc_lsb, spd->crc[1], crc_msb); in ddr3_spd_check()
131 if (spd->crc[0] != crc_lsb || spd->crc[1] != crc_msb) { in ddr4_spd_check()
[all …]
/openbmc/linux/arch/powerpc/crypto/
H A Dcrct10dif-vpmsum_glue.c25 u32 __crct10dif_vpmsum(u32 crc, unsigned char const *p, size_t len);
31 u32 crc = crci; in crct10dif_vpmsum() local
34 return crc_t10dif_generic(crc, p, len); in crct10dif_vpmsum()
38 crc = crc_t10dif_generic(crc, p, prealign); in crct10dif_vpmsum()
44 crc <<= 16; in crct10dif_vpmsum()
48 crc = __crct10dif_vpmsum(crc, p, len & ~VMX_ALIGN_MASK); in crct10dif_vpmsum()
52 crc >>= 16; in crct10dif_vpmsum()
58 crc = crc_t10dif_generic(crc, p, tail); in crct10dif_vpmsum()
61 return crc & 0xffff; in crct10dif_vpmsum()
66 u16 *crc = shash_desc_ctx(desc); in crct10dif_vpmsum_init() local
[all …]
/openbmc/linux/tools/power/acpi/tools/acpidbg/
H A Dacpidbg.c123 static int acpi_aml_read(int fd, struct circ_buf *crc) in acpi_aml_read() argument
128 p = &crc->buf[crc->head]; in acpi_aml_read()
129 len = circ_space_to_end(crc); in acpi_aml_read()
134 crc->head = (crc->head + len) & (ACPI_AML_BUF_SIZE - 1); in acpi_aml_read()
138 static int acpi_aml_read_batch_cmd(int unused, struct circ_buf *crc) in acpi_aml_read_batch_cmd() argument
144 p = &crc->buf[crc->head]; in acpi_aml_read_batch_cmd()
145 len = circ_space_to_end(crc); in acpi_aml_read_batch_cmd()
155 crc->head = (crc->head + len) & (ACPI_AML_BUF_SIZE - 1); in acpi_aml_read_batch_cmd()
159 static int acpi_aml_read_batch_log(int fd, struct circ_buf *crc) in acpi_aml_read_batch_log() argument
165 p = &crc->buf[crc->head]; in acpi_aml_read_batch_log()
[all …]
/openbmc/qemu/hw/nvram/
H A Dxlnx-efuse-crc.c73 uint32_t crc = prev_crc; in xlnx_efuse_u37_crc() local
89 r = rm & (crc >> rshf); in xlnx_efuse_u37_crc()
90 i = im & (crc ^ w); in xlnx_efuse_u37_crc()
91 crc = crc_tab[i] ^ r; in xlnx_efuse_u37_crc()
97 r = r2 & (crc >> 2); in xlnx_efuse_u37_crc()
98 i = i2 & (crc ^ w); in xlnx_efuse_u37_crc()
99 crc = crc_tab[i << (rshf - 2)] ^ r; in xlnx_efuse_u37_crc()
101 return crc; in xlnx_efuse_u37_crc()
107 uint32_t crc = 0; in xlnx_efuse_calc_crc() local
111 crc = xlnx_efuse_u37_crc(crc, 0, (index + u32_cnt)); in xlnx_efuse_calc_crc()
[all …]
/openbmc/linux/arch/arm/crypto/
H A Dcrc32-ce-glue.c66 u32 *crc = shash_desc_ctx(desc); in crc32_init() local
68 *crc = *mctx; in crc32_init()
75 u32 *crc = shash_desc_ctx(desc); in crc32_update() local
77 *crc = crc32_armv8_le(*crc, data, length); in crc32_update()
84 u32 *crc = shash_desc_ctx(desc); in crc32c_update() local
86 *crc = crc32c_armv8_le(*crc, data, length); in crc32c_update()
92 u32 *crc = shash_desc_ctx(desc); in crc32_final() local
94 put_unaligned_le32(*crc, out); in crc32_final()
100 u32 *crc = shash_desc_ctx(desc); in crc32c_final() local
102 put_unaligned_le32(~*crc, out); in crc32c_final()
[all …]
/openbmc/linux/crypto/
H A Dcrc64_rocksoft_generic.c10 u64 *crc = shash_desc_ctx(desc); in chksum_init() local
12 *crc = 0; in chksum_init()
20 u64 *crc = shash_desc_ctx(desc); in chksum_update() local
22 *crc = crc64_rocksoft_generic(*crc, data, length); in chksum_update()
29 u64 *crc = shash_desc_ctx(desc); in chksum_final() local
31 put_unaligned_le64(*crc, out); in chksum_final()
35 static int __chksum_finup(u64 crc, const u8 *data, unsigned int len, u8 *out) in __chksum_finup() argument
37 crc = crc64_rocksoft_generic(crc, data, len); in __chksum_finup()
38 put_unaligned_le64(crc, out); in __chksum_finup()
45 u64 *crc = shash_desc_ctx(desc); in chksum_finup() local
[all …]
/openbmc/u-boot/lib/
H A Dcrc32.c173 # define DO_CRC(x) crc = tab[(crc ^ (x)) & 255] ^ (crc >> 8)
175 # define DO_CRC(x) crc = tab[((crc >> 24) ^ (x)) & 255] ^ (crc << 8)
183 uint32_t __efi_runtime crc32_no_comp(uint32_t crc, const Bytef *buf, uInt len) in crc32_no_comp() argument
192 crc = cpu_to_le32(crc); in crc32_no_comp()
206 crc ^= *++b; /* use pre increment for speed */ in crc32_no_comp()
221 return le32_to_cpu(crc); in crc32_no_comp()
225 uint32_t __efi_runtime crc32(uint32_t crc, const Bytef *p, uInt len) in crc32() argument
227 return crc32_no_comp(crc ^ 0xffffffffL, p, len) ^ 0xffffffffL; in crc32()
234 uint32_t crc32_wd(uint32_t crc, const unsigned char *buf, uInt len, in crc32_wd() argument
247 crc = crc32 (crc, curr, chunk); in crc32_wd()
[all …]
/openbmc/linux/arch/s390/crypto/
H A Dcrc32-vx.c31 u32 crc; member
35 u32 crc32_le_vgfm_16(u32 crc, unsigned char const *buf, size_t size);
36 u32 crc32_be_vgfm_16(u32 crc, unsigned char const *buf, size_t size);
37 u32 crc32c_le_vgfm_16(u32 crc, unsigned char const *buf, size_t size);
49 static u32 __pure ___fname(u32 crc, \
56 return ___crc32_sw(crc, data, datalen); \
62 crc = ___crc32_sw(crc, data, prealign); \
70 crc = ___crc32_vx(crc, data, aligned); \
74 crc = ___crc32_sw(crc, data + aligned, remaining); \
76 return crc; \
[all …]
/openbmc/linux/fs/xfs/libxfs/
H A Dxfs_cksum.h17 uint32_t crc; in xfs_start_cksum_safe() local
20 crc = crc32c(XFS_CRC_SEED, buffer, cksum_offset); in xfs_start_cksum_safe()
23 crc = crc32c(crc, &zero, sizeof(__u32)); in xfs_start_cksum_safe()
26 return crc32c(crc, &buffer[cksum_offset + sizeof(__be32)], in xfs_start_cksum_safe()
52 xfs_end_cksum(uint32_t crc) in xfs_end_cksum() argument
54 return ~cpu_to_le32(crc); in xfs_end_cksum()
66 uint32_t crc = xfs_start_cksum_update(buffer, length, cksum_offset); in xfs_update_cksum() local
68 *(__le32 *)(buffer + cksum_offset) = xfs_end_cksum(crc); in xfs_update_cksum()
77 uint32_t crc = xfs_start_cksum_safe(buffer, length, cksum_offset); in xfs_verify_cksum() local
79 return *(__le32 *)(buffer + cksum_offset) == xfs_end_cksum(crc); in xfs_verify_cksum()
/openbmc/qemu/util/
H A Dcrc32c.c108 uint32_t crc32c(uint32_t crc, const uint8_t *data, unsigned int length) in crc32c() argument
111 crc = crc32c_table[(crc ^ *data++) & 0xFFL] ^ (crc >> 8); in crc32c()
113 return crc^0xffffffff; in crc32c()
116 uint32_t iov_crc32c(uint32_t crc, const struct iovec *iov, size_t iov_cnt) in iov_crc32c() argument
119 crc = crc32c(crc, iov->iov_base, iov->iov_len) ^ 0xffffffff; in iov_crc32c()
122 return crc ^ 0xffffffff; in iov_crc32c()
/openbmc/linux/arch/arm64/crypto/
H A Dcrct10dif-ce-glue.c28 u16 *crc = shash_desc_ctx(desc); in crct10dif_init() local
30 *crc = 0; in crct10dif_init()
37 u16 *crc = shash_desc_ctx(desc); in crct10dif_update_pmull_p8() local
47 *crc = crc_t10dif_pmull_p8(*crc, data, chunk); in crct10dif_update_pmull_p8()
53 *crc = crc_t10dif_generic(*crc, data, length); in crct10dif_update_pmull_p8()
62 u16 *crc = shash_desc_ctx(desc); in crct10dif_update_pmull_p64() local
72 *crc = crc_t10dif_pmull_p64(*crc, data, chunk); in crct10dif_update_pmull_p64()
78 *crc = crc_t10dif_generic(*crc, data, length); in crct10dif_update_pmull_p64()
86 u16 *crc = shash_desc_ctx(desc); in crct10dif_final() local
88 *(u16 *)out = *crc; in crct10dif_final()
/openbmc/phosphor-ipmi-blobs/
H A Dipmi.hpp26 uint16_t crc; member
33 uint16_t crc; member
39 uint16_t crc; member
45 uint16_t crc; member
51 uint16_t crc; member
58 uint16_t crc; member
65 uint16_t crc; member
71 uint16_t crc; member
76 uint16_t crc; member
85 uint16_t crc; member
[all …]

12345678910>>...31