| 205 | } |
| 206 | |
| 207 | static int qualcomm_fixup(struct buffer *buffer, size_t offset) |
| 208 | { |
| 209 | struct vb2_hash real_hash; |
| 210 | void *table_hash = qualcomm_find_hash(buffer, offset, &real_hash); |
| 211 | if (!table_hash) { |
| 212 | ERROR("fixups: Cannot find Qualcomm MBN headers anymore!\n"); |
| 213 | return -1; |
| 214 | } |
| 215 | |
| 216 | memcpy(table_hash, real_hash.raw, VB2_SHA384_DIGEST_SIZE); |
| 217 | INFO("fixups: Updated Qualcomm MBN header bootblock hash.\n"); |
| 218 | return 0; |
| 219 | } |
| 220 | |
| 221 | /* |
| 222 | * MediaTek bootblock.bin layout (see util/mediatek/gen-bl-img.py): |
nothing calls this directly
no test coverage detected