diff options
Diffstat (limited to 'OvmfPkg/Bhyve/AcpiPlatformDxe/EntryPoint.c')
-rw-r--r-- | OvmfPkg/Bhyve/AcpiPlatformDxe/EntryPoint.c | 54 |
1 files changed, 33 insertions, 21 deletions
diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/EntryPoint.c b/OvmfPkg/Bhyve/AcpiPlatformDxe/EntryPoint.c index f66f892911..b6ef101b2a 100644 --- a/OvmfPkg/Bhyve/AcpiPlatformDxe/EntryPoint.c +++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/EntryPoint.c @@ -16,49 +16,50 @@ FindAcpiTableProtocol ( VOID
)
{
- EFI_STATUS Status;
- EFI_ACPI_TABLE_PROTOCOL *AcpiTable;
+ EFI_STATUS Status;
+ EFI_ACPI_TABLE_PROTOCOL *AcpiTable;
Status = gBS->LocateProtocol (
&gEfiAcpiTableProtocolGuid,
NULL,
- (VOID**)&AcpiTable
+ (VOID **)&AcpiTable
);
ASSERT_EFI_ERROR (Status);
return AcpiTable;
}
-
STATIC
VOID
EFIAPI
OnRootBridgesConnected (
- IN EFI_EVENT Event,
- IN VOID *Context
+ IN EFI_EVENT Event,
+ IN VOID *Context
)
{
- EFI_STATUS Status;
+ EFI_STATUS Status;
- DEBUG ((DEBUG_INFO,
+ DEBUG ((
+ DEBUG_INFO,
"%a: root bridges have been connected, installing ACPI tables\n",
- __FUNCTION__));
+ __FUNCTION__
+ ));
Status = InstallAcpiTables (FindAcpiTableProtocol ());
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: InstallAcpiTables: %r\n", __FUNCTION__, Status));
}
+
gBS->CloseEvent (Event);
}
-
EFI_STATUS
EFIAPI
AcpiPlatformEntryPoint (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
)
{
- EFI_STATUS Status;
- EFI_EVENT RootBridgesConnected;
+ EFI_STATUS Status;
+ EFI_EVENT RootBridgesConnected;
//
// If the platform doesn't support PCI, or PCI enumeration has been disabled,
@@ -66,8 +67,12 @@ AcpiPlatformEntryPoint ( // the full functionality.
//
if (PcdGetBool (PcdPciDisableBusEnumeration)) {
- DEBUG ((DEBUG_INFO, "%a: PCI or its enumeration disabled, installing "
- "ACPI tables\n", __FUNCTION__));
+ DEBUG ((
+ DEBUG_INFO,
+ "%a: PCI or its enumeration disabled, installing "
+ "ACPI tables\n",
+ __FUNCTION__
+ ));
return InstallAcpiTables (FindAcpiTableProtocol ());
}
@@ -77,13 +82,20 @@ AcpiPlatformEntryPoint ( // setup. (Note that we're a DXE_DRIVER; our entry point function is invoked
// strictly before BDS is entered and can connect the root bridges.)
//
- Status = gBS->CreateEventEx (EVT_NOTIFY_SIGNAL, TPL_CALLBACK,
- OnRootBridgesConnected, NULL /* Context */,
- &gRootBridgesConnectedEventGroupGuid, &RootBridgesConnected);
+ Status = gBS->CreateEventEx (
+ EVT_NOTIFY_SIGNAL,
+ TPL_CALLBACK,
+ OnRootBridgesConnected,
+ NULL /* Context */,
+ &gRootBridgesConnectedEventGroupGuid,
+ &RootBridgesConnected
+ );
if (!EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO,
+ DEBUG ((
+ DEBUG_INFO,
"%a: waiting for root bridges to be connected, registered callback\n",
- __FUNCTION__));
+ __FUNCTION__
+ ));
}
return Status;
|