diff options
author | Simon Glass <sjg@chromium.org> | 2020-07-07 13:11:53 -0600 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2020-07-17 14:32:24 +0800 |
commit | 3df33bda5c92a1a8b46b83ac9521fcf48a2fe50f (patch) | |
tree | 78e664ab09c487162a300f1add9b7a424271a7db /include | |
parent | 83b2bd5a74a4a07a738ba039afc3028d8df2f97d (diff) | |
download | u-boot-3df33bda5c92a1a8b46b83ac9521fcf48a2fe50f.tar.gz u-boot-3df33bda5c92a1a8b46b83ac9521fcf48a2fe50f.tar.xz u-boot-3df33bda5c92a1a8b46b83ac9521fcf48a2fe50f.zip |
acpi: Support writing a string
ACPI supports storing a simple null-terminated string. Add support for
this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/acpigen.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/acpi/acpigen.h b/include/acpi/acpigen.h index 9e52ec589f..14b96203a9 100644 --- a/include/acpi/acpigen.h +++ b/include/acpi/acpigen.h @@ -24,6 +24,7 @@ enum { BYTE_PREFIX = 0x0a, WORD_PREFIX = 0x0b, DWORD_PREFIX = 0x0c, + STRING_PREFIX = 0x0d, QWORD_PREFIX = 0x0e, PACKAGE_OP = 0x12, }; @@ -155,4 +156,13 @@ char *acpigen_write_package(struct acpi_ctx *ctx, int nr_el); */ void acpigen_write_integer(struct acpi_ctx *ctx, u64 data); +/** + * acpigen_write_string() - Write a string + * + * This writes a STRING_PREFIX followed by a null-terminated string + * + * @ctx: ACPI context pointer + * @str: String to write + */ +void acpigen_write_string(struct acpi_ctx *ctx, const char *str); #endif |