Matt Delco has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31162
Change subject: arch/x86/acpigen: wrap _PLD in a package ......................................................................
arch/x86/acpigen: wrap _PLD in a package
The ACPI spec has an asl example for _PLD in the form:
Name (_PLD, Package (0x01) { ToPLD (PLD_Revision = 0x2) })
When I ported this to acpigen and diffed the results I noticed that the binary blob was no longer provided within a package. The ACPI spec (section 6.1.8 in version 6.2) defines _PLD as "a variable-length Package containing a list of Buffers". This commit changes acpigen_write_pld to use a package (the one existing caller I found isn't wrapping the result in a package so it doesn't look like it was intended for the callers of acpigen_write_pld to be responsible for using a package.
BUG=none BRANCH=none TEST=Verified that after this change a package is use and the result of acpigen matches what was used in the original asl.
Change-Id: Ie2db63c976100109bfe976553e52565fb2d2d9df Signed-off-by: Matt Delco delco@chromium.org --- M src/arch/x86/acpigen.c 1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/62/31162/1
diff --git a/src/arch/x86/acpigen.c b/src/arch/x86/acpigen.c index 290893d..0eacf05 100644 --- a/src/arch/x86/acpigen.c +++ b/src/arch/x86/acpigen.c @@ -1261,7 +1261,9 @@ return;
acpigen_write_name("_PLD"); + acpigen_write_package(1); acpigen_write_byte_buffer(buf, ARRAY_SIZE(buf)); + acpigen_pop_len(); }
void acpigen_write_dsm(const char *uuid, void (**callbacks)(void *),
Duncan Laurie has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31162 )
Change subject: arch/x86/acpigen: wrap _PLD in a package ......................................................................
Patch Set 1: Code-Review+2
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31162 )
Change subject: arch/x86/acpigen: wrap _PLD in a package ......................................................................
Patch Set 1: Code-Review+2
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/31162 )
Change subject: arch/x86/acpigen: wrap _PLD in a package ......................................................................
arch/x86/acpigen: wrap _PLD in a package
The ACPI spec has an asl example for _PLD in the form:
Name (_PLD, Package (0x01) { ToPLD (PLD_Revision = 0x2) })
When I ported this to acpigen and diffed the results I noticed that the binary blob was no longer provided within a package. The ACPI spec (section 6.1.8 in version 6.2) defines _PLD as "a variable-length Package containing a list of Buffers". This commit changes acpigen_write_pld to use a package (the one existing caller I found isn't wrapping the result in a package so it doesn't look like it was intended for the callers of acpigen_write_pld to be responsible for using a package.
BUG=none BRANCH=none TEST=Verified that after this change a package is use and the result of acpigen matches what was used in the original asl.
Change-Id: Ie2db63c976100109bfe976553e52565fb2d2d9df Signed-off-by: Matt Delco delco@chromium.org Reviewed-on: https://review.coreboot.org/c/31162 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Duncan Laurie dlaurie@chromium.org Reviewed-by: Furquan Shaikh furquan@google.com --- M src/arch/x86/acpigen.c 1 file changed, 2 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Duncan Laurie: Looks good to me, approved Furquan Shaikh: Looks good to me, approved
diff --git a/src/arch/x86/acpigen.c b/src/arch/x86/acpigen.c index 290893d..0eacf05 100644 --- a/src/arch/x86/acpigen.c +++ b/src/arch/x86/acpigen.c @@ -1261,7 +1261,9 @@ return;
acpigen_write_name("_PLD"); + acpigen_write_package(1); acpigen_write_byte_buffer(buf, ARRAY_SIZE(buf)); + acpigen_pop_len(); }
void acpigen_write_dsm(const char *uuid, void (**callbacks)(void *),