diff options
author | Rizwan Qureshi <rizwan.qureshi@intel.com> | 2017-03-06 21:50:26 +0530 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-04-03 04:53:03 +0200 |
commit | aca4c94057850762ddd3c78e6e8cf9023e22a66a (patch) | |
tree | abc778553f890633e393afe14d93d995c20ca6c6 /src | |
parent | ee762fa42b2b99627627758c33fa66ebe7255433 (diff) |
arch/x86/acpigen: Allow writing buffers larger than 256 bytes
Currently only 256 bytes can be written at a time using the
acpigen_write_return_byte_buffer or acpigen_write_byte_buffer API's
and there can be cases where the buffer size can exceed this, hence
increase the number of bytes that can be written.
Change-Id: Ifaf508ae1d5c0eb2629ca112224bfeae1c644e58
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Signed-off-by: Sowmya V <v.sowmya@intel.com>
Reviewed-on: https://review.coreboot.org/18966
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/x86/acpigen.c | 8 | ||||
-rw-r--r-- | src/arch/x86/include/arch/acpigen.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/arch/x86/acpigen.c b/src/arch/x86/acpigen.c index 81a69ce8cb..d3aaa3d644 100644 --- a/src/arch/x86/acpigen.c +++ b/src/arch/x86/acpigen.c @@ -1146,13 +1146,13 @@ void acpigen_write_to_integer(uint8_t src, uint8_t dst) acpigen_emit_byte(dst); } -void acpigen_write_byte_buffer(uint8_t *arr, uint8_t size) +void acpigen_write_byte_buffer(uint8_t *arr, size_t size) { - uint8_t i; + size_t i; acpigen_emit_byte(BUFFER_OP); acpigen_write_len_f(); - acpigen_write_byte(size); + acpigen_write_integer(size); for (i = 0; i < size; i++) acpigen_emit_byte(arr[i]); @@ -1160,7 +1160,7 @@ void acpigen_write_byte_buffer(uint8_t *arr, uint8_t size) acpigen_pop_len(); } -void acpigen_write_return_byte_buffer(uint8_t *arr, uint8_t size) +void acpigen_write_return_byte_buffer(uint8_t *arr, size_t size) { acpigen_emit_byte(RETURN_OP); acpigen_write_byte_buffer(arr, size); diff --git a/src/arch/x86/include/arch/acpigen.h b/src/arch/x86/include/arch/acpigen.h index b08ce93536..f76fce8ffb 100644 --- a/src/arch/x86/include/arch/acpigen.h +++ b/src/arch/x86/include/arch/acpigen.h @@ -242,8 +242,8 @@ void acpigen_write_if_lequal_op_int(uint8_t op, uint64_t val); void acpigen_write_else(void); void acpigen_write_to_buffer(uint8_t src, uint8_t dst); void acpigen_write_to_integer(uint8_t src, uint8_t dst); -void acpigen_write_byte_buffer(uint8_t *arr, uint8_t size); -void acpigen_write_return_byte_buffer(uint8_t *arr, uint8_t size); +void acpigen_write_byte_buffer(uint8_t *arr, size_t size); +void acpigen_write_return_byte_buffer(uint8_t *arr, size_t size); void acpigen_write_return_singleton_buffer(uint8_t arg); void acpigen_write_return_byte(uint8_t arg); /* |