acpi: Extract crs build form acpi_build.c
commit37d5c0a8ff812682c50865cd314348611319d872
authorYubo Miao <miaoyubo@huawei.com>
Thu, 19 Nov 2020 01:48:36 +0000 (19 09:48 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 8 Dec 2020 18:48:57 +0000 (8 13:48 -0500)
tree7dd6b33dce6a5a1a766641bd9a9177d61effda87
parent09fad16744480938543c0e39cfbaecbbd162c39b
acpi: Extract crs build form acpi_build.c

Extract crs build form acpi_build.c, the function could also be used
to build the crs for pxbs for arm. The resources are composed by two parts:
1. The bar space of pci-bridge/pcie-root-ports
2. The resources needed by devices behind PXBs.
The base and limit of memory/io are obtained from the config via two APIs:
pci_bridge_get_base and pci_bridge_get_limit

Signed-off-by: Yubo Miao <miaoyubo@huawei.com>
Signed-off-by: Jiahui Cen <cenjiahui@huawei.com>
Message-Id: <20201119014841.7298-5-cenjiahui@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/acpi/aml-build.c
hw/i386/acpi-build.c
include/hw/acpi/aml-build.h