]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/PciBusNoEnumerationDxe/PciIo.c
Refine the comments for BiosVideo thunk driver.
[mirror_edk2.git] / DuetPkg / PciBusNoEnumerationDxe / PciIo.c
index 1a0937fe7e2949a417bad8957e2ab191c3ef567f..759c61a83c3df67fc630818e8f00f45d847330e9 100644 (file)
@@ -267,7 +267,7 @@ PciIoSetBarAttributes(
 //\r
 // Pci Io Protocol Interface\r
 //\r
-static EFI_PCI_IO_PROTOCOL  PciIoInterface = {\r
+EFI_PCI_IO_PROTOCOL  PciIoInterface = {\r
   PciIoPollMem,\r
   PciIoPollIo,\r
   {\r
@@ -370,7 +370,7 @@ Returns:
     Count = 1;\r
   }\r
 \r
-  Width &= 0x03;\r
+  Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & 0x03);\r
 \r
   if ((*Offset + Count * ((UINTN)1 << Width)) - 1 >= PciIoDevice->PciBar[BarIndex].Length) {\r
     return EFI_INVALID_PARAMETER;\r
@@ -412,7 +412,7 @@ Returns:
   // If Width is EfiPciIoWidthFifoUintX then convert to EfiPciIoWidthUintX\r
   // If Width is EfiPciIoWidthFillUintX then convert to EfiPciIoWidthUintX\r
   //\r
-  Width &= 0x03;\r
+  Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & 0x03);\r
 \r
   if (PciIoDevice->IsPciExp) {\r
     if ((*Offset + Count * ((UINTN)1 << Width)) - 1 >= PCI_EXP_MAX_CONFIG_OFFSET) {\r
@@ -951,7 +951,7 @@ Returns:
   }\r
 \r
   if (PciIoDevice->Attributes & EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE) {\r
-    Operation = Operation + EfiPciOperationBusMasterRead64;\r
+    Operation = (EFI_PCI_IO_PROTOCOL_OPERATION) (Operation + EfiPciOperationBusMasterRead64);\r
   }\r
 \r
   Status = PciIoDevice->PciRootBridgeIo->Map (\r
@@ -1713,6 +1713,8 @@ Returns:
         //\r
         Ptr->AddrSpaceGranularity = 64;\r
         break;\r
+      default:\r
+        break;\r
       }\r
 \r
       Ptr = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *) ((UINT8 *) Ptr + sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR));\r
@@ -1863,5 +1865,5 @@ Returns:
     return TRUE;\r
   }\r
 \r
-  return (PciDeviceExisted (PciDevice1->Parent, PciDevice2)|| PciDeviceExisted (PciDevice2->Parent, PciDevice1));\r
+  return (BOOLEAN) ((PciDeviceExisted (PciDevice1->Parent, PciDevice2)|| PciDeviceExisted (PciDevice2->Parent, PciDevice1)));\r
 }\r