From 8101b7131651e344807d2bd0ec77542b3196a653 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Tue, 8 May 2012 14:34:03 -0700 Subject: Enable verified boot for EC firmware BUG=chrome-os-partner:7459 TEST=manual In the chroot: cd src/platform/ec make BOARD=link The firmware image (build/link/ec.bin) is signed with dev-keys. Reflash the EC and try it, and it should verify and reboot into RW A. Additional tests (setting USE_RO_NORMAL, poking random values into VBLOCK_A or FW_MAIN_A to force RW B to run, etc.) are left as an exercise for the reader. I've done them and they work, though. Change-Id: I29a23ea69aef02a11aebd4af3b043f6864723523 Signed-off-by: Bill Richardson --- include/util.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/util.h') diff --git a/include/util.h b/include/util.h index 6f8fe1c581..3fb0657061 100644 --- a/include/util.h +++ b/include/util.h @@ -32,10 +32,18 @@ /* Standard macros / definitions */ +#ifndef ARRAY_SIZE #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#endif +#ifndef MAX #define MAX(a, b) ((a) > (b) ? (a) : (b)) +#endif +#ifndef MIN #define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif +#ifndef NULL #define NULL ((void *)0) +#endif /** * macros for integer division with various rounding variants -- cgit v1.2.1