/*++\r
\r
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
\r
--*/\r
{\r
- if (Width < 0 || Width >= EfiPciIoWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciIoWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
{\r
UINT64 ExtendOffset;\r
\r
- if (Width < 0 || Width >= EfiPciIoWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciIoWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);\r
\r
- if (Width < 0 || Width >= EfiPciIoWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciIoWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);\r
\r
- if (Width < 0 || Width > EfiPciIoWidthUint64) {\r
+ if ((UINT32)Width > EfiPciIoWidthUint64) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);\r
\r
- if (Width < 0 || Width >= EfiPciIoWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciIoWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);\r
\r
- if (Width < 0 || Width >= EfiPciIoWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciIoWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);\r
\r
- if (Width < 0 || Width >= EfiPciIoWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciIoWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);\r
\r
- if (Width < 0 || Width >= EfiPciIoWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciIoWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);\r
\r
- if (Width < 0 || Width >= EfiPciIoWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciIoWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);\r
\r
- if (Operation < 0 || Operation >= EfiPciIoOperationMaximum) {\r
+ if ((UINT32)Operation >= EfiPciIoOperationMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
/*++\r
\r
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
\r
Private = DEVICE_IO_PRIVATE_DATA_FROM_THIS (This);\r
\r
- if (Width < 0 || Width >= MMIO_COPY_UINT8) {\r
+ if ((UINT32)Width >= MMIO_COPY_UINT8) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
Private = DEVICE_IO_PRIVATE_DATA_FROM_THIS (This);\r
\r
- if (Width < 0 || Width >= MMIO_COPY_UINT8) {\r
+ if ((UINT32)Width >= MMIO_COPY_UINT8) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
Private = DEVICE_IO_PRIVATE_DATA_FROM_THIS (This);\r
\r
- if (Operation < 0 || Operation > EfiBusMasterCommonBuffer) {\r
+ if ((UINT32)Operation > EfiBusMasterCommonBuffer) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- if ((Type >= MaxAllocateType) || (Type < AllocateAnyPages)) {\r
+ if ((UINT32)Type >= MaxAllocateType) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
UINT64 PciExpressRegAddr;\r
BOOLEAN UsePciExpressAccess;\r
\r
- if (Width < 0 || Width >= EfiPciWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
/*++\r
\r
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- if (Width < 0 || Width >= EfiPciWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
/*++\r
\r
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
}\r
\r
\r
- if (Width < 0 || Width > EfiPciWidthUint64) {\r
+ if ((UINT32)Width > EfiPciWidthUint64) {\r
return EFI_INVALID_PARAMETER;\r
}\r
//\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- if (Width < 0 || Width > EfiPciWidthUint64) {\r
+ if ((UINT32)Width > EfiPciWidthUint64) {\r
return EFI_INVALID_PARAMETER;\r
}\r
//\r
\r
In.buf = Buffer;\r
Out.buf = (VOID *)(UINTN) Address;\r
- if (Width >= EfiPciWidthUint8 && Width <= EfiPciWidthUint64) {\r
+ if ((UINT32)Width <= EfiPciWidthUint64) {\r
return PcatRootBridgeIoMemRW (Width, Count, TRUE, In, TRUE, Out);\r
}\r
if (Width >= EfiPciWidthFifoUint8 && Width <= EfiPciWidthFifoUint64) {\r
\r
In.buf = (VOID *)(UINTN) Address;\r
Out.buf = Buffer;\r
- if (Width >= EfiPciWidthUint8 && Width <= EfiPciWidthUint64) {\r
+ if ((UINT32)Width <= EfiPciWidthUint64) {\r
return PcatRootBridgeIoMemRW (Width, Count, TRUE, In, TRUE, Out);\r
}\r
if (Width >= EfiPciWidthFifoUint8 && Width <= EfiPciWidthFifoUint64) {\r
UINTN Index;\r
UINT64 Result;\r
\r
- if (Width < 0 || Width > EfiPciWidthUint64) {\r
+ if ((UINT32)Width > EfiPciWidthUint64) {\r
return EFI_INVALID_PARAMETER;\r
} \r
\r
//\r
// Make sure that Operation is valid\r
//\r
- if (Operation < 0 || Operation >= EfiPciOperationMaximum) {\r
+ if ((UINT32)Operation >= EfiPciOperationMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
UINT64 PciExpressRegAddr;\r
BOOLEAN UsePciExpressAccess;\r
\r
- if (Width < 0 || Width >= EfiPciWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
Platform required to support EFI drivers that consume Device I/O\r
Platform required to support EFI applications that consume Device I/O\r
\r
-Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
Private = DEVICE_IO_PRIVATE_DATA_FROM_THIS (This);\r
\r
- if (Width < 0 || Width >= MMIO_COPY_UINT8) {\r
+ if ((UINT32)Width >= MMIO_COPY_UINT8) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
Private = DEVICE_IO_PRIVATE_DATA_FROM_THIS (This);\r
\r
- if (Width < 0 || Width >= MMIO_COPY_UINT8) {\r
+ if ((UINT32)Width >= MMIO_COPY_UINT8) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
Private = DEVICE_IO_PRIVATE_DATA_FROM_THIS (This);\r
\r
- if (Operation < 0 || Operation > EfiBusMasterCommonBuffer) {\r
+ if ((UINT32)Operation > EfiBusMasterCommonBuffer) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- if ((Type >= MaxAllocateType) || (Type < AllocateAnyPages)) {\r
+ if ((UINT32)Type >= MaxAllocateType) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
/*++ @file
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2010 - 2011, Apple Inc. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
Private = GOP_PRIVATE_DATA_FROM_THIS (This);
- if ((BltOperation < 0) || (BltOperation >= EfiGraphicsOutputBltOperationMax)) {
+ if ((UINT32)BltOperation >= EfiGraphicsOutputBltOperationMax) {
return EFI_INVALID_PARAMETER;
}
/** @file\r
The implementation for EFI_ISA_IO_PROTOCOL. \r
\r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
EFI_ISA_ACPI_RESOURCE *Item;\r
EFI_STATUS Status;\r
\r
- if (Width < EfiIsaIoWidthUint8 ||\r
- Width >= EfiIsaIoWidthMaximum ||\r
+ if ((UINT32)Width >= EfiIsaIoWidthMaximum ||\r
Width == EfiIsaIoWidthReserved ||\r
Width == EfiIsaIoWidthFifoReserved ||\r
Width == EfiIsaIoWidthFillReserved\r
//\r
// Make sure the Operation parameter is valid\r
//\r
- if (Operation < 0 || Operation >= EfiIsaIoOperationMaximum) {\r
+ if ((UINT32)Operation >= EfiIsaIoOperationMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- if (Type < AllocateAnyPages || Type >= MaxAllocateType) {\r
+ if ((UINT32)Type >= MaxAllocateType) {\r
return EFI_INVALID_PARAMETER;\r
}\r
//\r
/** @file\r
The implementation for EFI_ISA_IO_PROTOCOL. \r
\r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
EFI_ISA_ACPI_RESOURCE *Item;\r
EFI_STATUS Status;\r
\r
- if (Width < EfiIsaIoWidthUint8 ||\r
- Width >= EfiIsaIoWidthMaximum ||\r
+ if ((UINT32)Width >= EfiIsaIoWidthMaximum ||\r
Width == EfiIsaIoWidthReserved ||\r
Width == EfiIsaIoWidthFifoReserved ||\r
Width == EfiIsaIoWidthFillReserved\r
//\r
// Make sure the Operation parameter is valid\r
//\r
- if (Operation < 0 || Operation >= EfiIsaIoOperationMaximum) {\r
+ if ((UINT32)Operation >= EfiIsaIoOperationMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- if (Type < AllocateAnyPages || Type >= MaxAllocateType) {\r
+ if ((UINT32)Type >= MaxAllocateType) {\r
return EFI_INVALID_PARAMETER;\r
}\r
//\r
/** @file\r
Uses the services of the I/O Library to produce the CPU I/O Protocol\r
\r
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
//\r
// Check to see if Width is in the valid range\r
//\r
- if (Width < 0 || Width >= EfiCpuIoWidthMaximum) {\r
+ if ((UINT32)Width >= EfiCpuIoWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
/** @file\r
EFI PCI IO protocol functions implementation for PCI Bus module.\r
\r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
IN UINT64 *Offset\r
)\r
{\r
- if (Width < 0 || Width >= EfiPciIoWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciIoWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
{\r
UINT64 ExtendOffset;\r
\r
- if (Width < 0 || Width >= EfiPciIoWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciIoWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);\r
\r
- if (Width < 0 || Width >= EfiPciIoWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciIoWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);\r
\r
- if (Width < 0 || Width > EfiPciIoWidthUint64) {\r
+ if ((UINT32)Width > EfiPciIoWidthUint64) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);\r
\r
- if (Width < 0 || Width >= EfiPciIoWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciIoWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);\r
\r
- if (Width < 0 || Width >= EfiPciIoWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciIoWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);\r
\r
- if (Width < 0 || Width >= EfiPciIoWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciIoWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);\r
\r
- if (Width < 0 || Width >= EfiPciIoWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciIoWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);\r
\r
- if (Width < 0 || Width >= EfiPciIoWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciIoWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
\r
PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);\r
\r
- if (Operation < 0 || Operation >= EfiPciIoOperationMaximum) {\r
+ if ((UINT32)Operation >= EfiPciIoOperationMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- if (Type < 0 || Type > TimerRelative || (Event->Type & EVT_TIMER) == 0) {\r
+ if ((UINT32)Type > TimerRelative || (Event->Type & EVT_TIMER) == 0) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
The GCD services are used to manage the memory and I/O regions that\r
are accessible to the CPU that is executing the DXE core.\r
\r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
//\r
// Make sure parameters are valid\r
//\r
- if (GcdAllocateType < 0 || GcdAllocateType >= EfiGcdMaxAllocateType) {\r
+ if ((UINT32)GcdAllocateType >= EfiGcdMaxAllocateType) {\r
DEBUG ((DEBUG_GCD, " Status = %r\n", EFI_INVALID_PARAMETER));\r
return EFI_INVALID_PARAMETER;\r
}\r
- if (GcdMemoryType < 0 || GcdMemoryType >= EfiGcdMemoryTypeMaximum) {\r
+ if ((UINT32)GcdMemoryType >= EfiGcdMemoryTypeMaximum) {\r
DEBUG ((DEBUG_GCD, " Status = %r\n", EFI_INVALID_PARAMETER));\r
return EFI_INVALID_PARAMETER;\r
}\r
- if (GcdIoType < 0 || GcdIoType >= EfiGcdIoTypeMaximum) {\r
+ if ((UINT32)GcdIoType >= EfiGcdIoTypeMaximum) {\r
DEBUG ((DEBUG_GCD, " Status = %r\n", EFI_INVALID_PARAMETER));\r
return EFI_INVALID_PARAMETER;\r
}\r
// Make sure the memory type in the gMemoryTypeInformation[] array is valid\r
//\r
Type = (EFI_MEMORY_TYPE) (gMemoryTypeInformation[Index].Type);\r
- if (Type < 0 || Type > EfiMaxMemoryType) {\r
+ if ((UINT32)Type > EfiMaxMemoryType) {\r
continue;\r
}\r
if (gMemoryTypeInformation[Index].NumberOfPages != 0) {\r
// Make sure the memory type in the gMemoryTypeInformation[] array is valid\r
//\r
Type = (EFI_MEMORY_TYPE) (gMemoryTypeInformation[FreeIndex].Type);\r
- if (Type < 0 || Type > EfiMaxMemoryType) {\r
+ if ((UINT32)Type > EfiMaxMemoryType) {\r
continue;\r
}\r
\r
// Make sure the memory type in the gMemoryTypeInformation[] array is valid\r
//\r
Type = (EFI_MEMORY_TYPE) (gMemoryTypeInformation[Index].Type);\r
- if (Type < 0 || Type > EfiMaxMemoryType) {\r
+ if ((UINT32)Type > EfiMaxMemoryType) {\r
continue;\r
}\r
if (gMemoryTypeInformation[Index].NumberOfPages != 0) {\r
//\r
// Update counters for the number of pages allocated to each memory type\r
//\r
- if (Entry->Type >= 0 && Entry->Type < EfiMaxMemoryType) {\r
+ if ((UINT32)Entry->Type < EfiMaxMemoryType) {\r
if ((Start >= mMemoryTypeStatistics[Entry->Type].BaseAddress && Start <= mMemoryTypeStatistics[Entry->Type].MaximumAddress) ||\r
(Start >= mDefaultBaseAddress && Start <= mDefaultMaximumAddress) ) {\r
if (NumberOfPages > mMemoryTypeStatistics[Entry->Type].CurrentNumberOfPages) {\r
}\r
}\r
\r
- if (NewType >= 0 && NewType < EfiMaxMemoryType) {\r
+ if ((UINT32)NewType < EfiMaxMemoryType) {\r
if ((Start >= mMemoryTypeStatistics[NewType].BaseAddress && Start <= mMemoryTypeStatistics[NewType].MaximumAddress) ||\r
(Start >= mDefaultBaseAddress && Start <= mDefaultMaximumAddress) ) {\r
mMemoryTypeStatistics[NewType].CurrentNumberOfPages += NumberOfPages;\r
//\r
// Attempt to find free pages in the preferred bin based on the requested memory type\r
//\r
- if (NewType >= 0 && NewType < EfiMaxMemoryType && MaxAddress >= mMemoryTypeStatistics[NewType].MaximumAddress) {\r
+ if ((UINT32)NewType < EfiMaxMemoryType && MaxAddress >= mMemoryTypeStatistics[NewType].MaximumAddress) {\r
Start = CoreFindFreePagesI (\r
mMemoryTypeStatistics[NewType].MaximumAddress, \r
mMemoryTypeStatistics[NewType].BaseAddress, \r
UINT64 MaxAddress;\r
UINTN Alignment;\r
\r
- if (Type < AllocateAnyPages || Type >= (UINTN) MaxAllocateType) {\r
+ if ((UINT32)Type >= MaxAllocateType) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
POOL *Pool;\r
UINTN Index;\r
\r
- if (MemoryType >= 0 && MemoryType < EfiMaxMemoryType) {\r
+ if ((UINT32)MemoryType < EfiMaxMemoryType) {\r
return &mPoolHead[MemoryType];\r
}\r
\r
// portion of that memory type has been freed. If it has, then free the\r
// list entry for that memory type\r
//\r
- if (Pool->MemoryType < 0 && Pool->Used == 0) {\r
+ if ((INT32)Pool->MemoryType < 0 && Pool->Used == 0) {\r
RemoveEntryList (&Pool->Link);\r
CoreFreePoolI (Pool);\r
}\r
/** @file\r
-Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
Private = CIRRUS_LOGIC_5430_PRIVATE_DATA_FROM_GRAPHICS_OUTPUT_THIS (This);\r
\r
- if ((BltOperation < 0) || (BltOperation >= EfiGraphicsOutputBltOperationMax)) {\r
+ if ((UINT32)BltOperation >= EfiGraphicsOutputBltOperationMax) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
CirrusLogic5430.c file which deals with the EFI 1.1 driver model.\r
This file just does graphics.\r
\r
- Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
Private = CIRRUS_LOGIC_5430_PRIVATE_DATA_FROM_UGA_DRAW_THIS (This);\r
\r
- if ((BltOperation < 0) || (BltOperation >= EfiUgaBltMax)) {\r
+ if ((UINT32)BltOperation >= EfiUgaBltMax) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
/** @file\r
This contains the installation function for the driver.\r
\r
-Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
OUT UINT8 *Vector\r
)\r
{\r
- if (Irq < Efi8259Irq0 || Irq > Efi8259Irq15) {\r
+ if ((UINT32)Irq > Efi8259Irq15) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
IN BOOLEAN LevelTriggered\r
)\r
{\r
- if (Irq < Efi8259Irq0 || Irq > Efi8259Irq15) {\r
+ if ((UINT32)Irq > Efi8259Irq15) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
IN EFI_8259_IRQ Irq\r
)\r
{\r
- if (Irq < Efi8259Irq0 || Irq > Efi8259Irq15) {\r
+ if ((UINT32)Irq > Efi8259Irq15) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
IN EFI_8259_IRQ Irq\r
)\r
{\r
- if (Irq < Efi8259Irq0 || Irq > Efi8259Irq15) {\r
+ if ((UINT32)Irq > Efi8259Irq15) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
/** @file\r
Provides the basic interfaces to abstract a PCI Host Bridge Resource Allocation\r
\r
-Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are\r
licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- if (Phase < EfiPciBeforeChildBusEnumeration || Phase > EfiPciBeforeResourceCollection) {\r
+ if ((UINT32)Phase > EfiPciBeforeResourceCollection) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
/** @file\r
PCI Root Bridge Io Protocol implementation\r
\r
-Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are\r
licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
//\r
// Check to see if Width is in the valid range\r
//\r
- if (Width < EfiPciWidthUint8 || Width >= EfiPciWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPciWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- if (Width < 0 || Width > EfiPciWidthUint64) {\r
+ if ((UINT32)Width > EfiPciWidthUint64) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- if (Width < 0 || Width > EfiPciWidthUint64) {\r
+ if ((UINT32)Width > EfiPciWidthUint64) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
UINTN Index;\r
UINT64 Result;\r
\r
- if (Width < 0 || Width > EfiPciWidthUint64) {\r
+ if ((UINT32)Width > EfiPciWidthUint64) {\r
return EFI_INVALID_PARAMETER;\r
} \r
\r
//\r
// Make sure that Operation is valid\r
//\r
- if (Operation < 0 || Operation >= EfiPciOperationMaximum) {\r
+ if ((UINT32)Operation >= EfiPciOperationMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
/** @file\r
Produces the CPU I/O 2 Protocol.\r
\r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
//\r
// Check to see if Width is in the valid range\r
//\r
- if (Width < 0 || Width >= EfiCpuIoWidthMaximum) {\r
+ if ((UINT32)Width >= EfiCpuIoWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
/** @file\r
Produces the SMM CPU I/O Protocol.\r
\r
-Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
//\r
// Check to see if Width is in the valid range\r
//\r
- if (Width < 0 || Width > SMM_IO_UINT64) {\r
+ if ((UINT32)Width > SMM_IO_UINT64) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
/** @file\r
Produces the CPU I/O PPI.\r
\r
-Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
//\r
// Check to see if Width is in the valid range\r
//\r
- if (Width < 0 || Width >= EfiPeiCpuIoWidthMaximum) {\r
+ if ((UINT32)Width >= EfiPeiCpuIoWidthMaximum) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r