OvmfPkg/PlatformBootManagerLib: hoist PciAcpiInitialization()
authorLaszlo Ersek <lersek@redhat.com>
Thu, 15 Mar 2018 14:20:08 +0000 (15:20 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Fri, 16 Mar 2018 18:58:27 +0000 (19:58 +0100)
  PlatformBootManagerAfterConsole()
                              <--------------------------------+
    PlatformBdsConnectSequence()                               |
      ConnectDevicesFromQemu() / EfiBootManagerConnectAll()    |
      PciAcpiInitialization() ---------------------------------+
    TryRunningQemuKernel()

Functionally this is a no-op:

- PciAcpiInitialization() iterates over PciIo protocol instances, which
  are available just the same at the new call site.

- The PCI interrupt line register exists only to inform system software
  (it doesn't affect hardware) and UEFI drivers don't use PCI interrupts
  anyway.

(More background in commits 2e70cf8ade0d and 5218c27950c4.)

This change will let us move TryRunningQemuKernel() between
PciAcpiInitialization() and PlatformBdsConnectSequence() in the next
patch.

Cc: "Gabriel L. Somlo" <gsomlo@gmail.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Gabriel Somlo <gsomlo@gmail.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Gabriel Somlo <gsomlo@gmail.com>
OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c

index b155639..b624b8f 100644 (file)
@@ -1359,8 +1359,6 @@ PlatformBdsConnectSequence (
     DEBUG ((DEBUG_INFO, "EfiBootManagerConnectAll\n"));\r
     EfiBootManagerConnectAll ();\r
   }\r
-\r
-  PciAcpiInitialization ();\r
 }\r
 \r
 /**\r
@@ -1446,6 +1444,11 @@ PlatformBootManagerAfterConsole (
   //\r
   BootLogoEnableLogo ();\r
 \r
+  //\r
+  // Set PCI Interrupt Line registers and ACPI SCI_EN\r
+  //\r
+  PciAcpiInitialization ();\r
+\r
   //\r
   // Perform some platform specific connect sequence\r
   //\r