From 1a82923fd20a500d302c8df73414ce85141a327d Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Thu, 23 Apr 2020 11:11:05 -0700 Subject: arch/x86/acpigen: Add helpers for generating _ADR This change adds the following helpers: acpigen_write_ADR: Generates _ADR object using provided 64-bit address acpigen_write_ADR_pci_devfn: Generates _ADR object for PCI bus device using devfn as input. acpigen_write_ADR_pci_device: Generates _ADR object for PCI bus device using struct device * as input. BUG=b:153858769 Signed-off-by: Furquan Shaikh Change-Id: I139dfc30aa7db303c1e8bd4a8f9ee0933a60139b Reviewed-on: https://review.coreboot.org/c/coreboot/+/40670 Reviewed-by: Nico Huber Reviewed-by: Aaron Durbin Reviewed-by: Raul Rangel Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/arch/x86/include/arch/acpigen.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/arch/x86/include') diff --git a/src/arch/x86/include/arch/acpigen.h b/src/arch/x86/include/arch/acpigen.h index 4aba5f9024..0eee7ffea7 100644 --- a/src/arch/x86/include/arch/acpigen.h +++ b/src/arch/x86/include/arch/acpigen.h @@ -8,6 +8,7 @@ #include #include #include +#include /* Values that can be returned for ACPI Device _STA method */ #define ACPI_STATUS_DEVICE_PRESENT (1 << 0) @@ -369,6 +370,9 @@ void acpigen_write_return_singleton_buffer(uint8_t arg); void acpigen_write_return_byte(uint8_t arg); void acpigen_write_upc(enum acpi_upc_type type); void acpigen_write_pld(const struct acpi_pld *pld); +void acpigen_write_ADR(uint64_t adr); +void acpigen_write_ADR_pci_devfn(pci_devfn_t devfn); +void acpigen_write_ADR_pci_device(const struct device *dev); /* * Generate ACPI AML code for _DSM method. * This function takes as input uuid for the device, set of callbacks and -- cgit v1.2.3