diff options
author | Sugnan Prabhu S <sugnan.prabhu.s@intel.com> | 2020-06-10 09:51:02 +0530 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-07-07 14:44:55 +0000 |
commit | 4f77f61d2dc8088a710611936680228d00eabed4 (patch) | |
tree | cf3a316a82d3a9c1266907267ecef1f5b095f4e2 /src/acpi | |
parent | 879b3c195f6b441c88c768f0cff025128a54986d (diff) | |
download | coreboot-4f77f61d2dc8088a710611936680228d00eabed4.tar.xz |
acpi: add STA function to return external variable
This change adds support function to add STA function which returns an
external variable.
Change-Id: I31755a76ee985ee6059289ae194537d531270761
Signed-off-by: Sugnan Prabhu S <sugnan.prabhu.s@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42245
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/acpi')
-rw-r--r-- | src/acpi/acpigen.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/acpi/acpigen.c b/src/acpi/acpigen.c index fc6da1beb9..bf1b373a60 100644 --- a/src/acpi/acpigen.c +++ b/src/acpi/acpigen.c @@ -742,6 +742,17 @@ void acpigen_write_STA(uint8_t status) acpigen_pop_len(); } +void acpigen_write_STA_ext(const char *namestring) +{ + /* + * Method (_STA, 0, NotSerialized) { Return (ext_val) } + */ + acpigen_write_method("_STA", 0); + acpigen_emit_byte(RETURN_OP); + acpigen_emit_namestring(namestring); + acpigen_pop_len(); +} + /* * Generates a func with max supported P-states. */ |