summaryrefslogtreecommitdiffstats
path: root/hw/arm
diff options
context:
space:
mode:
authorWei Yang2019-03-15 12:12:29 +0100
committerPeter Maydell2019-03-15 12:12:29 +0100
commitdeb224bc72287383655f86a13b934477c1e5c10d (patch)
treea858e156cbede6bdd59fae36d80fc66883c6316f /hw/arm
parenttarget/arm: change arch timer registers access permission (diff)
downloadqemu-deb224bc72287383655f86a13b934477c1e5c10d.tar.gz
qemu-deb224bc72287383655f86a13b934477c1e5c10d.tar.xz
qemu-deb224bc72287383655f86a13b934477c1e5c10d.zip
hw/arm/virt-acpi-build: use PCIE_MMCFG_BUS to retrieve end_bus_number
This is more proper to use PCIE_MMCFG_BUS to retrieve end_bus_number. Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-id: 20190312074953.16671-1-richardw.yang@linux.intel.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm')
-rw-r--r--hw/arm/virt-acpi-build.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index aa02d8d74e..bf9c0bc2f4 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -560,8 +560,8 @@ build_mcfg(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
/* Only a single allocation so no need to play with segments */
mcfg->allocation[0].pci_segment = cpu_to_le16(0);
mcfg->allocation[0].start_bus_number = 0;
- mcfg->allocation[0].end_bus_number = (memmap[ecam_id].size
- / PCIE_MMCFG_SIZE_MIN) - 1;
+ mcfg->allocation[0].end_bus_number =
+ PCIE_MMCFG_BUS(memmap[ecam_id].size - 1);
build_header(linker, table_data, (void *)(table_data->data + mcfg_start),
"MCFG", table_data->len - mcfg_start, 1, NULL, NULL);