Lines Matching refs:i
85 for (size_t i = 2; i < info->entry_count; i++) { in validate_bootimage() local
86 if (be[i].kind == 0) in validate_bootimage()
89 LTRACEF("%u: kind 0x%x\n", i, be[i].kind); in validate_bootimage()
91 switch (be[i].kind) { in validate_bootimage()
100 (be[i].file.type >> 0) & 0xff, (be[i].file.type >> 8) & 0xff, in validate_bootimage()
101 (be[i].file.type >> 16) & 0xff, (be[i].file.type >> 24) & 0xff, in validate_bootimage()
102 be[i].file.offset, be[i].file.length); in validate_bootimage()
105 uint32_t end = be[i].file.offset + be[i].file.length; in validate_bootimage()
106 if (end < be[i].file.offset || end > info->image_size) { in validate_bootimage()
115 … SHA256_update(&ctx, (const uint8_t *)bi->ptr + be[i].file.offset, be[i].file.length); in validate_bootimage()
118 if (memcmp(hash, be[i].file.sha256, sizeof(be[i].file.sha256)) != 0) { in validate_bootimage()
127 LTRACEF("unknown kind 0x%x\n", be[i].kind); in validate_bootimage()
185 for (size_t i = 2; i < info->entry_count; i++) { in bootimage_get_file_section() local
186 if (be[i].kind == 0) in bootimage_get_file_section()
189 if (be[i].kind != KIND_FILE) in bootimage_get_file_section()
192 if (type == be[i].file.type) { in bootimage_get_file_section()
194 *ptr = bi->ptr + be[i].file.offset; in bootimage_get_file_section()
196 *len = be[i].file.length; in bootimage_get_file_section()