]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c
OvmfPkg: Apply uncrustify changes
[mirror_edk2.git] / OvmfPkg / IncompatiblePciDeviceSupportDxe / IncompatiblePciDeviceSupport.c
index db1532f10934b7dfb4f1018c024f88a0c0d2c010..8730874613f807753217c6db4fa10687489f74a9 100644 (file)
 //\r
 // The Legacy BIOS protocol has been located.\r
 //\r
-STATIC BOOLEAN mLegacyBiosInstalled;\r
+STATIC BOOLEAN  mLegacyBiosInstalled;\r
 \r
 //\r
 // The protocol interface this driver produces.\r
 //\r
 STATIC EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL\r
-                                                 mIncompatiblePciDeviceSupport;\r
+  mIncompatiblePciDeviceSupport;\r
 \r
 //\r
 // Configuration template for the CheckDevice() protocol member function.\r
@@ -42,24 +42,24 @@ STATIC EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL
 //\r
 #pragma pack (1)\r
 typedef struct {\r
-  EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR AddressSpaceDesc;\r
-  EFI_ACPI_END_TAG_DESCRIPTOR       EndDesc;\r
+  EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR    AddressSpaceDesc;\r
+  EFI_ACPI_END_TAG_DESCRIPTOR          EndDesc;\r
 } MMIO64_PREFERENCE;\r
 #pragma pack ()\r
 \r
-STATIC CONST MMIO64_PREFERENCE mConfiguration = {\r
+STATIC CONST MMIO64_PREFERENCE  mConfiguration = {\r
   //\r
   // AddressSpaceDesc\r
   //\r
   {\r
     ACPI_ADDRESS_SPACE_DESCRIPTOR,                 // Desc\r
     (UINT16)(                                      // Len\r
-      sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) -\r
-      OFFSET_OF (\r
-        EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR,\r
-        ResType\r
-        )\r
-      ),\r
+                                                   sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) -\r
+                                                   OFFSET_OF (\r
+                                                     EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR,\r
+                                                     ResType\r
+                                                     )\r
+                                                   ),\r
     ACPI_ADDRESS_SPACE_TYPE_MEM,                   // ResType\r
     0,                                             // GenFlag\r
     0,                                             // SpecificFlag\r
@@ -88,8 +88,7 @@ STATIC CONST MMIO64_PREFERENCE mConfiguration = {
 //\r
 // The CheckDevice() member function has been called.\r
 //\r
-STATIC BOOLEAN mCheckDeviceCalled;\r
-\r
+STATIC BOOLEAN  mCheckDeviceCalled;\r
 \r
 /**\r
   Notification callback for Legacy BIOS protocol installation.\r
@@ -103,17 +102,20 @@ STATIC
 VOID\r
 EFIAPI\r
 LegacyBiosInstalled (\r
-  IN EFI_EVENT Event,\r
-  IN VOID      *Context\r
+  IN EFI_EVENT  Event,\r
+  IN VOID       *Context\r
   )\r
 {\r
-  EFI_STATUS               Status;\r
-  EFI_LEGACY_BIOS_PROTOCOL *LegacyBios;\r
+  EFI_STATUS                Status;\r
+  EFI_LEGACY_BIOS_PROTOCOL  *LegacyBios;\r
 \r
   ASSERT (!mCheckDeviceCalled);\r
 \r
-  Status = gBS->LocateProtocol (&gEfiLegacyBiosProtocolGuid,\r
-                  NULL /* Registration */, (VOID **)&LegacyBios);\r
+  Status = gBS->LocateProtocol (\r
+                  &gEfiLegacyBiosProtocolGuid,\r
+                  NULL /* Registration */,\r
+                  (VOID **)&LegacyBios\r
+                  );\r
   if (EFI_ERROR (Status)) {\r
     return;\r
   }\r
@@ -127,7 +129,6 @@ LegacyBiosInstalled (
   ASSERT_EFI_ERROR (Status);\r
 }\r
 \r
-\r
 /**\r
   Returns a list of ACPI resource descriptors that detail the special resource\r
   configuration requirements for an incompatible PCI device.\r
@@ -233,15 +234,20 @@ CheckDevice (
   //\r
   *Configuration = AllocateCopyPool (sizeof mConfiguration, &mConfiguration);\r
   if (*Configuration == NULL) {\r
-    DEBUG ((DEBUG_WARN,\r
+    DEBUG ((\r
+      DEBUG_WARN,\r
       "%a: 64-bit MMIO BARs may be degraded for PCI 0x%04x:0x%04x (rev %d)\n",\r
-      __FUNCTION__, (UINT32)VendorId, (UINT32)DeviceId, (UINT8)RevisionId));\r
+      __FUNCTION__,\r
+      (UINT32)VendorId,\r
+      (UINT32)DeviceId,\r
+      (UINT8)RevisionId\r
+      ));\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
-\r
 /**\r
   Entry point for this driver.\r
 \r
@@ -257,13 +263,13 @@ CheckDevice (
 EFI_STATUS\r
 EFIAPI\r
 DriverInitialize (\r
-  IN EFI_HANDLE       ImageHandle,\r
-  IN EFI_SYSTEM_TABLE *SystemTable\r
+  IN EFI_HANDLE        ImageHandle,\r
+  IN EFI_SYSTEM_TABLE  *SystemTable\r
   )\r
 {\r
-  EFI_STATUS Status;\r
-  EFI_EVENT  Event;\r
-  VOID       *Registration;\r
+  EFI_STATUS  Status;\r
+  EFI_EVENT   Event;\r
+  VOID        *Registration;\r
 \r
   //\r
   // If there is no 64-bit PCI MMIO aperture, then 64-bit MMIO BARs have to be\r
@@ -307,14 +313,22 @@ DriverInitialize (
   // For breaking this order, the Legacy BIOS DXE_DRIVER would have to install\r
   // its protocol after the firmware enters BDS, which cannot happen.\r
   //\r
-  Status = gBS->CreateEvent (EVT_NOTIFY_SIGNAL, TPL_CALLBACK,\r
-                  LegacyBiosInstalled, NULL /* Context */, &Event);\r
+  Status = gBS->CreateEvent (\r
+                  EVT_NOTIFY_SIGNAL,\r
+                  TPL_CALLBACK,\r
+                  LegacyBiosInstalled,\r
+                  NULL /* Context */,\r
+                  &Event\r
+                  );\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
 \r
-  Status = gBS->RegisterProtocolNotify (&gEfiLegacyBiosProtocolGuid, Event,\r
-                  &Registration);\r
+  Status = gBS->RegisterProtocolNotify (\r
+                  &gEfiLegacyBiosProtocolGuid,\r
+                  Event,\r
+                  &Registration\r
+                  );\r
   if (EFI_ERROR (Status)) {\r
     goto CloseEvent;\r
   }\r
@@ -323,9 +337,12 @@ DriverInitialize (
   ASSERT_EFI_ERROR (Status);\r
 \r
   mIncompatiblePciDeviceSupport.CheckDevice = CheckDevice;\r
-  Status = gBS->InstallMultipleProtocolInterfaces (&ImageHandle,\r
-                  &gEfiIncompatiblePciDeviceSupportProtocolGuid,\r
-                  &mIncompatiblePciDeviceSupport, NULL);\r
+  Status                                    = gBS->InstallMultipleProtocolInterfaces (\r
+                                                     &ImageHandle,\r
+                                                     &gEfiIncompatiblePciDeviceSupportProtocolGuid,\r
+                                                     &mIncompatiblePciDeviceSupport,\r
+                                                     NULL\r
+                                                     );\r
   if (EFI_ERROR (Status)) {\r
     goto CloseEvent;\r
   }\r
@@ -334,7 +351,7 @@ DriverInitialize (
 \r
 CloseEvent:\r
   if (!mLegacyBiosInstalled) {\r
-    EFI_STATUS CloseStatus;\r
+    EFI_STATUS  CloseStatus;\r
 \r
     CloseStatus = gBS->CloseEvent (Event);\r
     ASSERT_EFI_ERROR (CloseStatus);\r