diff options
-rw-r--r-- | firmware/Makefile | 6 | ||||
-rw-r--r-- | firmware/lib/vboot_display.c | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/firmware/Makefile b/firmware/Makefile index 6dcf0bb3..0e8db324 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -42,6 +42,12 @@ CFLAGS += -DTPM_BLOCKING_CONTINUESELFTEST ifeq ($(FIRMWARE_ARCH),i386) CFLAGS += -DUNROLL_LOOPS + +# Workaround for coreboot on x86, which will power off asynchronously +# without giving us a chance to react. This is not an example of the Right +# Way to do things. See chrome-os-partner:7689, and the commit message +# that made this change. +CFLAGS += -DRANDOM_POWER_OFF endif INCLUDES = \ diff --git a/firmware/lib/vboot_display.c b/firmware/lib/vboot_display.c index b15b5183..5c45ae1e 100644 --- a/firmware/lib/vboot_display.c +++ b/firmware/lib/vboot_display.c @@ -632,14 +632,12 @@ VbError_t VbCheckDisplayKey(VbCommonParams* cparams, uint32_t key, loc = (loc > 0 ? loc - 1 : count - 1); VBDEBUG(("VbCheckDisplayKey() - change localization to %d\n", (int)loc)); VbNvSet(vncptr, VBNV_LOCALIZATION_INDEX, loc); - /* Workaround for coreboot on x86, which will power off asynchronously - * without giving us a chance to react. This is not an example of the Right - * Way to do things. See chrome-os-partner:7689, and the commit message - * that made this change. - */ + +#ifdef RANDOM_POWER_OFF VbNvTeardown(vncptr); /* really only computes checksum */ if (vncptr->raw_changed) VbExNvStorageWrite(vncptr->raw); +#endif /* Force redraw of current screen */ return VbDisplayScreen(cparams, disp_current_screen, 1, vncptr); |