Lines Matching refs:ccmd

396 	struct sb_command *ccmd;  in sb_encrypt_image()  local
405 ccmd = &cctx->payload; in sb_encrypt_image()
409 if (ccmd->header.tag == ROM_TAG_CMD) { in sb_encrypt_image()
411 } else if (ccmd->header.tag == ROM_LOAD_CMD) { in sb_encrypt_image()
789 struct sb_command *ccmd; in sb_build_command_nop() local
795 ccmd = &cctx->payload; in sb_build_command_nop()
800 ccmd->header.checksum = 0x5a; in sb_build_command_nop()
801 ccmd->header.tag = ROM_NOP_CMD; in sb_build_command_nop()
803 cctx->size = sizeof(*ccmd); in sb_build_command_nop()
824 struct sb_command *ccmd; in sb_build_command_tag() local
831 ccmd = &cctx->payload; in sb_build_command_tag()
839 ccmd->header.flags = ROM_TAG_CMD_FLAG_ROM_LAST_TAG; in sb_build_command_tag()
844 ccmd->header.checksum = 0x5a; in sb_build_command_tag()
845 ccmd->header.tag = ROM_TAG_CMD; in sb_build_command_tag()
847 cctx->size = sizeof(*ccmd); in sb_build_command_tag()
868 struct sb_command *ccmd; in sb_build_command_load() local
877 ccmd = &cctx->payload; in sb_build_command_load()
1006 ccmd->header.checksum = 0x5a; in sb_build_command_load()
1007 ccmd->header.tag = ROM_LOAD_CMD; in sb_build_command_load()
1008 ccmd->header.flags = dcd; in sb_build_command_load()
1010 ccmd->load.address = dest; in sb_build_command_load()
1011 ccmd->load.count = cctx->length; in sb_build_command_load()
1012 ccmd->load.crc32 = pbl_crc32(0, in sb_build_command_load()
1016 cctx->size = sizeof(*ccmd) + cctx->length; in sb_build_command_load()
1041 struct sb_command *ccmd; in sb_build_command_fill() local
1050 ccmd = &cctx->payload; in sb_build_command_fill()
1106 ccmd->header.checksum = 0x5a; in sb_build_command_fill()
1107 ccmd->header.tag = ROM_FILL_CMD; in sb_build_command_fill()
1109 ccmd->fill.address = address; in sb_build_command_fill()
1110 ccmd->fill.count = length; in sb_build_command_fill()
1111 ccmd->fill.pattern = pattern; in sb_build_command_fill()
1113 cctx->size = sizeof(*ccmd); in sb_build_command_fill()
1139 struct sb_command *ccmd; in sb_build_command_jump_call() local
1150 ccmd = &cctx->payload; in sb_build_command_jump_call()
1197 ccmd->header.checksum = 0x5a; in sb_build_command_jump_call()
1198 ccmd->header.tag = is_call ? ROM_CALL_CMD : ROM_JUMP_CMD; in sb_build_command_jump_call()
1199 ccmd->header.flags = hab; in sb_build_command_jump_call()
1201 ccmd->call.address = dest; in sb_build_command_jump_call()
1202 ccmd->call.argument = arg; in sb_build_command_jump_call()
1204 cctx->size = sizeof(*ccmd); in sb_build_command_jump_call()
1241 struct sb_command *ccmd; in sb_build_command_mode() local
1251 ccmd = &cctx->payload; in sb_build_command_mode()
1289 ccmd->header.checksum = 0x5a; in sb_build_command_mode()
1290 ccmd->header.tag = ROM_MODE_CMD; in sb_build_command_mode()
1292 ccmd->mode.mode = mode; in sb_build_command_mode()
1294 cctx->size = sizeof(*ccmd); in sb_build_command_mode()
1414 struct sb_command *ccmd; in sb_fixup_sections_and_tags() local
1430 ccmd = &cctx->payload; in sb_fixup_sections_and_tags()
1431 if (ccmd->header.tag == ROM_TAG_CMD) { in sb_fixup_sections_and_tags()
1432 ccmd->tag.section_number = shdr->section_number; in sb_fixup_sections_and_tags()
1433 ccmd->tag.section_length = shdr->section_size; in sb_fixup_sections_and_tags()
1434 ccmd->tag.section_flags = shdr->section_flags; in sb_fixup_sections_and_tags()
1438 ccmd->header.checksum = sb_command_checksum(ccmd); in sb_fixup_sections_and_tags()
1811 struct sb_command *ccmd = &cctx->payload; in sb_verify_command() local
1816 uint8_t csn, csc = ccmd->header.checksum; in sb_verify_command()
1817 ccmd->header.checksum = 0x5a; in sb_verify_command()
1818 csn = sb_command_checksum(ccmd); in sb_verify_command()
1819 ccmd->header.checksum = csc; in sb_verify_command()
1827 switch (ccmd->header.tag) { in sb_verify_command()
1832 if (ccmd->header.flags & ROM_TAG_CMD_FLAG_ROM_LAST_TAG) in sb_verify_command()
1839 ccmd->load.address, ccmd->load.count, csum); in sb_verify_command()
1841 cctx->length = ccmd->load.count; in sb_verify_command()
1859 if (ccmd->load.crc32 != pbl_crc32(0, in sb_verify_command()
1870 ccmd->fill.address, ccmd->fill.count, in sb_verify_command()
1871 ccmd->fill.pattern, csum); in sb_verify_command()
1874 if (ccmd->header.flags & ROM_JUMP_CMD_FLAG_HAB) in sb_verify_command()
1878 flag, ccmd->fill.address, ccmd->jump.argument, csum); in sb_verify_command()
1881 if (ccmd->header.flags & ROM_CALL_CMD_FLAG_HAB) in sb_verify_command()
1885 flag, ccmd->fill.address, ccmd->jump.argument, csum); in sb_verify_command()
1889 if (ccmd->mode.mode == modetable[i].mode) { in sb_verify_command()
2256 struct sb_command *ccmd; in sb_build_image() local
2294 ccmd = &cctx->payload; in sb_build_image()
2299 if (ccmd->header.tag == ROM_LOAD_CMD) { in sb_build_image()