]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: introduce gRootBridgesConnectedEventGroupGuid
authorLaszlo Ersek <lersek@redhat.com>
Sun, 13 Mar 2016 16:35:05 +0000 (17:35 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 23 Mar 2016 16:38:09 +0000 (17:38 +0100)
QEMU's ACPI table generator can only create meaningful _CRS objects --
apertures -- for the root buses if all of the PCI devices behind those
buses are actively decoding their IO and MMIO resources, at the time of
the firmware fetching the "etc/table-loader" fw_cfg file. This is not a
QEMU error; QEMU follows the definition of BARs (which are meaningless
when decoding is disabled).

Currently we hook up AcpiPlatformDxe to the PCI Bus driver's
gEfiPciEnumerationCompleteProtocolGuid cue. Unfortunately, when the PCI
Bus driver installs this protocol, it's *still* not the right time for
fetching "etc/table-loader": although resources have been allocated and
BARs have been programmed with them, the PCI Bus driver has also cleared
IO and MMIO decoding in the command registers of the devices.

Furthermore, we couldn't reenable IO and MMIO decoding temporarily in our
gEfiPciEnumerationCompleteProtocolGuid callback even if we wanted to,
because at that time the PCI Bus driver has not produced PciIo instances
yet.

Our Platform BDSes are responsible for connecting the root bridges, hence
they know exactly when the PciIo instances become available -- not when
PCI enumeration completes (signaled by the above protocol), but when the
ConnectController() calls return.

This is when our Platform BDSes should explicitly cue in AcpiPlatformDxe.
Then AcpiPlatformDxe can temporarily enable IO and MMIO decoding for all
devices, while it contacts QEMU for the ACPI payload.

This patch introduces the event group GUID that we'll use for unleashing
AcpiPlatformDxe from our Platform BDSes.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
OvmfPkg/Include/Guid/RootBridgesConnectedEventGroup.h [new file with mode: 0644]
OvmfPkg/OvmfPkg.dec

diff --git a/OvmfPkg/Include/Guid/RootBridgesConnectedEventGroup.h b/OvmfPkg/Include/Guid/RootBridgesConnectedEventGroup.h
new file mode 100644 (file)
index 0000000..b6803d4
--- /dev/null
@@ -0,0 +1,33 @@
+/** @file\r
+  An event group GUID with which BDS indicates that PCI root bridges have been\r
+  connected, and PciIo protocol instances have become available.\r
+\r
+  Note that this differs from the PCI Enumeration Complete Protocol as defined\r
+  in the PI 1.1 specification. That protocol is installed by the PCI bus driver\r
+  after enumeration and resource allocation have been completed, but before\r
+  PciIo protocol instances are created.\r
+\r
+  Copyright (C) 2016, Red Hat, Inc.\r
+\r
+  This program and the accompanying materials are licensed and made available\r
+  under the terms and conditions of the BSD License which accompanies this\r
+  distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
+  WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+**/\r
+\r
+#ifndef _ROOT_BRIDGES_CONNECTED_EVENT_GROUP_H_\r
+#define _ROOT_BRIDGES_CONNECTED_EVENT_GROUP_H_\r
+\r
+#define ROOT_BRIDGES_CONNECTED_EVENT_GROUP_GUID         \\r
+  { 0x24a2d66f,                                         \\r
+    0xeedd,                                             \\r
+    0x4086,                                             \\r
+    { 0x90, 0x42, 0xf2, 0x6e, 0x47, 0x97, 0xee, 0x69 }, \\r
+  }\r
+\r
+extern EFI_GUID gRootBridgesConnectedEventGroupGuid;\r
+\r
+#endif\r
index c04a6f4afd7fd54793a3bfe6a674ba2bd931cf18..d4ee152b16de06119c4cd9b8157642f497e21ea1 100644 (file)
@@ -58,6 +58,7 @@
   gOvmfPlatformConfigGuid             = {0x7235c51c, 0x0c80, 0x4cab, {0x87, 0xac, 0x3b, 0x08, 0x4a, 0x63, 0x04, 0xb1}}\r
   gVirtioMmioTransportGuid            = {0x837dca9e, 0xe874, 0x4d82, {0xb2, 0x9a, 0x23, 0xfe, 0x0e, 0x23, 0xd1, 0xe2}}\r
   gXenBusRootDeviceGuid               = {0xa732241f, 0x383d, 0x4d9c, {0x8a, 0xe1, 0x8e, 0x09, 0x83, 0x75, 0x89, 0xd7}}\r
+  gRootBridgesConnectedEventGroupGuid = {0x24a2d66f, 0xeedd, 0x4086, {0x90, 0x42, 0xf2, 0x6e, 0x47, 0x97, 0xee, 0x69}}\r
 \r
 [Protocols]\r
   gVirtioDeviceProtocolGuid           = {0xfa920010, 0x6785, 0x4941, {0xb6, 0xec, 0x49, 0x8c, 0x57, 0x9f, 0x16, 0x0a}}\r