[Protocols]\r
gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
gEfiPciIoProtocolGuid # PROTOCOL SOMETIMES_CONSUMED\r
+ gQemuAcpiTableNotifyProtocolGuid # PROTOCOL PRODUCES\r
\r
[Guids]\r
gRootBridgesConnectedEventGroupGuid\r
#include <Library/QemuFwCfgS3Lib.h> // QemuFwCfgS3Enabled()\r
#include <Library/UefiBootServicesTableLib.h> // gBS\r
\r
+#include <Protocol/QemuAcpiTableNotify.h>\r
#include "AcpiPlatform.h"\r
+EFI_HANDLE mQemuAcpiHandle = NULL;\r
+QEMU_ACPI_TABLE_NOTIFY_PROTOCOL mAcpiNotifyProtocol;\r
\r
//\r
// The user structure for the ordered collection that will track the fw_cfg\r
AcpiProtocol->UninstallAcpiTable (AcpiProtocol, InstalledKey[Installed]);\r
}\r
} else {\r
- DEBUG ((DEBUG_INFO, "%a: installed %d tables\n", __FUNCTION__, Installed));\r
+ //\r
+ // Install a protocol to notify that the ACPI table provided by Qemu is\r
+ // ready.\r
+ //\r
+ gBS->InstallProtocolInterface (\r
+ &mQemuAcpiHandle,\r
+ &gQemuAcpiTableNotifyProtocolGuid,\r
+ EFI_NATIVE_INTERFACE,\r
+ &mAcpiNotifyProtocol\r
+ );\r
}\r
\r
for (SeenPointerEntry = OrderedCollectionMin (SeenPointers);\r
--- /dev/null
+/** @file\r
+\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#ifndef QEMU_ACPI_TABLE_NOTIFY_H_\r
+#define QEMU_ACPI_TABLE_NOTIFY_H_\r
+\r
+#define QEMU_ACPI_TABLE_NOTIFY_GUID \\r
+ { 0x928939b2, 0x4235, 0x462f, { 0x95, 0x80, 0xf6, 0xa2, 0xb2, 0xc2, 0x1a, 0x4f } };\r
+\r
+///\r
+/// Forward declaration\r
+///\r
+typedef struct _QEMU_ACPI_TABLE_NOTIFY_PROTOCOL QEMU_ACPI_TABLE_NOTIFY_PROTOCOL;\r
+\r
+///\r
+/// Protocol structure\r
+///\r
+struct _QEMU_ACPI_TABLE_NOTIFY_PROTOCOL {\r
+ UINT8 Notify;\r
+};\r
+\r
+extern EFI_GUID gQemuAcpiTableNotifyProtocolGuid;\r
+\r
+#endif\r