x86/mmcfg/drhd: Move acpi_mmcfg_init() call before calling acpi_parse_dmar()
authorZhenzhong Duan <zhenzhong.duan@oracle.com>
Tue, 28 Aug 2018 15:13:42 +0000 (17:13 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 28 Aug 2018 15:13:42 +0000 (17:13 +0200)
commitdcf417903bd17a8e26f1be771e4d2228f63a061c
tree8647a6905d13953c6dffd0980dcef065cae5b756
parente3a0b9ccf912c298920693a1a4de7f2df08c3f1a
x86/mmcfg/drhd: Move acpi_mmcfg_init() call before calling acpi_parse_dmar()

pci_conf_read8() needs pci mmcfg mapping to work on multiple pci
segments system such as HPE Superdome-Flex.

Move acpi_mmcfg_init() call in acpi_boot_init() before calling
acpi_parse_dmar() so that when pci_conf_read8() is called in
acpi_parse_dev_scope(), we already have the mapping set up.

mmio_ro_ranges initialization is also moved ahead as it's the only
dependency of pci_mmcfg_arch_enable() need to be moved. Also
checked codes between the old and new call sites to ensure we
don't break anything.

Furthermore MMCFG will continue to not work this early (or
more precisely not at all until Dom0 boot has progressed far
enough) if the range(s) isn't/aren't marked reserved in E820.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Tested-by: Gopalasetty, Manoj <manoj.gopalasetty@hpe.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/acpi/boot.c
xen/arch/x86/setup.c