summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DuetPkg/CpuIoDxe/CpuIo.c8
-rw-r--r--DuetPkg/CpuIoDxe/CpuIo.inf1
-rw-r--r--DuetPkg/DataHubGenDxe/DataHubGen.c7
-rw-r--r--DuetPkg/DxeIpl/Debug.c4
-rw-r--r--DuetPkg/DxeIpl/HobGeneration.c4
-rw-r--r--DuetPkg/DxeIpl/LegacyTable.c2
-rw-r--r--DuetPkg/DxeIpl/SerialStatusCode.c14
-rw-r--r--DuetPkg/EfiLdr/Debug.c6
-rw-r--r--DuetPkg/EfiLdr/Debug.h2
-rw-r--r--DuetPkg/EfiLdr/EfiLdr.h2
-rw-r--r--DuetPkg/EfiLdr/EfiLoader.c4
-rw-r--r--DuetPkg/EfiLdr/PeLoader.c8
-rw-r--r--DuetPkg/EfiLdr/TianoDecompress.c1
-rw-r--r--DuetPkg/FSVariable/FSVariable.c2
-rw-r--r--DuetPkg/Library/DuetBdsLib/BdsPlatform.c4
-rw-r--r--DuetPkg/PcRtc/RealTimeClock.c8
16 files changed, 35 insertions, 42 deletions
diff --git a/DuetPkg/CpuIoDxe/CpuIo.c b/DuetPkg/CpuIoDxe/CpuIo.c
index e946bd45cd..9e5be46df8 100644
--- a/DuetPkg/CpuIoDxe/CpuIo.c
+++ b/DuetPkg/CpuIoDxe/CpuIo.c
@@ -73,7 +73,7 @@ Returns:
UINTN DestinationStride;
UINTN SourceStride;
- Width = Width & 0x03;
+ Width = (EFI_CPU_IO_PROTOCOL_WIDTH) (Width & 0x03);
Stride = (UINTN)1 << Width;
DestinationStride = DestinationStrideFlag ? Stride : 0;
SourceStride = SourceStrideFlag ? Stride : 0;
@@ -305,7 +305,7 @@ Returns:
OutStride = 0;
}
- Width = Width & 0x03;
+ Width = (EFI_CPU_IO_PROTOCOL_WIDTH) (Width & 0x03);
//
// Loop for each iteration and move the data
@@ -398,7 +398,7 @@ Returns:
OutStride = 0;
}
- Width = Width & 0x03;
+ Width = (EFI_CPU_IO_PROTOCOL_WIDTH) (Width & 0x03);
//
// Loop for each iteration and move the data
@@ -518,7 +518,7 @@ Returns:
Count = 1;
}
- Width = Width & 0x03;
+ Width = (EFI_CPU_IO_PROTOCOL_WIDTH) (Width & 0x03);
if (Address - 1 + ((UINTN)1 << Width) * Count > Limit) {
return EFI_UNSUPPORTED;
}
diff --git a/DuetPkg/CpuIoDxe/CpuIo.inf b/DuetPkg/CpuIoDxe/CpuIo.inf
index b803169049..b99e23cc41 100644
--- a/DuetPkg/CpuIoDxe/CpuIo.inf
+++ b/DuetPkg/CpuIoDxe/CpuIo.inf
@@ -48,6 +48,7 @@
[Sources.IA32]
Ia32/CpuIoAccess.asm | MSFT
+ Ia32/CpuIoAccess.asm | INTEL
Ia32/CpuIoAccessGNU.c | GCC
[Sources.X64]
diff --git a/DuetPkg/DataHubGenDxe/DataHubGen.c b/DuetPkg/DataHubGenDxe/DataHubGen.c
index dcb42bb96b..3878b74fc5 100644
--- a/DuetPkg/DataHubGenDxe/DataHubGen.c
+++ b/DuetPkg/DataHubGenDxe/DataHubGen.c
@@ -148,7 +148,6 @@ InstallMemoryDataHub (
IN VOID *Smbios
)
{
- EFI_STATUS Status;
SMBIOS_STRUCTURE_POINTER SmbiosTable;
EFI_MEMORY_SUBCLASS_DRIVER_DATA DataRecord;
@@ -178,7 +177,7 @@ InstallMemoryDataHub (
DataRecord.Record.ArrayStartAddress.PhysicalMemoryArrayLink.SubInstance = EFI_SUBCLASS_INSTANCE_NON_APPLICABLE;
DataRecord.Record.ArrayStartAddress.MemoryArrayPartitionWidth = (UINT16)(SmbiosTable.Type19->PartitionWidth);
- Status = gDataHub->LogData (
+ gDataHub->LogData (
gDataHub,
&gEfiMemorySubClassGuid,
&gEfiMiscProducerGuid,
@@ -296,7 +295,7 @@ InstallMiscDataHub (
DataRecord.Record.MiscSystemManufacturer.SystemVersion = 0;
DataRecord.Record.MiscSystemManufacturer.SystemSerialNumber = 0;
// DataRecord.Record.MiscSystemManufacturer.SystemUuid = {0};
- DataRecord.Record.MiscSystemManufacturer.SystemWakeupType = 0;
+ DataRecord.Record.MiscSystemManufacturer.SystemWakeupType = EfiSystemWakeupTypeReserved;
DataRecord.Record.MiscSystemManufacturer.SystemSKUNumber = 0;
DataRecord.Record.MiscSystemManufacturer.SystemFamily = 0;
@@ -339,7 +338,7 @@ DataHubGenEntrypoint (
Status = gBS->LocateProtocol (
&gEfiHiiDatabaseProtocolGuid,
NULL,
- &gHiiDatabase
+ (VOID**)&gHiiDatabase
);
if (EFI_ERROR (Status)) {
diff --git a/DuetPkg/DxeIpl/Debug.c b/DuetPkg/DxeIpl/Debug.c
index 45d3a41411..cc93174abc 100644
--- a/DuetPkg/DxeIpl/Debug.c
+++ b/DuetPkg/DxeIpl/Debug.c
@@ -57,9 +57,9 @@ PrintValue (
UINT8 Char;
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') {
- Char = Char - '0' - 10 + 'A';
+ Char = (UINT8) (Char - '0' - 10 + 'A');
}
*mCursor = Char;
mCursor += 2;
diff --git a/DuetPkg/DxeIpl/HobGeneration.c b/DuetPkg/DxeIpl/HobGeneration.c
index 2d7c437254..0158ea7884 100644
--- a/DuetPkg/DxeIpl/HobGeneration.c
+++ b/DuetPkg/DxeIpl/HobGeneration.c
@@ -610,13 +610,13 @@ PrepareHobBfv (
UINTN BfvLength
)
{
- UINTN BfvLengthPageSize;
+ //UINTN BfvLengthPageSize;
//
// Calculate BFV location at top of the memory region.
// 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.Length = BfvLength;
diff --git a/DuetPkg/DxeIpl/LegacyTable.c b/DuetPkg/DxeIpl/LegacyTable.c
index 4b19064ee4..ba9106915e 100644
--- a/DuetPkg/DxeIpl/LegacyTable.c
+++ b/DuetPkg/DxeIpl/LegacyTable.c
@@ -401,7 +401,7 @@ PrepareFadtTable (
if (AcpiDescription->PM_TMR_BLK.Address == 0) {
AcpiDescription->PM_TMR_BLK.Address = Fadt->PM_TMR_BLK;
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 ;
diff --git a/DuetPkg/DxeIpl/SerialStatusCode.c b/DuetPkg/DxeIpl/SerialStatusCode.c
index 1112273373..4c5badf8f5 100644
--- a/DuetPkg/DxeIpl/SerialStatusCode.c
+++ b/DuetPkg/DxeIpl/SerialStatusCode.c
@@ -648,7 +648,7 @@ Returns:
// Wait for the serail port to be ready.
//
do {
- Data = CpuIoRead8 (gComBase + LSR_OFFSET);
+ Data = CpuIoRead8 ((UINT16) (gComBase + LSR_OFFSET));
} while ((Data & LSR_TXRDY) == 0);
CpuIoWrite8 (gComBase, Character);
@@ -674,10 +674,6 @@ Returns:
--*/
{
- EFI_STATUS Status;
-
- Status = EFI_SUCCESS;
-
for ( ; *OutputString != 0; OutputString++) {
DebugSerialWrite (*OutputString);
}
@@ -869,19 +865,19 @@ Returns:
// Set communications format
//
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
//
- CpuIoWrite8 (gComBase + BAUD_HIGH_OFFSET, (UINT8)(Divisor >> 8));
- CpuIoWrite8 (gComBase + BAUD_LOW_OFFSET, (UINT8)(Divisor & 0xff));
+ CpuIoWrite8 ((UINT16) (gComBase + BAUD_HIGH_OFFSET), (UINT8)(Divisor >> 8));
+ CpuIoWrite8 ((UINT16) (gComBase + BAUD_LOW_OFFSET), (UINT8)(Divisor & 0xff));
//
// Switch back to bank 0
//
OutputData = (UINT8)((~DLAB<<7)|((gBreakSet<<6)|((gParity<<3)|((gStop<<2)| Data))));
- CpuIoWrite8 (gComBase + LCR_OFFSET, OutputData);
+ CpuIoWrite8 ((UINT16) (gComBase + LCR_OFFSET), OutputData);
*ReportStatusCode = SerialReportStatusCode;
}
diff --git a/DuetPkg/EfiLdr/Debug.c b/DuetPkg/EfiLdr/Debug.c
index 2cc8c73a1e..13d9c74c46 100644
--- a/DuetPkg/EfiLdr/Debug.c
+++ b/DuetPkg/EfiLdr/Debug.c
@@ -65,9 +65,9 @@ PrintValue (
UINT8 Char;
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') {
- Char = Char - '0' - 10 + 'A';
+ Char = (UINT8) (Char - '0' - 10 + 'A');
}
*mCursor = Char;
mCursor += 2;
@@ -76,7 +76,7 @@ PrintValue (
VOID
PrintString (
- UINT8 *String
+ CHAR8 *String
)
{
UINT32 Index;
diff --git a/DuetPkg/EfiLdr/Debug.h b/DuetPkg/EfiLdr/Debug.h
index 9939109e91..ea091774ca 100644
--- a/DuetPkg/EfiLdr/Debug.h
+++ b/DuetPkg/EfiLdr/Debug.h
@@ -38,7 +38,7 @@ PrintValue64 (
VOID
PrintString (
- UINT8 *String
+ CHAR8 *String
);
VOID
diff --git a/DuetPkg/EfiLdr/EfiLdr.h b/DuetPkg/EfiLdr/EfiLdr.h
index 58b9c220c0..979ed1d691 100644
--- a/DuetPkg/EfiLdr/EfiLdr.h
+++ b/DuetPkg/EfiLdr/EfiLdr.h
@@ -89,4 +89,4 @@ VOID
IN EFILDRHANDOFF *Handoff
);
-#endif //_DUET_EFI_LOADER_H_ \ No newline at end of file
+#endif //_DUET_EFI_LOADER_H_
diff --git a/DuetPkg/EfiLdr/EfiLoader.c b/DuetPkg/EfiLdr/EfiLoader.c
index 88bce2f074..6f214d2930 100644
--- a/DuetPkg/EfiLdr/EfiLoader.c
+++ b/DuetPkg/EfiLdr/EfiLoader.c
@@ -40,7 +40,7 @@ EfiLoader (
)
{
BIOS_MEMORY_MAP *BiosMemoryMap;
- EFILDR_HEADER *EFILDRHeader;
+ //EFILDR_HEADER *EFILDRHeader;
EFILDR_IMAGE *EFILDRImage;
EFI_MEMORY_DESCRIPTOR EfiMemoryDescriptor[EFI_MAX_MEMORY_DESCRIPTORS];
EFI_STATUS Status;
@@ -78,7 +78,7 @@ EfiLoader (
// 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));
diff --git a/DuetPkg/EfiLdr/PeLoader.c b/DuetPkg/EfiLdr/PeLoader.c
index 721befb32e..c4cbbe34c4 100644
--- a/DuetPkg/EfiLdr/PeLoader.c
+++ b/DuetPkg/EfiLdr/PeLoader.c
@@ -477,7 +477,7 @@ PrintHeader ('P');
case EFI_IMAGE_REL_BASED_LOW:
F16 = (UINT16 *) Fixup;
- *F16 = *F16 + (UINT16) Adjust;
+ *F16 = (UINT16) (*F16 + (UINT16) Adjust);
if (FixupData != NULL) {
*(UINT16 *) FixupData = *F16;
FixupData = FixupData + sizeof(UINT16);
@@ -618,19 +618,19 @@ EfiLdrPeCoffCheckImageMachineType (
Status = EFI_UNSUPPORTED;
-#if EFI32
+#ifdef EFI32
if (MachineType == EFI_IMAGE_MACHINE_IA32) {
Status = EFI_SUCCESS;
}
#endif
-#if EFIX64
+#ifdef EFIX64
if (MachineType == EFI_IMAGE_MACHINE_X64) {
Status = EFI_SUCCESS;
}
#endif
-#if EFI64
+#ifdef EFI64
if (MachineType == EFI_IMAGE_MACHINE_IA64) {
Status = EFI_SUCCESS;
}
diff --git a/DuetPkg/EfiLdr/TianoDecompress.c b/DuetPkg/EfiLdr/TianoDecompress.c
index 6e4bba7b36..cac9938146 100644
--- a/DuetPkg/EfiLdr/TianoDecompress.c
+++ b/DuetPkg/EfiLdr/TianoDecompress.c
@@ -632,7 +632,6 @@ Returns: (VOID)
}
}
- return ;
}
EFI_STATUS
diff --git a/DuetPkg/FSVariable/FSVariable.c b/DuetPkg/FSVariable/FSVariable.c
index ef762eab46..3a5fcc4e5f 100644
--- a/DuetPkg/FSVariable/FSVariable.c
+++ b/DuetPkg/FSVariable/FSVariable.c
@@ -667,8 +667,6 @@ Returns:
Variable.CurrPtr = GetNextVariablePtr (Variable.CurrPtr);
}
-
- return EFI_NOT_FOUND;
}
EFI_STATUS
diff --git a/DuetPkg/Library/DuetBdsLib/BdsPlatform.c b/DuetPkg/Library/DuetBdsLib/BdsPlatform.c
index bb8c9bc563..5dfa016bbd 100644
--- a/DuetPkg/Library/DuetBdsLib/BdsPlatform.c
+++ b/DuetPkg/Library/DuetBdsLib/BdsPlatform.c
@@ -217,7 +217,7 @@ UpdateMemoryMap (
Memory = MemoryDescHob.MemDesc[Index].PhysicalStart;
Status = gBS->AllocatePages (
AllocateAddress,
- MemoryDescHob.MemDesc[Index].Type,
+ (EFI_MEMORY_TYPE)MemoryDescHob.MemDesc[Index].Type,
(UINTN)MemoryDescHob.MemDesc[Index].NumberOfPages,
&Memory
);
@@ -1491,7 +1491,7 @@ Returns:
Length--;
}
- return ((0xFF - CheckSum) + 1);
+ return (UINT8)((0xFF - CheckSum) + 1);
}
EFI_STATUS
diff --git a/DuetPkg/PcRtc/RealTimeClock.c b/DuetPkg/PcRtc/RealTimeClock.c
index b677cc5c95..1df9945d4e 100644
--- a/DuetPkg/PcRtc/RealTimeClock.c
+++ b/DuetPkg/PcRtc/RealTimeClock.c
@@ -153,7 +153,7 @@ Returns:
EFI_STATUS Status;
RTC_REGISTER_A RegisterA;
RTC_REGISTER_B RegisterB;
- RTC_REGISTER_C RegisterC;
+ //RTC_REGISTER_C RegisterC;
RTC_REGISTER_D RegisterD;
UINT8 Century;
EFI_TIME Time;
@@ -180,7 +180,7 @@ Returns:
//
// Clear RTC flag register
//
- RegisterC.Data = RtcRead (RTC_ADDRESS_REGISTER_C);
+ //RegisterC.Data = RtcRead (RTC_ADDRESS_REGISTER_C);
//
// Clear RTC register D
@@ -270,7 +270,7 @@ Routine Description:
EFI_STATUS Status;
RTC_REGISTER_B RegisterB;
UINT8 Century;
- UINTN BufferSize;
+ //UINTN BufferSize;
//
// Check parameters for null pointer
@@ -328,7 +328,7 @@ Routine Description:
Time->TimeZone = Global->SavedTimeZone;
Time->Daylight = Global->Daylight;
- BufferSize = sizeof (INT16) + sizeof (UINT8);
+ //BufferSize = sizeof (INT16) + sizeof (UINT8);
//
// Make sure all field values are in correct range