From c70cc4d70d1205abe6bc7c06039f2b8443234709 Mon Sep 17 00:00:00 2001 From: Naresh G Solanki Date: Wed, 16 Nov 2016 10:10:09 +0530 Subject: arch/x86/acpigen: acpigen buffer size fix In function definition of acpigen_write_byte_buffer, buffer size written using acpigen_emit_byte gives wrong results in generated AML code for buffer size greater than one. Write buffer size using acpigen_write_integer as per ACPI spec 5.0 section 20.2.5.4 BufferOp. Change-Id: I0dcb25b24a1b4b592ad820c95f7c2df67a016594 Signed-off-by: Naresh G Solanki Reviewed-on: https://review.coreboot.org/17444 Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/arch/x86/acpigen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/arch/x86/acpigen.c b/src/arch/x86/acpigen.c index 7115bdbcd7..31b8dac173 100644 --- a/src/arch/x86/acpigen.c +++ b/src/arch/x86/acpigen.c @@ -1143,7 +1143,7 @@ void acpigen_write_byte_buffer(uint8_t *arr, uint8_t size) acpigen_emit_byte(BUFFER_OP); acpigen_write_len_f(); - acpigen_emit_byte(size); + acpigen_write_byte(size); for (i = 0; i < size; i++) acpigen_emit_byte(arr[i]); -- cgit v1.2.3