summaryrefslogtreecommitdiff
path: root/src/arch/x86/acpigen.c
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@google.com>2018-05-07 14:26:59 -0700
committerPatrick Georgi <pgeorgi@google.com>2018-05-11 09:00:20 +0000
commitbeb2af4e3512e2f1c8445417ab2fcc90ef481124 (patch)
tree482c255d8591da7b982c2bbf5b2af400d8742a59 /src/arch/x86/acpigen.c
parentbae9f85ddbd2e62af1b47169cbfeb10b06d45e04 (diff)
downloadcoreboot-beb2af4e3512e2f1c8445417ab2fcc90ef481124.tar.xz
acpi: Add support for generating ACPI _UPC
This commit adds support for writing ACPI _UPC structures that help describe USB ports for the OS. This is a simple structure format which indicates what type of port it is and whether it is connectable. It should be paired with an ACPI _PLD structure to define USB ports for the OS. Change-Id: Ide3768f60f96e9ad7f919ad3fb11d91045dc174a Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/26170 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/arch/x86/acpigen.c')
-rw-r--r--src/arch/x86/acpigen.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/arch/x86/acpigen.c b/src/arch/x86/acpigen.c
index 10a4e1ee8f..867c809a45 100644
--- a/src/arch/x86/acpigen.c
+++ b/src/arch/x86/acpigen.c
@@ -1221,6 +1221,21 @@ void acpigen_write_return_string(const char *arg)
acpigen_write_string(arg);
}
+void acpigen_write_upc(enum acpi_upc_type type)
+{
+ acpigen_write_name("_UPC");
+ acpigen_write_package(4);
+ /* Connectable */
+ acpigen_write_byte(type == UPC_TYPE_UNUSED ? 0 : 0xff);
+ /* Type */
+ acpigen_write_byte(type);
+ /* Reserved0 */
+ acpigen_write_zero();
+ /* Reserved1 */
+ acpigen_write_zero();
+ acpigen_pop_len();
+}
+
void acpigen_write_dsm(const char *uuid, void (**callbacks)(void *),
size_t count, void *arg)
{