summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2014-08-11 12:30:04 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-08-12 02:50:56 +0000
commit277dc5274c5c906c8d80d2ae4cc7679d234e8408 (patch)
tree15a31f5b8f4182795be133da654d97dec2c0cf98
parent6014c048131f7c3d055e97c0aaa44494edc4f813 (diff)
downloadvboot-release-R38-6158.B.tar.gz
Add GBB flag to disable PD software syncstabilize-6146.Brelease-R38-6158.B
In order to disable PD software sync but still do EC software sync it is useful to have a separate GBB flag for it. This will allow me to release a Samus P2B firmware image that will update the EC but not the PD, since the PD FW that comes on P2B devices cannot be updated with software sync. BUG=chrome-os-partner:30079 BRANCH=None TEST=flash BIOS with updated EC+PD: 1) no GBB flags to override behavior updates both EC and PD 2) GBB flag to disable EC software sync disables both EC and PD update 3) GBB flag to disable PD software sync disables only PD update Change-Id: I49ffb59238bee4a2dd66b24f2516e3ce46ea06cd Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/211910 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--firmware/2lib/include/2struct.h3
-rw-r--r--firmware/include/gbb_header.h2
-rw-r--r--firmware/lib/vboot_api_kernel.c10
-rwxr-xr-xscripts/image_signing/set_gbb_flags.sh1
4 files changed, 12 insertions, 4 deletions
diff --git a/firmware/2lib/include/2struct.h b/firmware/2lib/include/2struct.h
index 646d0915..560d5672 100644
--- a/firmware/2lib/include/2struct.h
+++ b/firmware/2lib/include/2struct.h
@@ -362,6 +362,9 @@ enum vb2_gbb_flag {
/* Default to booting legacy OS when dev screen times out */
VB2_GBB_FLAG_DEFAULT_DEV_BOOT_LEGACY = (1 << 10),
+
+ /* Disable PD software sync */
+ VB2_GBB_FLAG_DISABLE_PD_SOFTWARE_SYNC = (1 << 11),
};
struct vb2_gbb_header {
diff --git a/firmware/include/gbb_header.h b/firmware/include/gbb_header.h
index 86aa12a6..8a1b2aae 100644
--- a/firmware/include/gbb_header.h
+++ b/firmware/include/gbb_header.h
@@ -62,6 +62,8 @@
#define GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC 0x00000200
/* Default to booting legacy OS when dev screen times out */
#define GBB_FLAG_DEFAULT_DEV_BOOT_LEGACY 0x00000400
+/* Disable PD software sync */
+#define GBB_FLAG_DISABLE_PD_SOFTWARE_SYNC 0x00000800
#ifdef __cplusplus
extern "C" {
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c
index 448e6963..4f013117 100644
--- a/firmware/lib/vboot_api_kernel.c
+++ b/firmware/lib/vboot_api_kernel.c
@@ -944,11 +944,13 @@ VbError_t VbSelectAndLoadKernel(VbCommonParams *cparams,
goto VbSelectAndLoadKernel_exit;
#ifdef PD_SYNC
- retval = VbEcSoftwareSync(1, cparams);
- if (retval != VBERROR_SUCCESS)
- goto VbSelectAndLoadKernel_exit;
+ if (!(cparams->gbb->flags &
+ GBB_FLAG_DISABLE_PD_SOFTWARE_SYNC)) {
+ retval = VbEcSoftwareSync(1, cparams);
+ if (retval != VBERROR_SUCCESS)
+ goto VbSelectAndLoadKernel_exit;
+ }
#endif
-
}
/* Read kernel version from the TPM. Ignore errors in recovery mode. */
diff --git a/scripts/image_signing/set_gbb_flags.sh b/scripts/image_signing/set_gbb_flags.sh
index f114d413..4d5925c1 100755
--- a/scripts/image_signing/set_gbb_flags.sh
+++ b/scripts/image_signing/set_gbb_flags.sh
@@ -34,6 +34,7 @@ GBBFLAGS_DESCRIPTION="
GBB_FLAG_FAFT_KEY_OVERIDE 0x00000100
GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC 0x00000200
GBB_FLAG_DEFAULT_DEV_BOOT_LEGACY 0x00000400
+ GBB_FLAG_DISABLE_PD_SOFTWARE_SYNC 0x00000800
To get a developer-friendly device, try 0x11 (short_delay + boot_usb).
For factory-related tests (always DEV), try 0x39.