diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2016-04-19 18:09:30 +0200 |
---|---|---|
committer | Minifree Ltd <info@minifree.org> | 2016-04-19 23:50:21 +0100 |
commit | 8e3b064430300bba4ef15e99ddcda3d861e8e264 (patch) | |
tree | ad02570aaf5d6da37a48726c0751e708ef8f50b2 /resources/depthcharge/patch/0005-vboot-Only-initialize-cparams-once.patch | |
parent | d0e903dac630b5d05e4b21dd90e410540ab55b6d (diff) | |
download | librebootfr-8e3b064430300bba4ef15e99ddcda3d861e8e264.tar.gz librebootfr-8e3b064430300bba4ef15e99ddcda3d861e8e264.zip |
Coreboot, vboot and depthcharge updates to Coreboot 4.3 for CrOS devices
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'resources/depthcharge/patch/0005-vboot-Only-initialize-cparams-once.patch')
-rw-r--r-- | resources/depthcharge/patch/0005-vboot-Only-initialize-cparams-once.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/resources/depthcharge/patch/0005-vboot-Only-initialize-cparams-once.patch b/resources/depthcharge/patch/0005-vboot-Only-initialize-cparams-once.patch new file mode 100644 index 00000000..8bc56a73 --- /dev/null +++ b/resources/depthcharge/patch/0005-vboot-Only-initialize-cparams-once.patch @@ -0,0 +1,34 @@ +From 40668e8b5fb9a9e07a3b1ddf334bd4e12a38525f Mon Sep 17 00:00:00 2001 +From: Paul Kocialkowski <contact@paulk.fr> +Date: Mon, 18 Apr 2016 11:14:19 +0200 +Subject: [PATCH 5/8] vboot: Only initialize cparams once + +Calling common_params_init multiple times in a row results in emptying cparams +each time, causing the GBB data to be lost as it is only read once (the first +time). + +Signed-off-by: Paul Kocialkowski <contact@paulk.fr> +--- + src/vboot/util/commonparams.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/vboot/util/commonparams.c b/src/vboot/util/commonparams.c +index 9f29473..3a71a8b 100644 +--- a/src/vboot/util/commonparams.c ++++ b/src/vboot/util/commonparams.c +@@ -159,8 +159,10 @@ int is_cparams_initialized(void) + int common_params_init(int clear_shared_data) + { + // Set up the common param structure. +- memset(&cparams, 0, sizeof(cparams)); +- cparams_initialized = 1; ++ if (!is_cparams_initialized()) { ++ memset(&cparams, 0, sizeof(cparams)); ++ cparams_initialized = 1; ++ } + + if (gbb_init()) + return 1; +-- +2.8.0 + |