MCPcopy Create free account
hub / github.com/coreboot/coreboot / mediatek_fixup

Function mediatek_fixup

util/cbfstool/platform_fixups.c:298–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298static int mediatek_fixup(struct buffer *buffer, unused size_t offset)
299{
300 struct vb2_hash real_hash;
301 void *hash = mediatek_find_hash(buffer, &real_hash);
302 if (!hash) {
303 ERROR("fixups: Cannot find MediaTek header anymore!\n");
304 return -1;
305 }
306
307 memcpy(hash, real_hash.raw, VB2_SHA256_DIGEST_SIZE);
308 INFO("fixups: Updated MediaTek bootblock hash.\n");
309 return 0;
310}
311
312platform_fixup_func platform_fixups_probe(struct buffer *buffer, size_t offset,
313 const char *region_name)

Callers

nothing calls this directly

Calls 2

mediatek_find_hashFunction · 0.85
memcpyFunction · 0.50

Tested by

no test coverage detected