Fix bundle of issue for ICC build

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6740 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2 2008-11-26 17:59:34 +00:00
parent 35d297c7ac
commit e188a60934
16 changed files with 35 additions and 42 deletions

View File

@ -73,7 +73,7 @@ Returns:
UINTN DestinationStride; UINTN DestinationStride;
UINTN SourceStride; UINTN SourceStride;
Width = Width & 0x03; Width = (EFI_CPU_IO_PROTOCOL_WIDTH) (Width & 0x03);
Stride = (UINTN)1 << Width; Stride = (UINTN)1 << Width;
DestinationStride = DestinationStrideFlag ? Stride : 0; DestinationStride = DestinationStrideFlag ? Stride : 0;
SourceStride = SourceStrideFlag ? Stride : 0; SourceStride = SourceStrideFlag ? Stride : 0;
@ -305,7 +305,7 @@ Returns:
OutStride = 0; OutStride = 0;
} }
Width = Width & 0x03; Width = (EFI_CPU_IO_PROTOCOL_WIDTH) (Width & 0x03);
// //
// Loop for each iteration and move the data // Loop for each iteration and move the data
@ -398,7 +398,7 @@ Returns:
OutStride = 0; OutStride = 0;
} }
Width = Width & 0x03; Width = (EFI_CPU_IO_PROTOCOL_WIDTH) (Width & 0x03);
// //
// Loop for each iteration and move the data // Loop for each iteration and move the data
@ -518,7 +518,7 @@ Returns:
Count = 1; Count = 1;
} }
Width = Width & 0x03; Width = (EFI_CPU_IO_PROTOCOL_WIDTH) (Width & 0x03);
if (Address - 1 + ((UINTN)1 << Width) * Count > Limit) { if (Address - 1 + ((UINTN)1 << Width) * Count > Limit) {
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }

View File

@ -48,6 +48,7 @@
[Sources.IA32] [Sources.IA32]
Ia32/CpuIoAccess.asm | MSFT Ia32/CpuIoAccess.asm | MSFT
Ia32/CpuIoAccess.asm | INTEL
Ia32/CpuIoAccessGNU.c | GCC Ia32/CpuIoAccessGNU.c | GCC
[Sources.X64] [Sources.X64]

View File

@ -148,7 +148,6 @@ InstallMemoryDataHub (
IN VOID *Smbios IN VOID *Smbios
) )
{ {
EFI_STATUS Status;
SMBIOS_STRUCTURE_POINTER SmbiosTable; SMBIOS_STRUCTURE_POINTER SmbiosTable;
EFI_MEMORY_SUBCLASS_DRIVER_DATA DataRecord; EFI_MEMORY_SUBCLASS_DRIVER_DATA DataRecord;
@ -178,7 +177,7 @@ InstallMemoryDataHub (
DataRecord.Record.ArrayStartAddress.PhysicalMemoryArrayLink.SubInstance = EFI_SUBCLASS_INSTANCE_NON_APPLICABLE; DataRecord.Record.ArrayStartAddress.PhysicalMemoryArrayLink.SubInstance = EFI_SUBCLASS_INSTANCE_NON_APPLICABLE;
DataRecord.Record.ArrayStartAddress.MemoryArrayPartitionWidth = (UINT16)(SmbiosTable.Type19->PartitionWidth); DataRecord.Record.ArrayStartAddress.MemoryArrayPartitionWidth = (UINT16)(SmbiosTable.Type19->PartitionWidth);
Status = gDataHub->LogData ( gDataHub->LogData (
gDataHub, gDataHub,
&gEfiMemorySubClassGuid, &gEfiMemorySubClassGuid,
&gEfiMiscProducerGuid, &gEfiMiscProducerGuid,
@ -296,7 +295,7 @@ InstallMiscDataHub (
DataRecord.Record.MiscSystemManufacturer.SystemVersion = 0; DataRecord.Record.MiscSystemManufacturer.SystemVersion = 0;
DataRecord.Record.MiscSystemManufacturer.SystemSerialNumber = 0; DataRecord.Record.MiscSystemManufacturer.SystemSerialNumber = 0;
// DataRecord.Record.MiscSystemManufacturer.SystemUuid = {0}; // DataRecord.Record.MiscSystemManufacturer.SystemUuid = {0};
DataRecord.Record.MiscSystemManufacturer.SystemWakeupType = 0; DataRecord.Record.MiscSystemManufacturer.SystemWakeupType = EfiSystemWakeupTypeReserved;
DataRecord.Record.MiscSystemManufacturer.SystemSKUNumber = 0; DataRecord.Record.MiscSystemManufacturer.SystemSKUNumber = 0;
DataRecord.Record.MiscSystemManufacturer.SystemFamily = 0; DataRecord.Record.MiscSystemManufacturer.SystemFamily = 0;
@ -339,7 +338,7 @@ DataHubGenEntrypoint (
Status = gBS->LocateProtocol ( Status = gBS->LocateProtocol (
&gEfiHiiDatabaseProtocolGuid, &gEfiHiiDatabaseProtocolGuid,
NULL, NULL,
&gHiiDatabase (VOID**)&gHiiDatabase
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {

View File

@ -57,9 +57,9 @@ PrintValue (
UINT8 Char; UINT8 Char;
for (Index = 0; Index < 8; Index++) { for (Index = 0; Index < 8; Index++) {
Char = (UINT8)((Value >> ((7 - Index) * 4)) & 0x0f) + '0'; Char = (UINT8)(((Value >> ((7 - Index) * 4)) & 0x0f) + '0');
if (Char > '9') { if (Char > '9') {
Char = Char - '0' - 10 + 'A'; Char = (UINT8) (Char - '0' - 10 + 'A');
} }
*mCursor = Char; *mCursor = Char;
mCursor += 2; mCursor += 2;

View File

@ -610,13 +610,13 @@ PrepareHobBfv (
UINTN BfvLength UINTN BfvLength
) )
{ {
UINTN BfvLengthPageSize; //UINTN BfvLengthPageSize;
// //
// Calculate BFV location at top of the memory region. // Calculate BFV location at top of the memory region.
// This is like a RAM Disk. Align to page boundry. // This is like a RAM Disk. Align to page boundry.
// //
BfvLengthPageSize = EFI_PAGES_TO_SIZE (EFI_SIZE_TO_PAGES (BfvLength)); //BfvLengthPageSize = EFI_PAGES_TO_SIZE (EFI_SIZE_TO_PAGES (BfvLength));
gHob->Bfv.BaseAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)Bfv; gHob->Bfv.BaseAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)Bfv;
gHob->Bfv.Length = BfvLength; gHob->Bfv.Length = BfvLength;

View File

@ -401,7 +401,7 @@ PrepareFadtTable (
if (AcpiDescription->PM_TMR_BLK.Address == 0) { if (AcpiDescription->PM_TMR_BLK.Address == 0) {
AcpiDescription->PM_TMR_BLK.Address = Fadt->PM_TMR_BLK; AcpiDescription->PM_TMR_BLK.Address = Fadt->PM_TMR_BLK;
AcpiDescription->PM_TMR_BLK.AddressSpaceId = ACPI_ADDRESS_ID_IO; AcpiDescription->PM_TMR_BLK.AddressSpaceId = ACPI_ADDRESS_ID_IO;
AcpiDescription->PM_TMR_BLK.RegisterBitWidth = (AcpiDescription->TMR_VAL_EXT == 0) ? 24 : 32; AcpiDescription->PM_TMR_BLK.RegisterBitWidth = (UINT8) ((AcpiDescription->TMR_VAL_EXT == 0) ? 24 : 32);
} }
return ; return ;

View File

@ -648,7 +648,7 @@ Returns:
// Wait for the serail port to be ready. // Wait for the serail port to be ready.
// //
do { do {
Data = CpuIoRead8 (gComBase + LSR_OFFSET); Data = CpuIoRead8 ((UINT16) (gComBase + LSR_OFFSET));
} while ((Data & LSR_TXRDY) == 0); } while ((Data & LSR_TXRDY) == 0);
CpuIoWrite8 (gComBase, Character); CpuIoWrite8 (gComBase, Character);
@ -674,10 +674,6 @@ Returns:
--*/ --*/
{ {
EFI_STATUS Status;
Status = EFI_SUCCESS;
for ( ; *OutputString != 0; OutputString++) { for ( ; *OutputString != 0; OutputString++) {
DebugSerialWrite (*OutputString); DebugSerialWrite (*OutputString);
} }
@ -869,19 +865,19 @@ Returns:
// Set communications format // Set communications format
// //
OutputData = (UINT8)((DLAB << 7) | ((gBreakSet << 6) | ((gParity << 3) | ((gStop << 2) | Data)))); OutputData = (UINT8)((DLAB << 7) | ((gBreakSet << 6) | ((gParity << 3) | ((gStop << 2) | Data))));
CpuIoWrite8 (gComBase + LCR_OFFSET, OutputData); CpuIoWrite8 ((UINT16) (gComBase + LCR_OFFSET), OutputData);
// //
// Configure baud rate // Configure baud rate
// //
CpuIoWrite8 (gComBase + BAUD_HIGH_OFFSET, (UINT8)(Divisor >> 8)); CpuIoWrite8 ((UINT16) (gComBase + BAUD_HIGH_OFFSET), (UINT8)(Divisor >> 8));
CpuIoWrite8 (gComBase + BAUD_LOW_OFFSET, (UINT8)(Divisor & 0xff)); CpuIoWrite8 ((UINT16) (gComBase + BAUD_LOW_OFFSET), (UINT8)(Divisor & 0xff));
// //
// Switch back to bank 0 // Switch back to bank 0
// //
OutputData = (UINT8)((~DLAB<<7)|((gBreakSet<<6)|((gParity<<3)|((gStop<<2)| Data)))); OutputData = (UINT8)((~DLAB<<7)|((gBreakSet<<6)|((gParity<<3)|((gStop<<2)| Data))));
CpuIoWrite8 (gComBase + LCR_OFFSET, OutputData); CpuIoWrite8 ((UINT16) (gComBase + LCR_OFFSET), OutputData);
*ReportStatusCode = SerialReportStatusCode; *ReportStatusCode = SerialReportStatusCode;
} }

View File

@ -65,9 +65,9 @@ PrintValue (
UINT8 Char; UINT8 Char;
for (Index = 0; Index < 8; Index++) { for (Index = 0; Index < 8; Index++) {
Char = (UINT8)((Value >> ((7 - Index) * 4)) & 0x0f) + '0'; Char = (UINT8)(((Value >> ((7 - Index) * 4)) & 0x0f) + '0');
if (Char > '9') { if (Char > '9') {
Char = Char - '0' - 10 + 'A'; Char = (UINT8) (Char - '0' - 10 + 'A');
} }
*mCursor = Char; *mCursor = Char;
mCursor += 2; mCursor += 2;
@ -76,7 +76,7 @@ PrintValue (
VOID VOID
PrintString ( PrintString (
UINT8 *String CHAR8 *String
) )
{ {
UINT32 Index; UINT32 Index;

View File

@ -38,7 +38,7 @@ PrintValue64 (
VOID VOID
PrintString ( PrintString (
UINT8 *String CHAR8 *String
); );
VOID VOID

View File

@ -40,7 +40,7 @@ EfiLoader (
) )
{ {
BIOS_MEMORY_MAP *BiosMemoryMap; BIOS_MEMORY_MAP *BiosMemoryMap;
EFILDR_HEADER *EFILDRHeader; //EFILDR_HEADER *EFILDRHeader;
EFILDR_IMAGE *EFILDRImage; EFILDR_IMAGE *EFILDRImage;
EFI_MEMORY_DESCRIPTOR EfiMemoryDescriptor[EFI_MAX_MEMORY_DESCRIPTORS]; EFI_MEMORY_DESCRIPTOR EfiMemoryDescriptor[EFI_MAX_MEMORY_DESCRIPTORS];
EFI_STATUS Status; EFI_STATUS Status;
@ -78,7 +78,7 @@ EfiLoader (
// Get information on where the image is in memory // Get information on where the image is in memory
// //
EFILDRHeader = (EFILDR_HEADER *)(UINTN)(EFILDR_HEADER_ADDRESS); //EFILDRHeader = (EFILDR_HEADER *)(UINTN)(EFILDR_HEADER_ADDRESS);
EFILDRImage = (EFILDR_IMAGE *)(UINTN)(EFILDR_HEADER_ADDRESS + sizeof(EFILDR_HEADER)); EFILDRImage = (EFILDR_IMAGE *)(UINTN)(EFILDR_HEADER_ADDRESS + sizeof(EFILDR_HEADER));

View File

@ -477,7 +477,7 @@ PrintHeader ('P');
case EFI_IMAGE_REL_BASED_LOW: case EFI_IMAGE_REL_BASED_LOW:
F16 = (UINT16 *) Fixup; F16 = (UINT16 *) Fixup;
*F16 = *F16 + (UINT16) Adjust; *F16 = (UINT16) (*F16 + (UINT16) Adjust);
if (FixupData != NULL) { if (FixupData != NULL) {
*(UINT16 *) FixupData = *F16; *(UINT16 *) FixupData = *F16;
FixupData = FixupData + sizeof(UINT16); FixupData = FixupData + sizeof(UINT16);
@ -618,19 +618,19 @@ EfiLdrPeCoffCheckImageMachineType (
Status = EFI_UNSUPPORTED; Status = EFI_UNSUPPORTED;
#if EFI32 #ifdef EFI32
if (MachineType == EFI_IMAGE_MACHINE_IA32) { if (MachineType == EFI_IMAGE_MACHINE_IA32) {
Status = EFI_SUCCESS; Status = EFI_SUCCESS;
} }
#endif #endif
#if EFIX64 #ifdef EFIX64
if (MachineType == EFI_IMAGE_MACHINE_X64) { if (MachineType == EFI_IMAGE_MACHINE_X64) {
Status = EFI_SUCCESS; Status = EFI_SUCCESS;
} }
#endif #endif
#if EFI64 #ifdef EFI64
if (MachineType == EFI_IMAGE_MACHINE_IA64) { if (MachineType == EFI_IMAGE_MACHINE_IA64) {
Status = EFI_SUCCESS; Status = EFI_SUCCESS;
} }

View File

@ -632,7 +632,6 @@ Returns: (VOID)
} }
} }
return ;
} }
EFI_STATUS EFI_STATUS

View File

@ -667,8 +667,6 @@ Returns:
Variable.CurrPtr = GetNextVariablePtr (Variable.CurrPtr); Variable.CurrPtr = GetNextVariablePtr (Variable.CurrPtr);
} }
return EFI_NOT_FOUND;
} }
EFI_STATUS EFI_STATUS

View File

@ -217,7 +217,7 @@ UpdateMemoryMap (
Memory = MemoryDescHob.MemDesc[Index].PhysicalStart; Memory = MemoryDescHob.MemDesc[Index].PhysicalStart;
Status = gBS->AllocatePages ( Status = gBS->AllocatePages (
AllocateAddress, AllocateAddress,
MemoryDescHob.MemDesc[Index].Type, (EFI_MEMORY_TYPE)MemoryDescHob.MemDesc[Index].Type,
(UINTN)MemoryDescHob.MemDesc[Index].NumberOfPages, (UINTN)MemoryDescHob.MemDesc[Index].NumberOfPages,
&Memory &Memory
); );
@ -1491,7 +1491,7 @@ Returns:
Length--; Length--;
} }
return ((0xFF - CheckSum) + 1); return (UINT8)((0xFF - CheckSum) + 1);
} }
EFI_STATUS EFI_STATUS

View File

@ -153,7 +153,7 @@ Returns:
EFI_STATUS Status; EFI_STATUS Status;
RTC_REGISTER_A RegisterA; RTC_REGISTER_A RegisterA;
RTC_REGISTER_B RegisterB; RTC_REGISTER_B RegisterB;
RTC_REGISTER_C RegisterC; //RTC_REGISTER_C RegisterC;
RTC_REGISTER_D RegisterD; RTC_REGISTER_D RegisterD;
UINT8 Century; UINT8 Century;
EFI_TIME Time; EFI_TIME Time;
@ -180,7 +180,7 @@ Returns:
// //
// Clear RTC flag register // Clear RTC flag register
// //
RegisterC.Data = RtcRead (RTC_ADDRESS_REGISTER_C); //RegisterC.Data = RtcRead (RTC_ADDRESS_REGISTER_C);
// //
// Clear RTC register D // Clear RTC register D
@ -270,7 +270,7 @@ Routine Description:
EFI_STATUS Status; EFI_STATUS Status;
RTC_REGISTER_B RegisterB; RTC_REGISTER_B RegisterB;
UINT8 Century; UINT8 Century;
UINTN BufferSize; //UINTN BufferSize;
// //
// Check parameters for null pointer // Check parameters for null pointer
@ -328,7 +328,7 @@ Routine Description:
Time->TimeZone = Global->SavedTimeZone; Time->TimeZone = Global->SavedTimeZone;
Time->Daylight = Global->Daylight; Time->Daylight = Global->Daylight;
BufferSize = sizeof (INT16) + sizeof (UINT8); //BufferSize = sizeof (INT16) + sizeof (UINT8);
// //
// Make sure all field values are in correct range // Make sure all field values are in correct range