summaryrefslogtreecommitdiff
path: root/src/soc/amd
diff options
context:
space:
mode:
authorJakub Czapiga <jacz@semihalf.com>2022-11-04 12:18:04 +0000
committerFelix Held <felix-coreboot@felixheld.de>2022-11-08 14:44:54 +0000
commit605f793af84733eda416533ccf5b220c0f5a171b (patch)
tree1ef966bbab9c4295fe08e76041492e1a7f8f572e /src/soc/amd
parent699b833bd778954c0b3b8a3b856cf7af0668ad4c (diff)
vboot: Introduce handy vboot reboot functions
This patch groups vboot context, recovery reason and subcode saving, and reboot calls into two handy functions: - vboot_save_and_reboot() - save context and reboot - vboot_fail_and_reboot() - store recovery reason and call function above Signed-off-by: Jakub Czapiga <jacz@semihalf.com> Change-Id: Ie29410e8985e7cf19bd8d4cccc393b050ca1f1c5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69208 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/soc/amd')
-rw-r--r--src/soc/amd/common/psp_verstage/psp_verstage.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/soc/amd/common/psp_verstage/psp_verstage.c b/src/soc/amd/common/psp_verstage/psp_verstage.c
index 0dc3314ca5..4e2832444e 100644
--- a/src/soc/amd/common/psp_verstage/psp_verstage.c
+++ b/src/soc/amd/common/psp_verstage/psp_verstage.c
@@ -42,11 +42,8 @@ static void reboot_into_recovery(struct vb2_context *ctx, uint32_t subcode)
return;
}
- vb2api_fail(ctx, VB2_RECOVERY_RO_UNSPECIFIED, (int)subcode);
- vboot_save_data(ctx);
-
svc_debug_print("Rebooting into recovery\n");
- vboot_reboot();
+ vboot_fail_and_reboot(ctx, VB2_RECOVERY_RO_UNSPECIFIED, (int)subcode);
}
static uint32_t check_cmos_recovery(void)