Home
last modified time | relevance | path

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

/device/google/contexthub/util/stm32_flash/
Dstm32f4_crc.c29 static uint32_t crc32_word(uint32_t crc, uint32_t data) in crc32_word() argument
31 crc = crc ^ data; in crc32_word()
33 crc = (crc << 4) ^ crc_table[crc >> 28]; in crc32_word()
34 crc = (crc << 4) ^ crc_table[crc >> 28]; in crc32_word()
35 crc = (crc << 4) ^ crc_table[crc >> 28]; in crc32_word()
36 crc = (crc << 4) ^ crc_table[crc >> 28]; in crc32_word()
37 crc = (crc << 4) ^ crc_table[crc >> 28]; in crc32_word()
38 crc = (crc << 4) ^ crc_table[crc >> 28]; in crc32_word()
39 crc = (crc << 4) ^ crc_table[crc >> 28]; in crc32_word()
40 crc = (crc << 4) ^ crc_table[crc >> 28]; in crc32_word()
[all …]
Dflash.c72 uint32_t crc; in main() local
246 crc = ~stm32f4_crc32(buffer, sizeof(uint32_t) + length); in main()
249 &crc, sizeof(uint32_t)); in main()
305 crc = stm32f4_crc32(buffer, tot_len(length)); in main()
311 crc == STM32F4_CRC_RESIDUE ? "good" : "bad"); in main()
/device/google/contexthub/lib/nanohub/
Dsoftcrc.c30 static uint32_t crcOneWord(uint32_t crc, uint32_t data, int cnt) in crcOneWord() argument
34 crc = crc ^ data; in crcOneWord()
36 crc = (crc << 4) ^ crctab[crc >> 28]; in crcOneWord()
38 return crc; in crcOneWord()
41 uint32_t soft_crc32(const void *buf, size_t size, uint32_t crc) in soft_crc32() argument
50 crc = crcOneWord(crc, *data32++, 8); in soft_crc32()
58 crc = crcOneWord(crc, word, 8); in soft_crc32()
61 return crc; in soft_crc32()
/device/google/contexthub/firmware/os/platform/stm32/
Dcrc.c40 static uint32_t revCrc32Word(uint32_t crc, uint32_t data, uint32_t cnt) in revCrc32Word() argument
45 crc = (crc >> 4) ^ mRevCrcTab[crc & 0x0F]; in revCrc32Word()
47 return crc ^ data; in revCrc32Word()
52 uint32_t crc32(const void *buf, size_t size, uint32_t crc) in crc32() argument
61 if (mCrcRegs->DR == crc) in crc32()
63 else if (crc == CRC_INIT) in crc32()
66 mCrcRegs->DR = revCrc32Word(crc, mCrcRegs->DR, 8); in crc32()
80 crc = mCrcRegs->DR; in crc32()
82 return crc; in crc32()
DAndroid.mk52 crc.c \
Dstm32.mk50 os/platform/$(PLATFORM)/crc.c \
/device/google/contexthub/util/nanotool/
Dnanopacket.cpp33 uint32_t Crc32Word(uint32_t crc, uint32_t data, int cnt) { in Crc32Word() argument
34 crc = crc ^ data; in Crc32Word()
37 crc = (crc << 4) ^ kCrcTable[crc >> 28]; in Crc32Word()
40 return crc; in Crc32Word()
46 uint32_t crc = kInitialCrc; in Crc32() local
50 crc = Crc32Word(crc, ((uint32_t *)buffer)[i], 8); in Crc32()
61 crc = Crc32Word(crc, word, 8); in Crc32()
64 return crc; in Crc32()
104 uint32_t crc = Crc32(packet_buffer_.data(), required_buffer_size - 4); in NanoPacket() local
105 packet_buffer_[data_size + 10] = crc; in NanoPacket()
[all …]
/device/google/crosshatch/audio/
Dconvert_config_string.py10 crc = int(~0)&0xffffffff
12 crc = crc ^ (int(inlist[i]&0xffffffff))
14crc = ((int(crc >> 1)&0xffffffff) ^ int(0xEDB88320 & ((-(crc & 1))&0xffffffff) ))&0xffffffff
16 crc=(~crc)&0xffffffff
19 if (crc>0x7fffffff):
20 crc=-(0x7fffffff-(crc&0x7fffffff)+1)
22 print("Calculated CRC= ", crc)
25 return(crc)
68 crc=Generate_CRC(binarydata)
69 binarydata[len(binarydata)-1]=crc
[all …]
/device/google/bonito/audio/
Dconvert_config_string.py10 crc = int(~0)&0xffffffff
12 crc = crc ^ (int(inlist[i]&0xffffffff))
14crc = ((int(crc >> 1)&0xffffffff) ^ int(0xEDB88320 & ((-(crc & 1))&0xffffffff) ))&0xffffffff
16 crc=(~crc)&0xffffffff
19 if (crc>0x7fffffff):
20 crc=-(0x7fffffff-(crc&0x7fffffff)+1)
22 print("Calculated CRC= ", crc)
25 return(crc)
68 crc=Generate_CRC(binarydata)
69 binarydata[len(binarydata)-1]=crc
[all …]
/device/google/cuttlefish/host/frontend/gcastv2/signaling_server/
Dutils.cpp125 uint32_t crc = 0xffffffff; in computeCrc32() local
128 uint32_t lkp = crc32_tab[(crc ^ data[i]) & 0xFF]; in computeCrc32()
129 crc = lkp ^ (crc >> 8); in computeCrc32()
132 return crc ^ 0xffffffff; in computeCrc32()
/device/google/contexthub/lib/include/nanohub/
Dcrc.h39 uint32_t crc32(const void *buf, size_t size, uint32_t crc);
42 uint32_t soft_crc32(const void *buf, size_t size, uint32_t crc);
/device/google/contexthub/firmware/os/inc/
Dseos.h213 uint32_t crc; member
222 return footer ? footer->crc : 0xFFFFFFFF; in osSegmentGetCrc()
258 uint32_t crc; in osAppSegmentCalcCrcResidue() local
261 crc = soft_crc32((uint8_t*)seg, size + sizeof(*seg), ~0); in osAppSegmentCalcCrcResidue()
264 return crc; in osAppSegmentCalcCrcResidue()
DnanohubPacket.h52 __le32 crc; member
142 __le32 crc; member
586 __le32 crc; member
/device/google/bonito/gpt-utils/
Dgpt-utils.cpp292 uint32_t crc; in gpt2_set_boot_chain() local
341 crc = crc32(0, pentries, pentries_array_size); in gpt2_set_boot_chain()
342 if (GET_4_BYTES(gpt_header + PARTITION_CRC_OFFSET) != crc) { in gpt2_set_boot_chain()
364 crc = crc32(0, pentries, pentries_array_size); in gpt2_set_boot_chain()
365 PUT_4_BYTES(gpt_header + PARTITION_CRC_OFFSET, crc); in gpt2_set_boot_chain()
369 crc = crc32(0, gpt_header, gpt_header_size); in gpt2_set_boot_chain()
370 PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, crc); in gpt2_set_boot_chain()
405 uint32_t crc; in gpt_get_state() local
438 crc = GET_4_BYTES(gpt_header + HEADER_CRC_OFFSET); in gpt_get_state()
441 if (crc32(0, gpt_header, gpt_header_size) != crc) in gpt_get_state()
[all …]
/device/google/coral/gpt-utils/
Dgpt-utils.cpp292 uint32_t crc; in gpt2_set_boot_chain() local
341 crc = crc32(0, pentries, pentries_array_size); in gpt2_set_boot_chain()
342 if (GET_4_BYTES(gpt_header + PARTITION_CRC_OFFSET) != crc) { in gpt2_set_boot_chain()
364 crc = crc32(0, pentries, pentries_array_size); in gpt2_set_boot_chain()
365 PUT_4_BYTES(gpt_header + PARTITION_CRC_OFFSET, crc); in gpt2_set_boot_chain()
369 crc = crc32(0, gpt_header, gpt_header_size); in gpt2_set_boot_chain()
370 PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, crc); in gpt2_set_boot_chain()
405 uint32_t crc; in gpt_get_state() local
438 crc = GET_4_BYTES(gpt_header + HEADER_CRC_OFFSET); in gpt_get_state()
441 if (crc32(0, gpt_header, gpt_header_size) != crc) in gpt_get_state()
[all …]
/device/google/crosshatch/gpt-utils/
Dgpt-utils.cpp292 uint32_t crc; in gpt2_set_boot_chain() local
341 crc = crc32(0, pentries, pentries_array_size); in gpt2_set_boot_chain()
342 if (GET_4_BYTES(gpt_header + PARTITION_CRC_OFFSET) != crc) { in gpt2_set_boot_chain()
364 crc = crc32(0, pentries, pentries_array_size); in gpt2_set_boot_chain()
365 PUT_4_BYTES(gpt_header + PARTITION_CRC_OFFSET, crc); in gpt2_set_boot_chain()
369 crc = crc32(0, gpt_header, gpt_header_size); in gpt2_set_boot_chain()
370 PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, crc); in gpt2_set_boot_chain()
405 uint32_t crc; in gpt_get_state() local
438 crc = GET_4_BYTES(gpt_header + HEADER_CRC_OFFSET); in gpt_get_state()
441 if (crc32(0, gpt_header, gpt_header_size) != crc) in gpt_get_state()
[all …]
/device/google/coral-kernel/sm8150/kernel-headers/linux/mfd/adnc/
Diaxxx-tunnel-intf.h30 uint8_t crc[6]; member
/device/google/coral-kernel/sm8150/original-kernel-headers/linux/mfd/adnc/
Diaxxx-tunnel-intf.h29 uint8_t crc[6]; member
/device/google/contexthub/firmware/os/core/
DnanohubCommand.c88 uint32_t crc; // document CRC-32, as reported by client member
314 mDownloadState->crc = le32toh(req->crc); in doStartFirmwareUpload()
568 valid = !checkCrc || mDownloadState->crc == ~mDownloadState->srcCrc; in firmwareWrite()
644 static uint32_t doFinishFirmwareUpload(uint32_t *addr, uint32_t *crc) in doFinishFirmwareUpload() argument
656 if (crc) { in doFinishFirmwareUpload()
658 *crc = osAppSegmentGetCrc(mApp); in doFinishFirmwareUpload()
660 *crc = 0xFFFFFFFF; in doFinishFirmwareUpload()
1480 static int processAppTags(const struct AppHdr *app, uint32_t crc, uint32_t size, uint8_t *data, uin… in processAppTags() argument
1517 success = copyTLV32(data, &offset, max_len, tags[i], crc); in processAppTags()
1826 uint32_t crc = 0xFFFFFFFF; in halFinishUpload() local
[all …]
DhostIntf.c211 uint32_t crc = crc32(packet, packet->len + sizeof(*packet), CRC_INIT); in hostIntfComputeCrc() local
212 return htole32(crc); in hostIntfComputeCrc()
257 if (footer->crc != packetCrc) { in hostIntfFindHandler()
306 txFooter->crc = hostIntfComputeCrc(mTxBuf.buf); in hostIntfTxPacket()
322 txFooter->crc = hostIntfComputeCrc(mTxNakBuf.buf); in hostIntfTxNakPacket()
Dseos.c637 .crc = ~soft_crc32(storageSeg, fullSize, ~0), in osAppSegmentClose()
/device/google/contexthub/contexthubhal/
Dsystem_comms.cpp675 uint32_t crc = buf.readU32(); in handleFinish() local
679 appManager.setCachedCrc(mAppName, crc); in handleFinish()
955 app->crc); in dumpAppInfo()
1072 uint32_t crc = val[2].asUInt(); in restoreApps() local
1082 apps_[id]->cached_crc = crc; in restoreApps()
1161 (apps_[appName.id]->crc != apps_[appName.id]->cached_crc)) in cmpApp()
1218 app->crc = 0; in readNanohubAppInfo()
1219 else if (len == sizeof(app->crc)) in readNanohubAppInfo()
1220 app->crc = buf.readU32(); in readNanohubAppInfo()
Dsystem_comms.h314 uint32_t tid, crc, flashAddr; member
340 bool setCachedCrc(hub_app_name_t &appName, uint32_t crc) { in setCachedCrc() argument
345 apps_[appName.id]->cached_crc = crc; in setCachedCrc()