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>
This commit is contained in:
Rizwan Qureshi 2017-03-06 21:50:26 +05:30 committed by Martin Roth
parent ee762fa42b
commit aca4c94057
2 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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);
/*