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>
			
			
This commit is contained in:
		
				
					committed by
					
						
						Patrick Georgi
					
				
			
			
				
	
			
			
			
						parent
						
							08258881ed
						
					
				
				
					commit
					4929f43619
				
			@@ -1261,7 +1261,9 @@ void acpigen_write_pld(const struct acpi_pld *pld)
 | 
				
			|||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	acpigen_write_name("_PLD");
 | 
						acpigen_write_name("_PLD");
 | 
				
			||||||
 | 
						acpigen_write_package(1);
 | 
				
			||||||
	acpigen_write_byte_buffer(buf, ARRAY_SIZE(buf));
 | 
						acpigen_write_byte_buffer(buf, ARRAY_SIZE(buf));
 | 
				
			||||||
 | 
						acpigen_pop_len();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void acpigen_write_dsm(const char *uuid, void (**callbacks)(void *),
 | 
					void acpigen_write_dsm(const char *uuid, void (**callbacks)(void *),
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user