Fix ICC building issue for DuetPkg
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6749 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
e24d48ac46
commit
9c83c97ac2
@ -92,7 +92,7 @@ Returns:
|
|||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
Controller,
|
Controller,
|
||||||
&gEfiPciIoProtocolGuid,
|
&gEfiPciIoProtocolGuid,
|
||||||
&PciIo,
|
(VOID**)&PciIo,
|
||||||
This->DriverBindingHandle,
|
This->DriverBindingHandle,
|
||||||
Controller,
|
Controller,
|
||||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||||
@ -171,7 +171,7 @@ Returns:
|
|||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
Controller,
|
Controller,
|
||||||
&gEfiPciIoProtocolGuid,
|
&gEfiPciIoProtocolGuid,
|
||||||
&PciIo,
|
(VOID**)&PciIo,
|
||||||
This->DriverBindingHandle,
|
This->DriverBindingHandle,
|
||||||
Controller,
|
Controller,
|
||||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||||
@ -197,7 +197,7 @@ Returns:
|
|||||||
Status = gBS->AllocatePool (
|
Status = gBS->AllocatePool (
|
||||||
EfiBootServicesData,
|
EfiBootServicesData,
|
||||||
sizeof(PCAT_ISA_ACPI_DEV),
|
sizeof(PCAT_ISA_ACPI_DEV),
|
||||||
&PcatIsaAcpiDev
|
(VOID**)&PcatIsaAcpiDev
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Done;
|
goto Done;
|
||||||
@ -284,7 +284,7 @@ PcatIsaAcpiDriverBindingStop (
|
|||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
Controller,
|
Controller,
|
||||||
&gEfiIsaAcpiProtocolGuid,
|
&gEfiIsaAcpiProtocolGuid,
|
||||||
&IsaAcpi,
|
(VOID**)&IsaAcpi,
|
||||||
This->DriverBindingHandle,
|
This->DriverBindingHandle,
|
||||||
Controller,
|
Controller,
|
||||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||||
|
@ -864,7 +864,7 @@ Returns:
|
|||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
UINT32 Value;
|
UINT32 Value;
|
||||||
UINT64 BarValue64;
|
//UINT64 BarValue64;
|
||||||
UINT32 OriginalValue;
|
UINT32 OriginalValue;
|
||||||
UINT32 Mask;
|
UINT32 Mask;
|
||||||
UINT32 Data;
|
UINT32 Data;
|
||||||
@ -873,7 +873,7 @@ Returns:
|
|||||||
|
|
||||||
OriginalValue = 0;
|
OriginalValue = 0;
|
||||||
Value = 0;
|
Value = 0;
|
||||||
BarValue64 = 0;
|
//BarValue64 = 0;
|
||||||
|
|
||||||
Status = BarExisted (
|
Status = BarExisted (
|
||||||
PciIoDevice,
|
PciIoDevice,
|
||||||
@ -923,7 +923,7 @@ Returns:
|
|||||||
// Need to treat it as no-bar
|
// Need to treat it as no-bar
|
||||||
//
|
//
|
||||||
if (PciIoDevice->PciBar[BarIndex].Length == 0) {
|
if (PciIoDevice->PciBar[BarIndex].Length == 0) {
|
||||||
PciIoDevice->PciBar[BarIndex].BarType = 0;
|
PciIoDevice->PciBar[BarIndex].BarType = PciBarTypeUnknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
PciIoDevice->PciBar[BarIndex].Prefetchable = FALSE;
|
PciIoDevice->PciBar[BarIndex].Prefetchable = FALSE;
|
||||||
|
@ -370,7 +370,7 @@ Returns:
|
|||||||
Count = 1;
|
Count = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Width &= 0x03;
|
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & 0x03);
|
||||||
|
|
||||||
if ((*Offset + Count * ((UINTN)1 << Width)) - 1 >= PciIoDevice->PciBar[BarIndex].Length) {
|
if ((*Offset + Count * ((UINTN)1 << Width)) - 1 >= PciIoDevice->PciBar[BarIndex].Length) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
@ -412,7 +412,7 @@ Returns:
|
|||||||
// If Width is EfiPciIoWidthFifoUintX then convert to EfiPciIoWidthUintX
|
// If Width is EfiPciIoWidthFifoUintX then convert to EfiPciIoWidthUintX
|
||||||
// If Width is EfiPciIoWidthFillUintX then convert to EfiPciIoWidthUintX
|
// If Width is EfiPciIoWidthFillUintX then convert to EfiPciIoWidthUintX
|
||||||
//
|
//
|
||||||
Width &= 0x03;
|
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & 0x03);
|
||||||
|
|
||||||
if (PciIoDevice->IsPciExp) {
|
if (PciIoDevice->IsPciExp) {
|
||||||
if ((*Offset + Count * ((UINTN)1 << Width)) - 1 >= PCI_EXP_MAX_CONFIG_OFFSET) {
|
if ((*Offset + Count * ((UINTN)1 << Width)) - 1 >= PCI_EXP_MAX_CONFIG_OFFSET) {
|
||||||
@ -951,7 +951,7 @@ Returns:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (PciIoDevice->Attributes & EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE) {
|
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 (
|
Status = PciIoDevice->PciRootBridgeIo->Map (
|
||||||
@ -1865,5 +1865,5 @@ Returns:
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (PciDeviceExisted (PciDevice1->Parent, PciDevice2)|| PciDeviceExisted (PciDevice2->Parent, PciDevice1));
|
return (BOOLEAN) ((PciDeviceExisted (PciDevice1->Parent, PciDevice2)|| PciDeviceExisted (PciDevice2->Parent, PciDevice1)));
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
if (Width >= MMIO_COPY_UINT8) {
|
if (Width >= MMIO_COPY_UINT8) {
|
||||||
Width = Width - MMIO_COPY_UINT8;
|
Width = (EFI_IO_WIDTH) (Width - MMIO_COPY_UINT8);
|
||||||
Status = Private->PciRootBridgeIo->CopyMem (
|
Status = Private->PciRootBridgeIo->CopyMem (
|
||||||
Private->PciRootBridgeIo,
|
Private->PciRootBridgeIo,
|
||||||
(EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width,
|
(EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width,
|
||||||
@ -201,7 +201,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
if (Width >= MMIO_COPY_UINT8) {
|
if (Width >= MMIO_COPY_UINT8) {
|
||||||
Width = Width - MMIO_COPY_UINT8;
|
Width = (EFI_IO_WIDTH) (Width - MMIO_COPY_UINT8);
|
||||||
Status = Private->PciRootBridgeIo->CopyMem (
|
Status = Private->PciRootBridgeIo->CopyMem (
|
||||||
Private->PciRootBridgeIo,
|
Private->PciRootBridgeIo,
|
||||||
(EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width,
|
(EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width,
|
||||||
|
@ -1013,7 +1013,7 @@ Returns:
|
|||||||
UINTN OutStride;
|
UINTN OutStride;
|
||||||
|
|
||||||
|
|
||||||
Width = Width & 0x03;
|
Width = (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) (Width & 0x03);
|
||||||
Stride = (UINTN)1 << Width;
|
Stride = (UINTN)1 << Width;
|
||||||
InStride = InStrideFlag ? Stride : 0;
|
InStride = InStrideFlag ? Stride : 0;
|
||||||
OutStride = OutStrideFlag ? Stride : 0;
|
OutStride = OutStrideFlag ? Stride : 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user