vboot: fix CONFIG_RESUME_PATH_SAME_AS_BOOT S3 resume logic
- should not check VBOOT_STARTS_IN_BOOTBLOCK to set context flag - implement vboot_platform_is_resuming on platforms missing it - add ACPI_INTEL_HARDWARE_SLEEP_VALUES to two intel southbridges [ originally https://review.coreboot.org/c/coreboot/+/28750 ] BUG=b:114018226 TEST=compile coreboot Change-Id: I1ef0bcdfd01746198f8140f49698b58065d820b9 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://review.coreboot.org/29060 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
This commit is contained in:
committed by
Philipp Deppenwiese
parent
c5d0a2ea1f
commit
1d93b88af2
@@ -14,13 +14,16 @@
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <arch/io.h>
|
||||
#include <device/device.h>
|
||||
#include <device/pci.h>
|
||||
#include <arch/early_variables.h>
|
||||
#include <assert.h>
|
||||
#include <security/vboot/vboot_common.h>
|
||||
|
||||
#include "pmbase.h"
|
||||
#include "pmutil.h"
|
||||
|
||||
/* LPC PM Base Address Register */
|
||||
#define PMBASE 0x40
|
||||
@@ -91,3 +94,13 @@ u8 read_pmbase8(const u8 addr)
|
||||
|
||||
return inb(lpc_get_pmbase() + addr);
|
||||
}
|
||||
|
||||
int vboot_platform_is_resuming(void)
|
||||
{
|
||||
u16 reg16 = read_pmbase16(PM1_STS);
|
||||
|
||||
if (!(reg16 & WAK_STS))
|
||||
return 0;
|
||||
|
||||
return acpi_sleep_from_pm1(reg16) == ACPI_S3;
|
||||
}
|
||||
|
@@ -17,6 +17,8 @@
|
||||
#ifndef INTEL_COMMON_PMUTIL_H
|
||||
#define INTEL_COMMON_PMUTIL_H
|
||||
|
||||
#include <cpu/x86/smm.h>
|
||||
|
||||
#define D31F0_PMBASE 0x40
|
||||
#define D31F0_GEN_PMCON_3 0xa4
|
||||
#define D31F0_GPIO_ROUT 0xb8
|
||||
|
@@ -1,4 +1,5 @@
|
||||
config SOUTHBRIDGE_INTEL_I82371EB
|
||||
select ACPI_INTEL_HARDWARE_SLEEP_VALUES
|
||||
select SOUTHBRIDGE_INTEL_COMMON
|
||||
select SOUTHBRIDGE_INTEL_COMMON_SMBUS
|
||||
bool
|
||||
|
@@ -28,6 +28,7 @@ config SOUTHBRIDGE_INTEL_I82801JX
|
||||
select SOUTHBRIDGE_INTEL_COMMON_GPIO
|
||||
select INTEL_DESCRIPTOR_MODE_CAPABLE
|
||||
select COMMON_FADT
|
||||
select ACPI_INTEL_HARDWARE_SLEEP_VALUES
|
||||
|
||||
if SOUTHBRIDGE_INTEL_I82801JX
|
||||
|
||||
|
Reference in New Issue
Block a user