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

Function mediatek_probe

util/cbfstool/platform_fixups.c:283–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283static bool mediatek_probe(struct buffer *buffer)
284{
285 struct vb2_hash real_hash;
286 void *hash = mediatek_find_hash(buffer, &real_hash);
287 if (!hash)
288 return false;
289
290 if (memcmp(real_hash.raw, hash, VB2_SHA256_DIGEST_SIZE)) {
291 ERROR("fixups: Found MediaTek bootblock, but existing hash doesn't match!\n");
292 return false;
293 }
294
295 return true;
296}
297
298static int mediatek_fixup(struct buffer *buffer, unused size_t offset)
299{

Callers 1

platform_fixups_probeFunction · 0.85

Calls 2

mediatek_find_hashFunction · 0.85
memcmpFunction · 0.50

Tested by

no test coverage detected