summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2012-09-07 16:53:00 -0700
committerGerrit <chrome-bot@google.com>2012-09-10 15:03:30 -0700
commit69f0d0bac943d36cbce9c1e5309c86c27ef6eff8 (patch)
tree598e29f52694d2d415b0241d33715cb5b673755e /firmware
parent172360ec5dc9b5a620d677a985ece05f4e0301bd (diff)
downloadvboot-69f0d0bac943d36cbce9c1e5309c86c27ef6eff8.tar.gz
Define all screens in enum ScreenIndex and use them
This enum seems partially complete, and not used in vboot_reference. Complete it and use it. BUG=chrome-os-partner:13492 BRANCH=snow TEST=manual Build and boot through to recovery on snow. Run through the various screens and check that they still appear correctly. Change-Id: Ifca54d072457d9a0396a38026f44f8334efb9cf5 Reviewed-on: https://gerrit.chromium.org/gerrit/32628 Reviewed-by: Mike Truty <truty@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Commit-Ready: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'firmware')
-rw-r--r--firmware/include/bmpblk_header.h12
-rw-r--r--firmware/lib/vboot_display.c16
2 files changed, 16 insertions, 12 deletions
diff --git a/firmware/include/bmpblk_header.h b/firmware/include/bmpblk_header.h
index 06ddaa8f..7a588219 100644
--- a/firmware/include/bmpblk_header.h
+++ b/firmware/include/bmpblk_header.h
@@ -84,10 +84,14 @@ typedef struct ScreenLayout {
/* Constants for screen index */
typedef enum ScreenIndex {
- SCREEN_DEVELOPER_MODE = 0,
- SCREEN_RECOVERY_MODE,
- SCREEN_RECOVERY_NO_OS,
- SCREEN_RECOVERY_MISSING_OS,
+ SCREEN_DEVELOPER_WARNING = 0,
+ SCREEN_RECOVERY_REMOVE,
+ SCREEN_RECOVERY_NO_GOOD,
+ SCREEN_RECOVERY_INSERT,
+ SCREEN_RECOVERY_TO_DEV,
+ SCREEN_DEVELOPER_TO_NORM,
+ SCREEN_WAIT,
+ SCREEN_TO_NORM_CONFIRMED,
MAX_VALID_SCREEN_INDEX,
SCREEN_BLANK = ~0UL,
} ScreenIndex;
diff --git a/firmware/lib/vboot_display.c b/firmware/lib/vboot_display.c
index 5c45ae1e..88adc464 100644
--- a/firmware/lib/vboot_display.c
+++ b/firmware/lib/vboot_display.c
@@ -210,28 +210,28 @@ VbError_t VbDisplayScreenFromGBB(VbCommonParams* cparams, uint32_t screen,
* here is awful. */
switch (screen) {
case VB_SCREEN_DEVELOPER_WARNING:
- screen_index = 0;
+ screen_index = SCREEN_DEVELOPER_WARNING;
break;
case VB_SCREEN_RECOVERY_REMOVE:
- screen_index = 1;
+ screen_index = SCREEN_RECOVERY_REMOVE;
break;
case VB_SCREEN_RECOVERY_NO_GOOD:
- screen_index = 2;
+ screen_index = SCREEN_RECOVERY_NO_GOOD;
break;
case VB_SCREEN_RECOVERY_INSERT:
- screen_index = 3;
+ screen_index = SCREEN_RECOVERY_INSERT;
break;
case VB_SCREEN_RECOVERY_TO_DEV:
- screen_index = 4;
+ screen_index = SCREEN_RECOVERY_TO_DEV;
break;
case VB_SCREEN_DEVELOPER_TO_NORM:
- screen_index = 5;
+ screen_index = SCREEN_DEVELOPER_TO_NORM;
break;
case VB_SCREEN_WAIT:
- screen_index = 6;
+ screen_index = SCREEN_WAIT;
break;
case VB_SCREEN_TO_NORM_CONFIRMED:
- screen_index = 7;
+ screen_index = SCREEN_TO_NORM_CONFIRMED;
break;
case VB_SCREEN_BLANK:
case VB_SCREEN_DEVELOPER_EGG: