summaryrefslogtreecommitdiff
path: root/firmware/include/vboot_nvstorage.h
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2016-02-19 20:20:10 -0800
committerChromeOS bot <3su6n15k.default@developer.gserviceaccount.com>2016-02-24 15:48:46 +0000
commit37ae160e51581fd51f84ac478645251412f5ea86 (patch)
treef4174047ac384cafed9eb8255b9e62332646936e /firmware/include/vboot_nvstorage.h
parent1e3fe929dbb8c7104a50be5e013deec82922c609 (diff)
downloadvboot-37ae160e51581fd51f84ac478645251412f5ea86.tar.gz
vb2: Modify phase2 behavior for S3 resume case
If a platform does verification of memory init then it must be careful to use the same slot for resume that it booted from. This is accomplished by adding a context flag to indicate this is an S3 resume and that vboot should treat it differently than a normal boot. When this flag is set then the same slot that was booted is read from VBNV and re-used for the resume path, without adjusting any try flags. If this slot is B then the related context flag is set. This will allow the firmware updater to update the other (non-booted) slot and set flags indicating that on the next boot the updated slot should be tried, while still allowing suspend/resume to work with the existing firmware slot. This assumes that the last tried slot was successfully booted, which should be a safe assumption since the system was able to boot and then suspend. It isn't reliable to check last_fw_result for "success" status because that status is only set some time after boot when chromeos-setgoodkernel calls chromeos-firmwareupdate --mode=bootok and so it may still report a status of "trying" on resume depending on how soon after boot the suspend happened. It also avoids setting the vboot flag indicating that a slot choice was made in order to avoid altering the try counter on failure since this is explicitly not attempting to boot the new slot. BUG=chromium:577269 BRANCH=glados TEST=manually tested on chell: 1) ensure that booting from slot A resumes from slot A. 2) ensure that booting from slot B resumes from slot B. 3) do RW update while booted from slot A (so the flags are set to try slot B) and ensure that suspend/resume still functions properly using current slot A. 4) do RW update while booted from slot B (so the flags are set to try slot A) and ensure that suspend/resume still functions properly using current slot B. Change-Id: I500faef2b5d19a02f32839976354abf6d551c9f6 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Previous-Reviewed-on: https://chromium-review.googlesource.com/328812 (cherry picked from commit 19e70098fb0eafb61c8092781629630732c583e2) Reviewed-on: https://chromium-review.googlesource.com/329008
Diffstat (limited to 'firmware/include/vboot_nvstorage.h')
0 files changed, 0 insertions, 0 deletions