]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
Retired PciIncompatibleDeviceSupportLib from IntelFrameworkModulePkg.
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Pci / PciBusDxe / PciEnumerator.c
index 8ee4b65106da3f38c518aed9e8c1e00bb42de17f..bc4f8504aa02d94f840afa30292092b91681a45d 100644 (file)
@@ -341,9 +341,8 @@ PciAssignBusNumber (
 \r
         Address   = EFI_PCI_ADDRESS (StartBusNumber, Device, Func, 0x18);\r
 \r
-        Status = PciRootBridgeIoWrite (\r
+        Status = PciRootBridgeIo->Pci.Write (\r
                                         PciRootBridgeIo,\r
-                                        &Pci,\r
                                         EfiPciWidthUint16,\r
                                         Address,\r
                                         1,\r
@@ -354,9 +353,8 @@ PciAssignBusNumber (
         // Initialize SubBusNumber to SecondBus\r
         //\r
         Address = EFI_PCI_ADDRESS (StartBusNumber, Device, Func, 0x1A);\r
-        Status = PciRootBridgeIoWrite (\r
+        Status = PciRootBridgeIo->Pci.Write (\r
                                         PciRootBridgeIo,\r
-                                        &Pci,\r
                                         EfiPciWidthUint8,\r
                                         Address,\r
                                         1,\r
@@ -368,9 +366,8 @@ PciAssignBusNumber (
         if (IS_PCI_BRIDGE (&Pci)) {\r
 \r
           Register8 = 0xFF;\r
-          Status = PciRootBridgeIoWrite (\r
+          Status = PciRootBridgeIo->Pci.Write (\r
                                           PciRootBridgeIo,\r
-                                          &Pci,\r
                                           EfiPciWidthUint8,\r
                                           Address,\r
                                           1,\r
@@ -393,9 +390,8 @@ PciAssignBusNumber (
         //\r
         Address = EFI_PCI_ADDRESS (StartBusNumber, Device, Func, 0x1A);\r
 \r
-        Status = PciRootBridgeIoWrite (\r
+        Status = PciRootBridgeIo->Pci.Write (\r
                                         PciRootBridgeIo,\r
-                                        &Pci,\r
                                         EfiPciWidthUint8,\r
                                         Address,\r
                                         1,\r
@@ -1083,16 +1079,11 @@ ConstructAcpiResourceRequestor (
     // If there is at least one type of resource request,\r
     // allocate a acpi resource node\r
     //\r
-    Configuration = AllocatePool (sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) * NumConfig + sizeof (EFI_ACPI_END_TAG_DESCRIPTOR));\r
+    Configuration = AllocateZeroPool (sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) * NumConfig + sizeof (EFI_ACPI_END_TAG_DESCRIPTOR));\r
     if (Configuration == NULL) {\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
 \r
-    ZeroMem (\r
-      Configuration,\r
-      sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) * NumConfig + sizeof (EFI_ACPI_END_TAG_DESCRIPTOR)\r
-      );\r
-\r
     Ptr = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *) Configuration;\r
 \r
     //\r
@@ -1221,13 +1212,11 @@ ConstructAcpiResourceRequestor (
     //\r
     // If there is no resource request\r
     //\r
-    Configuration = AllocatePool (sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) + sizeof (EFI_ACPI_END_TAG_DESCRIPTOR));\r
+    Configuration = AllocateZeroPool (sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) + sizeof (EFI_ACPI_END_TAG_DESCRIPTOR));\r
     if (Configuration == NULL) {\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
 \r
-    ZeroMem (Configuration, sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) + sizeof (EFI_ACPI_END_TAG_DESCRIPTOR));\r
-\r
     Ptr               = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *) (Configuration);\r
     Ptr->Desc         = ACPI_ADDRESS_SPACE_DESCRIPTOR;\r
 \r
@@ -1356,7 +1345,7 @@ PciBridgeEnumerator (
   SubBusNumber    = 0;\r
   StartBusNumber  = 0;\r
   PciIo           = &(BridgeDev->PciIo);\r
-  Status          = PciIoRead (PciIo, EfiPciIoWidthUint8, 0x19, 1, &StartBusNumber);\r
+  Status          = PciIo->Pci.Read (PciIo, EfiPciIoWidthUint8, 0x19, 1, &StartBusNumber);\r
 \r
   if (EFI_ERROR (Status)) {\r
     return Status;\r