diff options
author | Duncan Laurie <dlaurie@chromium.org> | 2016-05-09 08:17:02 -0700 |
---|---|---|
committer | Duncan Laurie <dlaurie@google.com> | 2016-05-16 19:51:58 +0200 |
commit | 56b69aa9c7d5628dec0d6345c29fb0a1cfeae9fc (patch) | |
tree | 366745b37a22ec6f849137e33fa9d07b6a7ba92a /src/arch/x86/include | |
parent | 9ccae7558d41daa84240c93fd9aeec59171c3f9e (diff) | |
download | coreboot-56b69aa9c7d5628dec0d6345c29fb0a1cfeae9fc.tar.xz |
acpigen: Add helper functions for strings
Add helper function to emit a string into the SSDT AML bytestream with a
NULL terminator. Also add a helper function to emit the string OpCode
followed by the string itself.
acpigen_emit_string(string) /* Raw string output */
acpigen_write_string(string) /* OpCode followed by raw string */
Change-Id: I4a3a8728066e0c41d7ad6429fad983e6ae6962fe
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/14793
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/arch/x86/include')
-rw-r--r-- | src/arch/x86/include/arch/acpigen.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/arch/x86/include/arch/acpigen.h b/src/arch/x86/include/arch/acpigen.h index 9323475dfd..f718f51b25 100644 --- a/src/arch/x86/include/arch/acpigen.h +++ b/src/arch/x86/include/arch/acpigen.h @@ -32,12 +32,15 @@ void acpigen_emit_byte(unsigned char data); void acpigen_emit_word(unsigned int data); void acpigen_emit_dword(unsigned int data); void acpigen_emit_stream(const char *data, int size); +void acpigen_emit_string(const char *string); void acpigen_emit_namestring(const char *namepath); void acpigen_emit_eisaid(const char *eisaid); void acpigen_write_word(unsigned int data); void acpigen_write_dword(unsigned int data); void acpigen_write_qword(uint64_t data); +void acpigen_write_string(const char *string); void acpigen_write_name(const char *name); +void acpigen_write_name_string(const char *name, const char *string); void acpigen_write_name_dword(const char *name, uint32_t val); void acpigen_write_name_qword(const char *name, uint64_t val); void acpigen_write_name_byte(const char *name, uint8_t val); |