summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2022-03-29 23:28:10 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-03-30 23:41:48 +0000
commit830add6e27a63670f16c2d5c76576fa64abf38d5 (patch)
treeebb03a440c11d7663b8407e853d9f5b55a1e0ba5 /util
parent879a2789eeca2f054f23a8d19f2afcf8479c7559 (diff)
util/amdfwtool: select A/B recovery when ISH is used
In newer AMD SoCs, the image slot header is used in the AMD A/B recovery scheme, so set recovery_ab to true when need_ish is true. Also move the block of code before the process_config call, since that call will already use the recovery_ab field of the cb_config struct. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I65903765514f215bf5cc9b949d0b95aff781eb34 Reviewed-on: https://review.coreboot.org/c/coreboot/+/63184 Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/amdfwtool/amdfwtool.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c
index 9e7f920487..7c977a2cdf 100644
--- a/util/amdfwtool/amdfwtool.c
+++ b/util/amdfwtool/amdfwtool.c
@@ -1684,6 +1684,12 @@ int main(int argc, char **argv)
}
}
+ if (cb_config.need_ish)
+ cb_config.recovery_ab = true;
+
+ if (cb_config.recovery_ab)
+ cb_config.multi_level = true;
+
if (config) {
config_handle = fopen(config, "r");
if (config_handle == NULL) {
@@ -1724,10 +1730,6 @@ int main(int argc, char **argv)
retval = 1;
}
- if (cb_config.recovery_ab) {
- cb_config.multi_level = true;
- }
-
if (retval) {
usage();
return retval;