mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
UPSTREAM: intel/apollolake: Set sleep type to S5 on vboot reboot request
Add support for vboot_platform_prepare_reboot which is called whenever vboot requests reboot of the platform. SLP_TYPE needs to be set to S5 in such conditions since the platform would no longer be in a resuming state after reset. Change-Id: I01392bfda90c9274cd52c1004555d250b1d539b7 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/15340 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/356464 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
This commit is contained in:
parent
02480795af
commit
803d00634d
1 changed files with 13 additions and 0 deletions
|
@ -399,3 +399,16 @@ void global_reset_enable(bool enable)
|
|||
reg = enable ? reg | CF9_GLB_RST : reg & ~CF9_GLB_RST;
|
||||
write32((void *)etr, reg);
|
||||
}
|
||||
|
||||
/*
|
||||
* The PM1 control is set to S5 when vboot requests a reboot because the power
|
||||
* state code above may not have collected its data yet. Therefore, set it to
|
||||
* S5 when vboot requests a reboot. That's necessary if vboot fails in the
|
||||
* resume path and requests a reboot. This prevents a reboot loop where the
|
||||
* error is continually hit on the failing vboot resume path.
|
||||
*/
|
||||
void vboot_platform_prepare_reboot(void)
|
||||
{
|
||||
const uint16_t port = ACPI_PMIO_BASE + PM1_CNT;
|
||||
outl((inl(port) & ~(SLP_TYP)) | (SLP_TYP_S5 << SLP_TYP_SHIFT), port);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue