From 95bff2e17e8b9e84e588aeb9504e086174edd0b0 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Tue, 10 Dec 2019 14:12:03 +0100 Subject: superio/common: Add more ACPI methods * Make use of introduced SSDT config mode access * Make use of introduced SSDT mutex * Provide ACPI functions to safely access SIO config space * Implement method to query LDN enable state * Implement method to set LDN enable state * Use introduced functions to implement _DIS and _STA in the device * Update documentation Tested on Aspeed AST2500 and Linux 5.2. Manually verified ACPI code that generates no errors in Linux. Change-Id: I520b29de925f368cd71ff8f1f58d2d57d72eff8d Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/37640 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held --- Documentation/superio/common/ssdt.md | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'Documentation/superio/common') diff --git a/Documentation/superio/common/ssdt.md b/Documentation/superio/common/ssdt.md index f2bb3346a0..2f4049ef12 100644 --- a/Documentation/superio/common/ssdt.md +++ b/Documentation/superio/common/ssdt.md @@ -45,12 +45,33 @@ chip superio/common end ``` +## Automatically generated methods + +The following methods are generated for each SuperIO: +## AMTX() +Acquire the global mutex and enter config mode. +It's called this at the begining of an atomic operation to make sure +no other ACPI code messes with the config space while working on it. + +## RMTX() +Exit config mode and release the global mutex. +It's called at the end of an atomic operation. + +## SLDN(Arg0) +Selects the (virtual) LDN given as Arg0. +This method isn't guarded with the global mutex. + +## DLDN(Arg0) +Disables the (virtual) LDN given as Arg0. +This method aquires the global mutex. + +## QLDN(Arg0) +Queries the state of the (virtual) LDN given as Arg0. +This method quires the global mutex. + ## TODO 1) Add ACPI HIDs to every SuperIO driver -2) Don't guess ACPI HID of LDNs if it's known -3) Add "enter config" and "exit config" bytes -4) Generate support methods that allow +2) Generate support methods that allow * Setting resource settings at runtime * Getting resource settings at runtime - * Disabling LDNs at runtime -- cgit v1.2.3