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

Function checksum_vbios

util/intelvbttool/intelvbttool.c:797–807  ·  view source on GitHub ↗

Option ROM checksum */

Source from the content-addressed store, hash-verified

795
796/* Option ROM checksum */
797static u8 checksum_vbios(const optionrom_header_t *oh)
798{
799 const u8 *ptr = (const u8 *)oh;
800 size_t i;
801
802 u8 cksum = 0;
803 for (i = 0; i < ((MIN(oh->size, 128)) * 512); i++)
804 cksum += ptr[i];
805
806 return cksum;
807}
808
809/* Verify Option ROM contents */
810static int is_valid_vbios(const struct fileobject *fo)

Callers 2

is_valid_vbiosFunction · 0.85
fix_vbios_headerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected