summaryrefslogtreecommitdiff
path: root/firmware/stub
diff options
context:
space:
mode:
authorSheng-Liang Song <ssl@chromium.org>2014-07-26 21:34:28 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-09-03 22:49:35 +0000
commit487a54bcbe7b6dac1a856b0991e6d13c34a1c423 (patch)
treed39c23b04503e39b3fe42032c0c2169a0ef0e46b /firmware/stub
parente08ee28548934e933733babf0bc0c418142d095d (diff)
downloadvboot-487a54bcbe7b6dac1a856b0991e6d13c34a1c423.tar.gz
vboot: Notify EC of current boot mode
Notify EC of boot mode, i.e. normal, developer or recovery. This is necessary for battery firmware updates. BUG=chrome-os-partner:24741 CQ-DEPEND=CL:205323 CQ-DEPEND=CL:210033 CQ-DEPEND=CL:215720 BRANCH=ToT TEST=Verified on samus & glimmer. Passed runalltests. ~/trunk/src/platform/vboot_reference $ make runalltests -j Change-Id: I1613ede34b4a929d1e8114fb519861f349377e94 Signed-off-by: Sheng-Liang Song <ssl@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/210032 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'firmware/stub')
-rw-r--r--firmware/stub/vboot_api_stub.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/firmware/stub/vboot_api_stub.c b/firmware/stub/vboot_api_stub.c
index c9ecd9df..6d82f121 100644
--- a/firmware/stub/vboot_api_stub.c
+++ b/firmware/stub/vboot_api_stub.c
@@ -17,6 +17,8 @@
#include "vboot_api.h"
+static enum VbEcBootMode_t vboot_mode;
+
void VbExSleepMs(uint32_t msec)
{
}
@@ -151,6 +153,17 @@ VbError_t VbExEcProtectRW(int devidx)
return VBERROR_SUCCESS;
}
+VbError_t VbExEcEnteringMode(int devidx, enum VbEcBootMode_t mode)
+{
+ vboot_mode = mode;
+ return VBERROR_SUCCESS;
+}
+
+enum VbEcBootMode_t VbGetMode(void)
+{
+ return vboot_mode;
+}
+
int VbExLegacy(void)
{
return 1;