arch/x86/acpigen: Add helpers for generating _ADR
commit1a82923fd20a500d302c8df73414ce85141a327d
authorFurquan Shaikh <furquan@google.com>
Thu, 23 Apr 2020 18:11:05 +0000 (23 11:11 -0700)
committerFurquan Shaikh <furquan@google.com>
Mon, 27 Apr 2020 18:56:34 +0000 (27 18:56 +0000)
tree07768031fce0b99e80c1a56cd5729219e448173d
parent2f7f0c62fdacde2b7960c58f8608066f23a8c79b
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 <furquan@google.com>
Change-Id: I139dfc30aa7db303c1e8bd4a8f9ee0933a60139b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40670
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
src/arch/x86/acpigen.c
src/arch/x86/include/arch/acpigen.h