acpi: Add support for writing ACPI _PLD structures
This commit adds support for writing ACPI _PLD structures that describe the physical location of a device to the OS. This can be used by any device with a physical connector, but is required when defining USB ports for the OS. A simple function is provided that generates a generic _PLD structure for USB ports based on the USB port type. Change-Id: Ic9cf1fd158eca80ead21b4725b37ab3c36b000f3 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/26171 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
committed by
Patrick Georgi
parent
beb2af4e35
commit
3e7197a59e
@@ -1236,6 +1236,17 @@ void acpigen_write_upc(enum acpi_upc_type type)
|
||||
acpigen_pop_len();
|
||||
}
|
||||
|
||||
void acpigen_write_pld(const struct acpi_pld *pld)
|
||||
{
|
||||
uint8_t buf[20];
|
||||
|
||||
if (acpi_pld_to_buffer(pld, buf, ARRAY_SIZE(buf)) < 0)
|
||||
return;
|
||||
|
||||
acpigen_write_name("_PLD");
|
||||
acpigen_write_byte_buffer(buf, ARRAY_SIZE(buf));
|
||||
}
|
||||
|
||||
void acpigen_write_dsm(const char *uuid, void (**callbacks)(void *),
|
||||
size_t count, void *arg)
|
||||
{
|
||||
|
Reference in New Issue
Block a user