[coreboot-gerrit] Change in coreboot[master]: arch/x86/acpigen: Allow writing buffers larger than 256 bytes

V Sowmya (Code Review) gerrit at coreboot.org
Fri Mar 24 12:11:44 CET 2017


Hello Rizwan Qureshi,

I'd like you to do a code review.  Please visit

    https://review.coreboot.org/18966

to review the following change.


Change subject: arch/x86/acpigen: Allow writing buffers larger than 256 bytes
......................................................................

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 at intel.com>
Signed-off-by: Sowmya V <v.sowmya at intel.com>
---
M src/arch/x86/acpigen.c
M src/arch/x86/include/arch/acpigen.h
2 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/66/18966/1

diff --git a/src/arch/x86/acpigen.c b/src/arch/x86/acpigen.c
index 81a69ce..c7ada6d 100644
--- a/src/arch/x86/acpigen.c
+++ b/src/arch/x86/acpigen.c
@@ -1146,13 +1146,13 @@
 	acpigen_emit_byte(dst);
 }
 
-void acpigen_write_byte_buffer(uint8_t *arr, uint8_t size)
+void acpigen_write_byte_buffer(uint8_t *arr, uint32_t size)
 {
-	uint8_t i;
+	uint32_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 @@
 	acpigen_pop_len();
 }
 
-void acpigen_write_return_byte_buffer(uint8_t *arr, uint8_t size)
+void acpigen_write_return_byte_buffer(uint8_t *arr, uint32_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 b08ce93..0581c1e 100644
--- a/src/arch/x86/include/arch/acpigen.h
+++ b/src/arch/x86/include/arch/acpigen.h
@@ -242,8 +242,8 @@
 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, uint32_t size);
+void acpigen_write_return_byte_buffer(uint8_t *arr, uint32_t size);
 void acpigen_write_return_singleton_buffer(uint8_t arg);
 void acpigen_write_return_byte(uint8_t arg);
 /*

-- 
To view, visit https://review.coreboot.org/18966
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifaf508ae1d5c0eb2629ca112224bfeae1c644e58
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: V Sowmya <v.sowmya at intel.com>
Gerrit-Reviewer: Aamir Bohra <aamir.bohra at intel.com>
Gerrit-Reviewer: Aaron Durbin <adurbin at chromium.org>
Gerrit-Reviewer: Balaji Manigandan <balaji.manigandan at intel.com>
Gerrit-Reviewer: Barnali Sarkar <barnali.sarkar at intel.com>
Gerrit-Reviewer: Duncan Laurie <dlaurie at chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan at google.com>
Gerrit-Reviewer: Naresh Solanki <naresh.solanki at intel.com>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi at intel.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik at intel.com>



More information about the coreboot-gerrit mailing list