Lines Matching refs:img
58 int ahab_verify_cntr_image(struct boot_img_t *img, int image_index)
65 debug("img %d, dst 0x%llx, src 0x%x, size 0x%x\n",
66 image_index, img->dst, img->offset, img->size);
70 img->dst & ~(CONFIG_SYS_CACHELINE_SIZE - 1),
71 ALIGN(img->dst + img->size, CONFIG_SYS_CACHELINE_SIZE) - 1);
75 img->dst, err);
86 printf("Set permission failed for img %d, error %d\n",
94 printf("Authenticate img %d failed, return %d\n",
102 printf("Remove permission failed for img %d, error %d\n",
132 struct boot_img_t *img;
171 img = (struct boot_img_t *)(addr +
175 debug("img %d, dst 0x%x, src 0x%lux, size 0x%x\n",
176 i, (uint32_t) img->dst, img->offset + addr, img->size);
178 memcpy((void *)img->dst, (const void *)(img->offset + addr),
179 img->size);
181 s = img->dst & ~(CONFIG_SYS_CACHELINE_SIZE - 1);
182 e = ALIGN(img->dst + img->size, CONFIG_SYS_CACHELINE_SIZE) - 1;
187 if (((img->hab_flags & AHAB_HASH_TYPE_MASK) >> 8) == AHAB_HASH_TYPE_SHA256) {
188 sha256_csum_wd((void *)img->dst, img->size, hash_value, CHUNKSZ_SHA256);
189 err = memcmp(&img->hash, &hash_value, SHA256_SUM_LEN);
191 printf("img %d hash comparison failed, error %d\n", i, err);
197 ret = ahab_verify_cntr_image(img, i);