VOID\r
);\r
\r
+EFI_STATUS\r
+EFIAPI\r
+ConnectRootBridge (\r
+ IN EFI_HANDLE RootBridgeHandle,\r
+ IN VOID *Instance,\r
+ IN VOID *Context\r
+ );\r
+\r
+STATIC\r
+VOID\r
+SaveS3BootScript (\r
+ VOID\r
+ );\r
+\r
//\r
// BDS Platform Functions\r
//\r
{\r
DEBUG ((EFI_D_INFO, "PlatformBdsInit\n"));\r
InstallDevicePathCallback ();\r
+\r
+ VisitAllInstancesOfProtocol (&gEfiPciRootBridgeIoProtocolGuid,\r
+ ConnectRootBridge, NULL);\r
+\r
+ //\r
+ // Signal the ACPI platform driver that it can download QEMU ACPI tables.\r
+ //\r
+ EfiEventGroupSignal (&gRootBridgesConnectedEventGroupGuid);\r
+\r
+ //\r
+ // We can't signal End-of-Dxe earlier than this. Namely, End-of-Dxe triggers\r
+ // the preparation of S3 system information. That logic has a hard dependency\r
+ // on the presence of the FACS ACPI table. Since our ACPI tables are only\r
+ // installed after PCI enumeration completes, we must not trigger the S3 save\r
+ // earlier, hence we can't signal End-of-Dxe earlier.\r
+ //\r
+ EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid);\r
+\r
+ if (QemuFwCfgS3Enabled ()) {\r
+ //\r
+ // Save the boot script too. Note that this requires/includes emitting the\r
+ // DxeSmmReadyToLock event, which in turn locks down SMM.\r
+ //\r
+ SaveS3BootScript ();\r
+ }\r
}\r
\r
\r
\r
DEBUG ((EFI_D_INFO, "PlatformBdsPolicyBehavior\n"));\r
\r
- VisitAllInstancesOfProtocol (&gEfiPciRootBridgeIoProtocolGuid,\r
- ConnectRootBridge, NULL);\r
-\r
- //\r
- // Signal the ACPI platform driver that it can download QEMU ACPI tables.\r
- //\r
- EfiEventGroupSignal (&gRootBridgesConnectedEventGroupGuid);\r
-\r
- //\r
- // We can't signal End-of-Dxe earlier than this. Namely, End-of-Dxe triggers\r
- // the preparation of S3 system information. That logic has a hard dependency\r
- // on the presence of the FACS ACPI table. Since our ACPI tables are only\r
- // installed after PCI enumeration completes, we must not trigger the S3 save\r
- // earlier, hence we can't signal End-of-Dxe earlier.\r
- //\r
- EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid);\r
-\r
- if (QemuFwCfgS3Enabled ()) {\r
- //\r
- // Save the boot script too. Note that this requires/includes emitting the\r
- // DxeSmmReadyToLock event, which in turn locks down SMM.\r
- //\r
- SaveS3BootScript ();\r
- }\r
-\r
if (PcdGetBool (PcdOvmfFlashVariablesEnable)) {\r
DEBUG ((EFI_D_INFO, "PlatformBdsPolicyBehavior: not restoring NvVars "\r
"from disk since flash variables appear to be supported.\n"));\r