diff options
Diffstat (limited to 'EdkModulePkg/Bus/Pci/PciBus/Dxe/PciIo.c')
-rw-r--r-- | EdkModulePkg/Bus/Pci/PciBus/Dxe/PciIo.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciIo.c b/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciIo.c index 040c57095d..a636d4ff2c 100644 --- a/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciIo.c +++ b/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciIo.c @@ -184,7 +184,7 @@ Returns: Count = 1;
}
- Width &= 0x03;
+ Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & 0x03);
if ((*Offset + Count * (UINTN)(1 << Width)) - 1 >= PciIoDevice->PciBar[BarIndex].Length) {
return EFI_INVALID_PARAMETER;
@@ -233,7 +233,7 @@ Returns: //
// If Width is EfiPciIoWidthFillUintX then convert to EfiPciIoWidthUintX
//
- Width &= 0x03;
+ Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & 0x03);
if (PciIoDevice->IsPciExp) {
if ((*Offset + Count * (UINTN)(1 << Width)) - 1 >= PCI_EXP_MAX_CONFIG_OFFSET) {
@@ -876,7 +876,7 @@ Returns: }
if (PciIoDevice->Attributes & EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE) {
- Operation = Operation + EfiPciOperationBusMasterRead64;
+ Operation = (EFI_PCI_IO_PROTOCOL_OPERATION) (Operation + EfiPciOperationBusMasterRead64);
}
Status = PciIoDevice->PciRootBridgeIo->Map (
@@ -1966,10 +1966,15 @@ Returns: // TODO: PciDevice1 - add argument and description to function comment
// TODO: PciDevice2 - add argument and description to function comment
{
+ BOOLEAN Existed1;
+ BOOLEAN Existed2;
if (PciDevice1->Parent == PciDevice2->Parent) {
return TRUE;
}
- return (PciDeviceExisted (PciDevice1->Parent, PciDevice2)|| PciDeviceExisted (PciDevice2->Parent, PciDevice1));
+ Existed1 = PciDeviceExisted (PciDevice1->Parent, PciDevice2);
+ Existed2 = PciDeviceExisted (PciDevice2->Parent, PciDevice1);
+
+ return (BOOLEAN) (Existed1 || Existed2);
}
|