summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-18 06:40:20 +0000
committergikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-18 06:40:20 +0000
commitf88b7fd42e95caabc4ee85905b7712458df02746 (patch)
tree8d2451fd20f56bd5984eda6af8eadca013254310
parent8bcd1d700306f4f104761430aab682c14fcc754d (diff)
downloadedk2-platforms-f88b7fd42e95caabc4ee85905b7712458df02746.tar.xz
Fix wrong variable used that may overwrite correct data with incorrect one.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8593 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
index 687e007b5a..c8cd57a514 100644
--- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
+++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
@@ -1104,7 +1104,7 @@ ConstructAcpiResourceRequestor (
Ptr->AddrLen = IoNode->Length;
Ptr->AddrRangeMax = IoNode->Alignment;
- Ptr = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *) ((UINT8 *) Ptr + sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR));
+ Ptr++;
}
//
// Deal with mem32 aperture
@@ -1127,7 +1127,7 @@ ConstructAcpiResourceRequestor (
Ptr->AddrLen = Mem32Node->Length;
Ptr->AddrRangeMax = Mem32Node->Alignment;
- Ptr = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *) ((UINT8 *) Ptr + sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR));
+ Ptr++;
}
//
@@ -1151,7 +1151,7 @@ ConstructAcpiResourceRequestor (
Ptr->AddrLen = PMem32Node->Length;
Ptr->AddrRangeMax = PMem32Node->Alignment;
- Ptr = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *) ((UINT8 *) Ptr + sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR));
+ Ptr++;
}
//
// Deal with mem64 aperture
@@ -1174,7 +1174,7 @@ ConstructAcpiResourceRequestor (
Ptr->AddrLen = Mem64Node->Length;
Ptr->AddrRangeMax = Mem64Node->Alignment;
- Ptr = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *) ((UINT8 *) Ptr + sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR));
+ Ptr++;
}
//
// Deal with Pmem64 aperture
@@ -1197,13 +1197,13 @@ ConstructAcpiResourceRequestor (
Ptr->AddrLen = PMem64Node->Length;
Ptr->AddrRangeMax = PMem64Node->Alignment;
- Ptr = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *) ((UINT8 *) Ptr + sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR));
+ Ptr++;
}
//
// put the checksum
//
- PtrEnd = (EFI_ACPI_END_TAG_DESCRIPTOR *) ((UINT8 *) Ptr);
+ PtrEnd = (EFI_ACPI_END_TAG_DESCRIPTOR *) Ptr;
PtrEnd->Desc = ACPI_END_TAG_DESCRIPTOR;
PtrEnd->Checksum = 0;
@@ -1223,7 +1223,7 @@ ConstructAcpiResourceRequestor (
Ptr = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *) (Configuration);
Ptr->Desc = ACPI_ADDRESS_SPACE_DESCRIPTOR;
- PtrEnd = (EFI_ACPI_END_TAG_DESCRIPTOR *) (Configuration + sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR));
+ PtrEnd = (EFI_ACPI_END_TAG_DESCRIPTOR *) (Ptr + 1);
PtrEnd->Desc = ACPI_END_TAG_DESCRIPTOR;
PtrEnd->Checksum = 0;
}