Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/25999
Change subject: [WIP]acpigen: Always return buffer with requested size ......................................................................
[WIP]acpigen: Always return buffer with requested size
Pad a buffer with zero bytes to return the exact requested size. Might be requied for nouveau.
Needs test on real hardware.
Change-Id: I3f0ecc42a21945f66eb67f73e511bd516acf0fa9 Signed-off-by: Patrick Rudolph siro@das-labor.org --- M src/arch/x86/acpigen.c 1 file changed, 10 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/25999/1
diff --git a/src/arch/x86/acpigen.c b/src/arch/x86/acpigen.c index fc6cc66..d73f03a 100644 --- a/src/arch/x86/acpigen.c +++ b/src/arch/x86/acpigen.c @@ -1340,6 +1340,8 @@ * Store (0x1000, Local1) * } * + * Store (Local1, Local3) + * * If (LGreater (Local0, 0x10000)) * { * Return(Buffer(Local1){0}) @@ -1354,7 +1356,7 @@ * } * } * - * Name (ROM1, Buffer (Local1) {0}) + * Name (ROM1, Buffer (Local3) {0}) * * Multiply (Local0, 0x08, Local0) * Multiply (Local1, 0x08, Local1) @@ -1416,6 +1418,11 @@ /* Pop if */ acpigen_pop_len();
+ /* Store (Local1, Local3) */ + acpigen_write_store(); + acpigen_emit_byte(LOCAL1_OP); + acpigen_emit_byte(LOCAL3_OP); + /* If (LGreater (Local0, length)) */ acpigen_write_if(); acpigen_emit_byte(LGREATER_OP); @@ -1462,11 +1469,11 @@ /* Pop if */ acpigen_pop_len();
- /* Name (ROM1, Buffer (Local1) {0}) */ + /* Name (ROM1, Buffer (Local3) {0}) */ acpigen_write_name("ROM1"); acpigen_emit_byte(BUFFER_OP); acpigen_write_len_f(); - acpigen_emit_byte(LOCAL1_OP); + acpigen_emit_byte(LOCAL3_OP); acpigen_emit_byte(0); acpigen_pop_len();