The explanation is in the patch titled

  OvmfPkg: introduce gRootBusesConnectedProtocolGuid

At this point, this protocol doesn't do anything yet.

Cc: Ard Biesheuvel <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Jordan Justen <[email protected]>
Cc: Marcel Apfelbaum <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <[email protected]>
---
 OvmfPkg/Library/PlatformBdsLib/PlatformBdsLib.inf | 1 +
 OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c      | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/OvmfPkg/Library/PlatformBdsLib/PlatformBdsLib.inf 
b/OvmfPkg/Library/PlatformBdsLib/PlatformBdsLib.inf
index ab5468368da5..9a53aa02b84e 100644
--- a/OvmfPkg/Library/PlatformBdsLib/PlatformBdsLib.inf
+++ b/OvmfPkg/Library/PlatformBdsLib/PlatformBdsLib.inf
@@ -63,10 +63,11 @@ [Pcd.IA32, Pcd.X64]
   gEfiMdePkgTokenSpaceGuid.PcdFSBClock
 
 [Protocols]
   gEfiDecompressProtocolGuid
   gEfiPciRootBridgeIoProtocolGuid
   gEfiS3SaveStateProtocolGuid                   # PROTOCOL SOMETIMES_CONSUMED
   gEfiDxeSmmReadyToLockProtocolGuid             # PROTOCOL SOMETIMES_PRODUCED
+  gRootBusesConnectedProtocolGuid               # PROTOCOL ALWAYS_PRODUCED
 
 [Guids]
   gEfiEndOfDxeEventGroupGuid
diff --git a/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c 
b/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c
index 0abba98dfe03..a527f6aaff2c 100644
--- a/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c
+++ b/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c
@@ -10,14 +10,15 @@
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 **/
 
 #include "BdsPlatform.h"
 #include <Library/QemuBootOrderLib.h>
+#include <Protocol/RootBusesConnected.h>
 
 
 //
 // Global data
 //
 
 VOID          *mEfiDevPathNotifyReg;
@@ -1263,14 +1264,22 @@ Returns:
 
   DEBUG ((EFI_D_INFO, "PlatformBdsPolicyBehavior\n"));
 
   VisitAllInstancesOfProtocol (&gEfiPciRootBridgeIoProtocolGuid,
     ConnectRootBridge, NULL);
 
   //
+  // Signal the ACPI platform driver that it can download QEMU ACPI tables.
+  //
+  Status = gBS->InstallProtocolInterface (&gImageHandle,
+                  &gRootBusesConnectedProtocolGuid, EFI_NATIVE_INTERFACE,
+                  NULL);
+  ASSERT_EFI_ERROR (Status);
+
+  //
   // We can't signal End-of-Dxe earlier than this. Namely, End-of-Dxe triggers
   // the preparation of S3 system information. That logic has a hard dependency
   // on the presence of the FACS ACPI table. Since our ACPI tables are only
   // installed after PCI enumeration completes, we must not trigger the S3 save
   // earlier, hence we can't signal End-of-Dxe earlier.
   //
   Status = gBS->CreateEventEx (EVT_NOTIFY_SIGNAL, TPL_CALLBACK, OnEndOfDxe,
-- 
1.8.3.1


_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to