Lines Matching refs:ivt_hdr
26 static int ivt_header_error(const char *err_str, struct ivt_header *ivt_hdr) in ivt_header_error() argument
29 ivt_hdr->magic, ivt_hdr->length, ivt_hdr->version); in ivt_header_error()
34 static int verify_ivt_header(struct ivt_header *ivt_hdr) in verify_ivt_header() argument
38 if (ivt_hdr->magic != IVT_HEADER_MAGIC) in verify_ivt_header()
39 result = ivt_header_error("bad magic", ivt_hdr); in verify_ivt_header()
41 if (be16_to_cpu(ivt_hdr->length) != IVT_TOTAL_LENGTH) in verify_ivt_header()
42 result = ivt_header_error("bad length", ivt_hdr); in verify_ivt_header()
44 if (ivt_hdr->version != IVT_HEADER_V1 && in verify_ivt_header()
45 ivt_hdr->version != IVT_HEADER_V2) in verify_ivt_header()
46 result = ivt_header_error("bad version", ivt_hdr); in verify_ivt_header()
574 struct ivt_header *ivt_hdr; in imx_hab_authenticate_image() local
596 ivt_hdr = &ivt->hdr; in imx_hab_authenticate_image()
599 if (verify_ivt_header(ivt_hdr)) in imx_hab_authenticate_image()