diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-09-15 07:48:11 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-09-15 07:48:11 +0000 |
commit | c9325700d0ef25eaf45077928af3f93b15ac5fe0 (patch) | |
tree | c46ae68c26db3a5a6a9e58b37b53265aa2f770d3 /MdeModulePkg/Bus/Pci/PciBusDxe | |
parent | f6b4e53dfe43c27d448cedb57059e5b7ca236dd8 (diff) | |
download | edk2-platforms-c9325700d0ef25eaf45077928af3f93b15ac5fe0.tar.xz |
Refine soma code to make code run safely.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10877 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Pci/PciBusDxe')
-rw-r--r-- | MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c | 4 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c index fca0084016..09b58ac0de 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c @@ -983,7 +983,7 @@ PciHostBridgeAdjustAllocation ( // Have no way to get ReqRes, AllocRes & Bar here
//
ZeroMem (&AllocFailExtendedData, sizeof (AllocFailExtendedData));
- AllocFailExtendedData.DevicePathSize = sizeof (EFI_DEVICE_PATH_PROTOCOL);
+ AllocFailExtendedData.DevicePathSize = (UINT16) sizeof (EFI_DEVICE_PATH_PROTOCOL);
AllocFailExtendedData.DevicePath = (UINT8 *) PciResNode->PciDev->DevicePath;
AllocFailExtendedData.Bar = PciResNode->Bar;
@@ -1108,7 +1108,7 @@ ConstructAcpiResourceRequestor ( //
if ((Aperture & 0x01) != 0) {
Ptr->Desc = ACPI_ADDRESS_SPACE_DESCRIPTOR;
- Ptr->Len = sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3;
+ Ptr->Len = (UINT16) (sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3);
//
// Io
//
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c index fe67dc20cd..0969407831 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c @@ -1637,7 +1637,7 @@ PciIoGetBarAttributes ( if (NumConfig == 1) {
Ptr->Desc = ACPI_ADDRESS_SPACE_DESCRIPTOR;
- Ptr->Len = sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3;
+ Ptr->Len = (UINT16) (sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3);
Ptr->AddrRangeMin = PciIoDevice->PciBar[BarIndex].BaseAddress;
Ptr->AddrLen = PciIoDevice->PciBar[BarIndex].Length;
|