diff options
author | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2022-02-11 09:46:15 -0700 |
---|---|---|
committer | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2022-02-28 18:50:13 +0000 |
commit | 7a94ad720e6915d6ed1967d154cdc9324561aeb9 (patch) | |
tree | c1956b6c089422094b2d5752662d117312bcd7fb /src | |
parent | b4ba289fa5be16f3d94a0da30fc9b07a99a61a91 (diff) | |
download | coreboot-7a94ad720e6915d6ed1967d154cdc9324561aeb9.tar.gz coreboot-7a94ad720e6915d6ed1967d154cdc9324561aeb9.tar.bz2 coreboot-7a94ad720e6915d6ed1967d154cdc9324561aeb9.zip |
soc/intel/common/block/acpi: Return existing Object for _DSM subfunction
Currently the LPIT Get Constraints _DSM subfunction returns a package
containing the path to a nonexistent device (\NULL). This is used to
work around an issue with Windows, where returning an empty package will
cause a BSOD. However, using this non-existent device can also cause
confusion, as on Linux, it shows an error in dmesg, e.g.
ACPI Error: AE_NOT_FOUND, While resolving a named reference package
element - \NULL (20200925/dspkginit-438)
Therefore, this patch modifies this returned package slightly to include
the path to ACPI_CPU_STRING for CPU 0, which should always be emitted on
Intel platforms that use the PEP driver.
Tested on google/brya0 on ChromeOS 5.10 kernel
Tested with current Windows 11 ISO
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: If74a1620ff0de33bcdba06e1225c5e28c64253e1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61868
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Shobhit Srivastava <shobhit.srivastava@intel.corp-partner.google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/intel/common/block/acpi/pep.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/soc/intel/common/block/acpi/pep.c b/src/soc/intel/common/block/acpi/pep.c index 8419a331f4b9..c7f1270b36f4 100644 --- a/src/soc/intel/common/block/acpi/pep.c +++ b/src/soc/intel/common/block/acpi/pep.c @@ -70,15 +70,19 @@ static void read_pmc_lpm_requirements(const struct soc_pmc_lpm *lpm, } /* - * For now there is only one disabled non-existent device, because Windows - * expects at least one device and crashes without it with a bluescreen - * (`INTERNAL_POWER_ERROR`). Returning an empty package does not work. + * Windows expects a non-empty package for this subfunction, otherwise it + * results in a bluescreen (`INTERNAL_POWER_ERROR`); returning an empty package + * does not work. To workaround this, return a package describing a single + * 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) { + char path[16]; + /* * Return (Package() { - * Package() { "\NULL", 0, + * Package() { "\_SB.CP00", 0, * Package() { 0, * Package() { 0xff, 0 }}}}) */ @@ -87,7 +91,8 @@ static void lpi_get_constraints(void *unused) { acpigen_write_package(3); { - acpigen_emit_namestring("\\NULL"); + snprintf(path, sizeof(path), CONFIG_ACPI_CPU_STRING, 0); + acpigen_emit_namestring(path); acpigen_write_integer(0); /* device disabled */ acpigen_write_package(2); { |