summaryrefslogtreecommitdiff
path: root/src/acpi/acpigen.c
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@google.com>2020-09-30 23:17:41 +0000
committerDuncan Laurie <dlaurie@chromium.org>2020-10-21 22:24:03 +0000
commit8e391d3452902ac1a71124118e811eaf378d0779 (patch)
treef5890e7d042dbf48b26580da3637cd61367cd0c2 /src/acpi/acpigen.c
parent095bbf969d47a06388be65e944352f1936c4e1f2 (diff)
acpigen: Add helpers for common Store operations
Add helpers for some store operations: Store(INTEGER, NAME) ex: Store (100, SAVE) Store(INTEGER, OP) ex: Store (100, Local0) Change-Id: Ia1b3f451acbfb2fc50180a8dcd96db24d330c946 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46255 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/acpi/acpigen.c')
-rw-r--r--src/acpi/acpigen.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/acpi/acpigen.c b/src/acpi/acpigen.c
index a3beb1054f..ee7c90cf01 100644
--- a/src/acpi/acpigen.c
+++ b/src/acpi/acpigen.c
@@ -1243,6 +1243,22 @@ void acpigen_write_store_op_to_namestr(uint8_t src, const char *dst)
acpigen_emit_namestring(dst);
}
+/* Store (src, "namestr") */
+void acpigen_write_store_int_to_namestr(uint64_t src, const char *dst)
+{
+ acpigen_write_store();
+ acpigen_write_integer(src);
+ acpigen_emit_namestring(dst);
+}
+
+/* Store (src, dst) */
+void acpigen_write_store_int_to_op(uint64_t src, uint8_t dst)
+{
+ acpigen_write_store();
+ acpigen_write_integer(src);
+ acpigen_emit_byte(dst);
+}
+
/* Or (arg1, arg2, res) */
void acpigen_write_or(uint8_t arg1, uint8_t arg2, uint8_t res)
{