util/nvramtool: Bail out on unaligned multi-byte entries
coreboot doesn't support CMOS options that are not byte aligned but span multiple bytes. So treat them as error. Change-Id: I2bcff62f153932e9c6646b4ce08e8da1c1532947 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/18246 Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
@@ -695,6 +695,12 @@ static void try_add_layout_file_entry(const cmos_entry_t * cmos_entry)
|
||||
*/
|
||||
return;
|
||||
|
||||
case LAYOUT_MULTIBYTE_ENTRY_NOT_ALIGNED:
|
||||
fprintf(stderr,
|
||||
"%s: Unaligned CMOS option table entry %s "
|
||||
"spans multiple bytes.\n", prog_name, cmos_entry->name);
|
||||
break;
|
||||
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
|
Reference in New Issue
Block a user