acpigen: Add a runtime method to override exposed _Sx sleep states

This allows mainboards to override available sleep states at runtime.
This is done by adding a IntObj in SSDT that DSDT consumes to override
the available _Sx states.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: Ic21830c1ef9c183b1e3005cc1f8b7daf7e9ea998
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74762
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Jakub Czapiga <jacz@semihalf.com>
Reviewed-by: Jan Samek <jan.samek@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
This commit is contained in:
Arthur Heymans
2023-04-25 16:23:37 +02:00
committed by Lean Sheng Tan
parent cd48c7ece3
commit 0eb5974def
3 changed files with 23 additions and 0 deletions

View File

@@ -695,4 +695,8 @@ void acpigen_resource_qword(u16 res_type, u16 gen_flags, u16 type_flags,
/* Emits Notify(namestr, value) */
void acpigen_notify(const char *namestr, int value);
/* Create a namespace \OSFG to override the enabled sleep states */
void acpigen_ssdt_override_sleep_states(bool enable_s1, bool enable_s2, bool enable_s3,
bool enable_s4);
#endif /* __ACPI_ACPIGEN_H__ */