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>
This commit is contained in:
parent
b4ba289fa5
commit
7a94ad720e
|
@ -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);
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue