From 4929f4361936bcc994044dea5c79619746384d5e Mon Sep 17 00:00:00 2001 From: Matt Delco Date: Wed, 30 Jan 2019 11:40:44 -0800 Subject: 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 Reviewed-on: https://review.coreboot.org/c/31162 Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie Reviewed-by: Furquan Shaikh --- src/arch/x86/acpigen.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/arch/x86/acpigen.c') diff --git a/src/arch/x86/acpigen.c b/src/arch/x86/acpigen.c index 290893d719..0eacf05d8e 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 *), -- cgit v1.2.3