summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorFred Reitberger <reitbergerfred@gmail.com>2022-06-29 13:54:57 -0400
committerFelix Held <felix-coreboot@felixheld.de>2022-06-30 19:08:14 +0000
commitf36b0138c4c38bcffcb2cf6fae82fbfbeabf035b (patch)
tree70acf72a9290d8d345b48219bc1a57110d7c4bbf /util
parent8ee11b3e09df4fb6d9cd4fb84e6268e39822728e (diff)
util/amdfwtool: Initalize all variables before use
Not all of the fields of the amd_cb_config structure were properly initialized. Rather than initialize each field individually, initialize the entire structure to 0. TEST: Boot chausie Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com> Change-Id: Ia343f01bce3956d66d01ce485b43963193c9df31 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65533 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Diffstat (limited to 'util')
-rw-r--r--util/amdfwtool/amdfwtool.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c
index abc0a9eb9d..a4d71a556a 100644
--- a/util/amdfwtool/amdfwtool.c
+++ b/util/amdfwtool/amdfwtool.c
@@ -1522,21 +1522,10 @@ int main(int argc, char **argv)
uint8_t efs_spi_speed = 0xff;
uint8_t efs_spi_micron_flag = 0xff;
- amd_cb_config cb_config;
+ amd_cb_config cb_config = { 0 };
int debug = 0;
int list_deps = 0;
- cb_config.have_whitelist = false;
- cb_config.unlock_secure = false;
- cb_config.use_secureos = false;
- cb_config.load_mp2_fw = false;
- cb_config.s0i3 = false;
- cb_config.multi_level = false;
- cb_config.recovery_ab = false;
- cb_config.need_ish = false;
- cb_config.recovery_ab_single_copy = false;
- cb_config.use_combo = false;
-
while (1) {
int optindex = 0;