From d1130af40e5570f9b74e0cf44c05fe1c6a4e46b2 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Thu, 23 Apr 2020 12:51:42 -0700 Subject: arch/x86/acpi_device: Add a helper function to write PCI device This change adds a helper function to write a PCI device with _ADR and _STA defined for it. BUG=b:153858769 Signed-off-by: Furquan Shaikh Change-Id: I932af917d91198876fe8e90af9bb7a2531bd8960 Reviewed-on: https://review.coreboot.org/c/coreboot/+/40674 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/arch/x86/include/arch/acpi_device.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/arch/x86/include') diff --git a/src/arch/x86/include/arch/acpi_device.h b/src/arch/x86/include/arch/acpi_device.h index e9c5cd4de2..362efc4a62 100644 --- a/src/arch/x86/include/arch/acpi_device.h +++ b/src/arch/x86/include/arch/acpi_device.h @@ -501,4 +501,13 @@ size_t acpi_dp_add_property_list(struct acpi_dp *dp, /* Write Device Property hierarchy and clean up resources */ void acpi_dp_write(struct acpi_dp *table); +/* + * Helper function to write a PCI device with _ADR object defined. + * + * IMPORTANT: Scope of a device created in SSDT cannot be used to add ACPI nodes under that + * scope in DSDT. So, if there are any references to this PCI device scope required from static + * asl files, do not use this function and instead add the device to DSDT as well. + */ +void acpi_device_write_pci_dev(struct device *dev); + #endif -- cgit v1.2.3