diff options
author | Subrata Banik <subrata.banik@intel.com> | 2015-09-28 15:12:08 +0530 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2016-01-17 22:52:02 +0100 |
commit | df13c31ed6fdad2cdb6e8e874f26e5cad2ce935f (patch) | |
tree | 858935bc9d8135a7a5fd118136b8850359371b64 /src/vendorcode/google/chromeos/vboot_common.c | |
parent | e28846a0e89bfed307d792f8f5f128f5914a91fc (diff) | |
download | coreboot-df13c31ed6fdad2cdb6e8e874f26e5cad2ce935f.tar.xz |
intel/skylake: During RO mode after FSP reset CB lose original state
CB used to clear recovery status towards romstage end after FSP
memory init. Later inside FSP silicon init due to HSIO CRC mismatch
it will request for an additional reset.On next boot system resume
in dev mode rather than recovery because lost its original state
due to FSP silicon init reset.
Hence an additional 1 reset require to identify original state.
With this patch, we will get future platform reset info during romstage
and restore back recovery request flag so, in next boot CB can maintain
its original status and avoid 1 extra reboot.
BUG=chrome-os-partner:43517
BRANCH=none
TEST= build and booted Kunimitsu and tested RO mode
Change-Id: Ibf86ff2b140cd9ad259eb39987d78177535cd975
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 40ddc21a97b318510116b7d5c4314380778a40f7
Original-Change-Id: Ia52835f87ef580317e91931aee5dd0119dea8111
Original-Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/302257
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/12975
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/vendorcode/google/chromeos/vboot_common.c')
-rw-r--r-- | src/vendorcode/google/chromeos/vboot_common.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/vendorcode/google/chromeos/vboot_common.c b/src/vendorcode/google/chromeos/vboot_common.c index ac16382186..448aad6db0 100644 --- a/src/vendorcode/google/chromeos/vboot_common.c +++ b/src/vendorcode/google/chromeos/vboot_common.c @@ -77,6 +77,21 @@ int vboot_enable_recovery(void) return vboot_handoff_flag(VB_INIT_OUT_ENABLE_RECOVERY); } +int vboot_recovery_reason(void) +{ + struct vboot_handoff *vbho; + VbSharedDataHeader *sd; + + vbho = cbmem_find(CBMEM_ID_VBOOT_HANDOFF); + + if (vbho == NULL) + return 0; + + sd = (VbSharedDataHeader *)vbho->shared_data; + + return sd->recovery_reason; +} + void vboot_reboot(void) { if (IS_ENABLED(CONFIG_CONSOLE_CBMEM_DUMP_TO_UART)) |