From c66ea98577681f6eded53ca56a7ba945d2a18e31 Mon Sep 17 00:00:00 2001 From: Tarun Tuli Date: Tue, 3 May 2022 20:35:47 +0000 Subject: soc/intel/alderlake: provide a list of D-states to enter LPM Implement sub-function 1 (Get Device Constraints) of the Low Power S0 Idle Device-Specific Method (_DSM). This provides a way in which to describe various devices required D-states to enter LPM (S0ix). The information can be used to help in diagnostics and understanding of S0ix entry failure. Values were derived from Intel document 595644 (rev 0.45) and the ADL FSP sample ASL. This implementation adds support for ADL. Other SoC's could be ported to be included as well. If they aren't, they will default to the existing behavior of a single hardcoded device to ensure compatibility with Windows. TEST=Built and tested on brya by verifying SSDT contents Change-Id: Ibe46a0583c522a8adf0a015cd3a698f694482437 Signed-off-by: Tarun Tuli Reviewed-on: https://review.coreboot.org/c/coreboot/+/63969 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak Reviewed-by: Lance Zhao --- src/soc/intel/common/block/acpi/pep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/soc/intel/common/block/acpi/pep.c') diff --git a/src/soc/intel/common/block/acpi/pep.c b/src/soc/intel/common/block/acpi/pep.c index 8028b8147c..21e3d35753 100644 --- a/src/soc/intel/common/block/acpi/pep.c +++ b/src/soc/intel/common/block/acpi/pep.c @@ -77,9 +77,10 @@ static void read_pmc_lpm_requirements(const struct soc_pmc_lpm *lpm, * device, one that is known to exist, i.e. ACPI_CPU_STRING. expects at least * one device and crashes without it with a bluescreen. */ -static void lpi_get_constraints(void *unused) +__weak void soc_lpi_get_constraints(void *unused) { char path[16]; + printk(BIOS_INFO, "Returning default LPI constraint package\n"); /* * Return (Package() { @@ -183,7 +184,7 @@ static void lpi_display_off(void *unused) static void (*lpi_s0_helpers[])(void *) = { NULL, /* enumerate functions (autogenerated) */ - lpi_get_constraints, /* get device constraints */ + soc_lpi_get_constraints,/* get device constraints */ NULL, /* get crash dump device */ lpi_display_off, /* display off notify */ lpi_display_on, /* display on notify */ -- cgit v1.2.3