X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FBus%2FPci%2FPciBusDxe%2FPciIo.c;h=416063268f75c3756c3ed4e5844b269ec8e6982c;hp=2893f44d53c059384cfd2af3a3bbdd0768a3679f;hb=b56750422f7df2f2ecbbed4c75976c1d5abc88ae;hpb=3bdb6d12a835a9b3d7729eaf51e3a4265a270cf5 diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c index 2893f44d53..416063268f 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c @@ -1,7 +1,7 @@ /** @file EFI PCI IO protocol functions implementation for PCI Bus module. -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -1448,7 +1448,7 @@ SupportPaletteSnoopAttributes ( // if (Operation == EfiPciIoAttributeOperationEnable) { PCI_DISABLE_COMMAND_REGISTER (Temp, EFI_PCI_COMMAND_VGA_PALETTE_SNOOP); - Temp->Attributes &= (~EFI_PCI_COMMAND_VGA_PALETTE_SNOOP); + Temp->Attributes &= (~(UINT64)EFI_PCI_COMMAND_VGA_PALETTE_SNOOP); } else { return EFI_UNSUPPORTED; } @@ -1568,15 +1568,10 @@ PciIoAttributes ( // // Check VGA and VGA16, they can not be set at the same time // - if (((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO) != 0 && - (Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO_16) != 0) || - ((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO) != 0 && - (Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16) != 0) || - ((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO) != 0 && - (Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_IO_16) != 0) || - ((Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO) != 0 && - (Attributes & EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16) != 0) ) { - return EFI_UNSUPPORTED; + if ((Attributes & (EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO)) != 0) { + if ((Attributes & (EFI_PCI_IO_ATTRIBUTE_VGA_IO_16 | EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16)) != 0) { + return EFI_UNSUPPORTED; + } } //