summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2010-11-15 02:36:24 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2010-11-15 02:36:24 +0000
commita6bbb98ece8b2f945cf4a9db589059bdbcdf8ab3 (patch)
tree9a82f43918d6182c64fa3a93e3cc19e694787d9e
parent5f14feed8e8f57f1fa8637a14e2c98776a218dd8 (diff)
downloadedk2-a6bbb98ece8b2f945cf4a9db589059bdbcdf8ab3.tar.gz
edk2-a6bbb98ece8b2f945cf4a9db589059bdbcdf8ab3.tar.bz2
edk2-a6bbb98ece8b2f945cf4a9db589059bdbcdf8ab3.zip
sync patch r11043 from main trunk.
Fix bug: The lower 2 bits of Width and stripped, Count will always be multiplied by 1, which will leave Count unchanged. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UDK2008@11056 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c
index 840f7e8371..57a70fef63 100644
--- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c
+++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciIo.c
@@ -451,8 +451,8 @@ PciIoMemRead (
//
if (FeaturePcdGet (PcdUnalignedPciIoEnable)) {
if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) {
- Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03));
Count *= (UINTN)(1 << (Width & 0x03));
+ Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03));
}
}
@@ -526,8 +526,8 @@ PciIoMemWrite (
//
if (FeaturePcdGet (PcdUnalignedPciIoEnable)) {
if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) {
- Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03));
Count *= (UINTN)(1 << (Width & 0x03));
+ Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03));
}
}
@@ -600,8 +600,8 @@ PciIoIoRead (
//
if (FeaturePcdGet (PcdUnalignedPciIoEnable)) {
if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) {
- Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03));
Count *= (UINTN)(1 << (Width & 0x03));
+ Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03));
}
}
@@ -674,8 +674,8 @@ PciIoIoWrite (
//
if (FeaturePcdGet (PcdUnalignedPciIoEnable)) {
if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) {
- Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03));
Count *= (UINTN)(1 << (Width & 0x03));
+ Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03));
}
}
@@ -739,8 +739,8 @@ PciIoConfigRead (
//
if (FeaturePcdGet (PcdUnalignedPciIoEnable)) {
if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) {
- Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03));
Count *= (UINTN)(1 << (Width & 0x03));
+ Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03));
}
}
@@ -804,8 +804,8 @@ PciIoConfigWrite (
//
if (FeaturePcdGet (PcdUnalignedPciIoEnable)) {
if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) {
- Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03));
Count *= (UINTN)(1 << (Width & 0x03));
+ Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03));
}
}
@@ -899,8 +899,8 @@ PciIoCopyMem (
//
if (FeaturePcdGet (PcdUnalignedPciIoEnable)) {
if ((SrcOffset & ((1 << (Width & 0x03)) - 1)) != 0 || (DestOffset & ((1 << (Width & 0x03)) - 1)) != 0) {
- Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03));
Count *= (UINTN)(1 << (Width & 0x03));
+ Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03));
}
}