Lean Sheng Tan has submitted this change. ( https://review.coreboot.org/c/coreboot/+/74421 )
Change subject: mb/prodrive/atlas: Enable/disable sleep states based on EC ......................................................................
mb/prodrive/atlas: Enable/disable sleep states based on EC
With the profile ATLAS_PROF_REALTIME_PERFORMANCE it is desired to not have the option to be able to enter sleep. The reason is that Microsoft Windows goes to sleep after 30min of inactivity by default.
TEST: See that Microsoft Windows 11 has no 'Sleep' option in the start menu.
Change-Id: I424db7e712a705c628aa3a10a486d3313404987a Signed-off-by: Arthur Heymans arthur@aheymans.xyz Reviewed-on: https://review.coreboot.org/c/coreboot/+/74421 Reviewed-by: Nico Huber nico.h@gmx.de Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Lean Sheng Tan sheng.tan@9elements.com --- M src/mainboard/prodrive/atlas/mainboard.c 1 file changed, 32 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, but someone else must approve Lean Sheng Tan: Looks good to me, approved
diff --git a/src/mainboard/prodrive/atlas/mainboard.c b/src/mainboard/prodrive/atlas/mainboard.c index db808ce..0128670 100644 --- a/src/mainboard/prodrive/atlas/mainboard.c +++ b/src/mainboard/prodrive/atlas/mainboard.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <acpi/acpigen.h> #include <console/console.h> #include <device/device.h> #include <gpio.h> @@ -66,9 +67,19 @@ t->count = smbios_add_string(t->eos, get_formatted_pn()); }
+static void mainboard_fill_ssdt(const struct device *dev) +{ + const struct emi_eeprom_vpd *eeprom = get_emi_eeprom_vpd(); + const bool sleep_enable = eeprom->profile != ATLAS_PROF_REALTIME_PERFORMANCE ? 1 : 0; + acpigen_ssdt_override_sleep_states(false, false, + CONFIG(HAVE_ACPI_RESUME) && sleep_enable, + sleep_enable); +} + static void mainboard_enable(struct device *dev) { dev->ops->get_smbios_strings = mainboard_smbios_strings; + dev->ops->acpi_fill_ssdt = mainboard_fill_ssdt; }
struct chip_operations mainboard_ops = {