Sugnan Prabhu S has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/42245 )
Change subject: acpi: add STA function to return external variable ......................................................................
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 --- M src/acpi/acpigen.c M src/include/acpi/acpigen.h 2 files changed, 12 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/42245/1
diff --git a/src/acpi/acpigen.c b/src/acpi/acpigen.c index 7a507d6..1fd4662 100644 --- a/src/acpi/acpigen.c +++ b/src/acpi/acpigen.c @@ -742,6 +742,17 @@ acpigen_pop_len(); }
+void acpigen_write_STA_ext(const char *ext_val) +{ + /* + * Method (_STA, 0, NotSerialized) { Return (ext_val) } + */ + acpigen_write_method("_STA", 0); + acpigen_emit_byte(RETURN_OP); + acpigen_emit_namestring(ext_val); + acpigen_pop_len(); +} + /* * Generates a func with max supported P-states. */ diff --git a/src/include/acpi/acpigen.h b/src/include/acpi/acpigen.h index 565abcf..4c26464 100644 --- a/src/include/acpi/acpigen.h +++ b/src/include/acpi/acpigen.h @@ -319,6 +319,7 @@ void acpigen_write_empty_PTC(void); void acpigen_write_PRW(u32 wake, u32 level); void acpigen_write_STA(uint8_t status); +void acpigen_write_STA_ext(const char *ext_val); void acpigen_write_TPC(const char *gnvs_tpc_limit); void acpigen_write_PSS_package(u32 coreFreq, u32 power, u32 transLat, u32 busmLat, u32 control, u32 status);
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42245 )
Change subject: acpi: add STA function to return external variable ......................................................................
Patch Set 2: Code-Review+1
Hello build bot (Jenkins), Paul Menzel,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/42245
to look at the new patch set (#4).
Change subject: acpi: add STA function to return external variable ......................................................................
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 --- M src/acpi/acpigen.c M src/include/acpi/acpigen.h 2 files changed, 12 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/42245/4
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42245 )
Change subject: acpi: add STA function to return external variable ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42245/6/src/acpi/acpigen.c File src/acpi/acpigen.c:
https://review.coreboot.org/c/coreboot/+/42245/6/src/acpi/acpigen.c@745 PS6, Line 745: ext_val nit: namestring
Hello build bot (Jenkins), Tim Wawrzynczak, Rizwan Qureshi, Paul Menzel,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/42245
to look at the new patch set (#7).
Change subject: acpi: add STA function to return external variable ......................................................................
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 --- M src/acpi/acpigen.c M src/include/acpi/acpigen.h 2 files changed, 12 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/42245/7
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42245 )
Change subject: acpi: add STA function to return external variable ......................................................................
Patch Set 9: Code-Review+2
Sugnan Prabhu S has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42245 )
Change subject: acpi: add STA function to return external variable ......................................................................
Patch Set 10:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42245/6/src/acpi/acpigen.c File src/acpi/acpigen.c:
https://review.coreboot.org/c/coreboot/+/42245/6/src/acpi/acpigen.c@745 PS6, Line 745: ext_val
nit: namestring
Done
Hello build bot (Jenkins), Tim Wawrzynczak, Rizwan Qureshi, Paul Menzel,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/42245
to look at the new patch set (#14).
Change subject: acpi: add STA function to return external variable ......................................................................
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 --- M src/acpi/acpigen.c M src/include/acpi/acpigen.h 2 files changed, 12 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/42245/14
Rizwan Qureshi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42245 )
Change subject: acpi: add STA function to return external variable ......................................................................
Patch Set 20: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/42245 )
Change subject: acpi: add STA function to return external variable ......................................................................
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 --- M src/acpi/acpigen.c M src/include/acpi/acpigen.h 2 files changed, 12 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Rizwan Qureshi: Looks good to me, approved Tim Wawrzynczak: Looks good to me, approved
diff --git a/src/acpi/acpigen.c b/src/acpi/acpigen.c index fc6da1b..bf1b373 100644 --- a/src/acpi/acpigen.c +++ b/src/acpi/acpigen.c @@ -742,6 +742,17 @@ 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. */ diff --git a/src/include/acpi/acpigen.h b/src/include/acpi/acpigen.h index dffde85..701e44ba 100644 --- a/src/include/acpi/acpigen.h +++ b/src/include/acpi/acpigen.h @@ -319,6 +319,7 @@ void acpigen_write_empty_PTC(void); void acpigen_write_PRW(u32 wake, u32 level); void acpigen_write_STA(uint8_t status); +void acpigen_write_STA_ext(const char *namestring); void acpigen_write_TPC(const char *gnvs_tpc_limit); void acpigen_write_PSS_package(u32 coreFreq, u32 power, u32 transLat, u32 busmLat, u32 control, u32 status);