diff options
author | Duncan Laurie <dlaurie@chromium.org> | 2016-05-09 08:20:38 -0700 |
---|---|---|
committer | Duncan Laurie <dlaurie@google.com> | 2016-05-16 19:55:33 +0200 |
commit | f7c3876c28634a70390edeb527c865516444e627 (patch) | |
tree | 4c40d325e89b74c250cca0bc0bd2709b09dfa838 /src/arch/x86/include | |
parent | 56b69aa9c7d5628dec0d6345c29fb0a1cfeae9fc (diff) |
acpigen: Add an abstracted integer output method
In order to produce smaller AML and not rely on the caller to size the
output type appropriately add a helper function that will output an
appropriately sized integer.
To complete this also add helper functions for outputting the single
OpCode for Zero and One and Ones.
And finally add "name" variants of the helpers that will output a
complete sequence like "Name (_UID, Zero)".
Change-Id: I7ee4bc0a6347d15b8d49df357845a8bc2e517407
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/14794
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/arch/x86/include')
-rw-r--r-- | src/arch/x86/include/arch/acpigen.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/arch/x86/include/arch/acpigen.h b/src/arch/x86/include/arch/acpigen.h index f718f51b25..25551649e9 100644 --- a/src/arch/x86/include/arch/acpigen.h +++ b/src/arch/x86/include/arch/acpigen.h @@ -27,6 +27,9 @@ void acpigen_pop_len(void); void acpigen_set_current(char *curr); char *acpigen_get_current(void); void acpigen_write_package(int nr_el); +void acpigen_write_zero(void); +void acpigen_write_one(void); +void acpigen_write_ones(void); void acpigen_write_byte(unsigned int data); void acpigen_emit_byte(unsigned char data); void acpigen_emit_word(unsigned int data); @@ -38,12 +41,16 @@ 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_integer(uint64_t data); void acpigen_write_string(const char *string); void acpigen_write_name(const char *name); +void acpigen_write_name_zero(const char *name); +void acpigen_write_name_one(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); +void acpigen_write_name_integer(const char *name, uint64_t val); void acpigen_write_scope(const char *name); void acpigen_write_method(const char *name, int nargs); void acpigen_write_device(const char *name); |