summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt Delco <delco@chromium.org>2019-01-30 11:40:44 -0800
committerPatrick Georgi <pgeorgi@google.com>2019-02-05 13:40:53 +0000
commit4929f4361936bcc994044dea5c79619746384d5e (patch)
treebef634fe041cbd82a6092d2965c0e90a55cb29d6 /src
parent08258881ed56e008366c9c242cd0e6ba14123de6 (diff)
downloadcoreboot-4929f4361936bcc994044dea5c79619746384d5e.tar.gz
coreboot-4929f4361936bcc994044dea5c79619746384d5e.tar.bz2
coreboot-4929f4361936bcc994044dea5c79619746384d5e.zip
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>
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/acpigen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/arch/x86/acpigen.c b/src/arch/x86/acpigen.c
index 290893d71913..0eacf05d8eb6 100644
--- a/src/arch/x86/acpigen.c
+++ b/src/arch/x86/acpigen.c
@@ -1261,7 +1261,9 @@ void acpigen_write_pld(const struct acpi_pld *pld)
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 *),