diff options
author | Naresh G Solanki <naresh.solanki@intel.com> | 2016-11-16 10:10:09 +0530 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2016-11-17 09:52:54 +0100 |
commit | c70cc4d70d1205abe6bc7c06039f2b8443234709 (patch) | |
tree | ad13ebb0751bdcbe2910ce1f54dd0b94d6428518 /src | |
parent | d899318b78c1871d9c423ea7bb395655e5ab6d5e (diff) | |
download | coreboot-c70cc4d70d1205abe6bc7c06039f2b8443234709.tar.xz |
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 <naresh.solanki@intel.com>
Reviewed-on: https://review.coreboot.org/17444
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/x86/acpigen.c | 2 |
1 files changed, 1 insertions, 1 deletions
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]); |