Fix ICC building issue for Nt32 platform.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6110 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2 2008-10-14 08:59:32 +00:00
parent 5f300691d0
commit 0b94e31981
17 changed files with 58 additions and 56 deletions

View File

@ -86,14 +86,14 @@ Returns:
//
BootMode = BOOT_WITH_FULL_CONFIGURATION;
Status = (**PeiServices).SetBootMode (PeiServices, (UINT8) BootMode);
Status = (**PeiServices).SetBootMode ((const EFI_PEI_SERVICES **)PeiServices, (UINT8) BootMode);
ASSERT_EFI_ERROR (Status);
Status = (**PeiServices).InstallPpi (PeiServices, &mPpiListBootMode);
Status = (**PeiServices).InstallPpi ((const EFI_PEI_SERVICES **)PeiServices, &mPpiListBootMode);
ASSERT_EFI_ERROR (Status);
if (BootMode == BOOT_IN_RECOVERY_MODE) {
Status = (**PeiServices).InstallPpi (PeiServices, &mPpiListRecoveryBootMode);
Status = (**PeiServices).InstallPpi ((const EFI_PEI_SERVICES **)PeiServices, &mPpiListRecoveryBootMode);
ASSERT_EFI_ERROR (Status);
}

View File

@ -254,9 +254,6 @@ Returns:
// TODO: This - add argument and description to function comment
// TODO: InitType - add argument and description to function comment
{
CPU_ARCH_PROTOCOL_PRIVATE *Private;
Private = CPU_ARCH_PROTOCOL_PRIVATE_DATA_FROM_THIS (This);
return EFI_UNSUPPORTED;
}
@ -291,7 +288,6 @@ Returns:
// TODO: InterruptType - add argument and description to function comment
// TODO: InterruptHandler - add argument and description to function comment
{
CPU_ARCH_PROTOCOL_PRIVATE *Private;
//
// Do parameter checking for EFI spec conformance
@ -302,7 +298,6 @@ Returns:
//
// Do nothing for Nt32 emulation
//
Private = CPU_ARCH_PROTOCOL_PRIVATE_DATA_FROM_THIS (This);
return EFI_UNSUPPORTED;
}
@ -381,8 +376,6 @@ Returns:
// TODO: Attributes - add argument and description to function comment
// TODO: EFI_INVALID_PARAMETER - add return value to function comment
{
CPU_ARCH_PROTOCOL_PRIVATE *Private;
//
// Check for invalid parameter for Spec conformance
//
@ -393,7 +386,6 @@ Returns:
//
// Do nothing for Nt32 emulation
//
Private = CPU_ARCH_PROTOCOL_PRIVATE_DATA_FROM_THIS (This);
return EFI_UNSUPPORTED;
}
@ -426,7 +418,7 @@ Returns:
//
// Locate DataHub protocol.
//
Status = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, &DataHub);
Status = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, (VOID**)&DataHub);
if (EFI_ERROR (Status)) {
return;
}

View File

@ -319,7 +319,7 @@ Returns:
Count = 1;
}
Width = Width & 0x03;
Width = (EFI_CPU_IO_PROTOCOL_WIDTH)(Width & 0x03);
if (Address - 1 + (1 << Width) * Count > Limit) {
return EFI_UNSUPPORTED;
}

View File

@ -1080,10 +1080,10 @@ EFI_STATUS
EFIAPI
FvbProtocolWrite (
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
IN CONST EFI_LBA Lba,
IN CONST UINTN Offset,
IN OUT UINTN *NumBytes,
IN CONST UINT8 *Buffer
IN EFI_LBA Lba,
IN UINTN Offset,
IN OUT UINTN *NumBytes,
IN UINT8 *Buffer
)
/*++
@ -1263,7 +1263,7 @@ Returns:
Ptr = (UINT16 *) FwVolHeader;
Checksum = 0;
while (HeaderLength > 0) {
Checksum = Checksum + (*Ptr);
Checksum = (UINT16)(Checksum + (*Ptr));
HeaderLength--;
Ptr++;
}
@ -1492,7 +1492,7 @@ Returns:
Status = gBS->HandleProtocol (
FwbHandle,
&gEfiFirmwareVolumeBlockProtocolGuid,
&OldFwbInterface
(VOID**)&OldFwbInterface
);
ASSERT_EFI_ERROR (Status);

View File

@ -194,10 +194,10 @@ EFI_STATUS
EFIAPI
FvbProtocolWrite (
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
IN CONST EFI_LBA Lba,
IN CONST UINTN Offset,
IN OUT UINTN *NumBytes,
IN CONST UINT8 *Buffer
IN EFI_LBA Lba,
IN UINTN Offset,
IN OUT UINTN *NumBytes,
IN UINT8 *Buffer
);
EFI_STATUS

View File

@ -320,7 +320,7 @@ Returns:
// console directly.
//
BdsLibConnectAllDefaultConsoles ();
PlatformBdsDiagnostics (IGNORE, TRUE);
PlatformBdsDiagnostics ((EXTENDMEM_COVERAGE_LEVEL)IGNORE, TRUE);
//
// Perform some platform specific connect sequence
@ -379,7 +379,7 @@ Returns:
PlatformBdsNoConsoleAction ();
}
PlatformBdsDiagnostics (IGNORE, TRUE);
PlatformBdsDiagnostics ((EXTENDMEM_COVERAGE_LEVEL)IGNORE, TRUE);
//
// Perform some platform specific connect sequence

View File

@ -168,7 +168,7 @@ Returns:
//
// Locate data hub protocol.
//
Status = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, &DataHub);
Status = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, (VOID**)&DataHub);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "Could not locate DataHub protocol. %r\n", Status));

View File

@ -36,7 +36,7 @@ InitializeNtReset (
);
STATIC
EFI_STATUS
VOID
EFIAPI
WinNtResetSystem (
IN EFI_RESET_TYPE ResetType,
@ -86,7 +86,7 @@ Returns:
}
STATIC
EFI_STATUS
VOID
EFIAPI
WinNtResetSystem (
IN EFI_RESET_TYPE ResetType,
@ -124,5 +124,5 @@ Returns:
//
// Should never go here
//
return EFI_SUCCESS;
ASSERT (FALSE);
}

View File

@ -158,7 +158,6 @@ Returns:
UINTN Index;
UINTN Index1;
UINTN Index2;
UINTN PeiIndex;
CHAR16 *FileName;
CHAR16 *FileNamePtr;
BOOLEAN Done;
@ -185,7 +184,7 @@ Returns:
gSystemMemoryCount = CountSeperatorsInString (MemorySizeStr, '!') + 1;
gSystemMemory = calloc (gSystemMemoryCount, sizeof (NT_SYSTEM_MEMORY));
if (gSystemMemory == NULL) {
printf ("ERROR : Can not allocate memory for %s. Exiting.\n", MemorySizeStr);
wprintf (L"ERROR : Can not allocate memory for %s. Exiting.\n", MemorySizeStr);
exit (1);
}
//
@ -194,7 +193,7 @@ Returns:
gFdInfoCount = CountSeperatorsInString (FirmwareVolumesStr, '!') + 1;
gFdInfo = calloc (gFdInfoCount, sizeof (NT_FD_INFO));
if (gFdInfo == NULL) {
printf ("ERROR : Can not allocate memory for %s. Exiting.\n", FirmwareVolumesStr);
wprintf (L"ERROR : Can not allocate memory for %s. Exiting.\n", FirmwareVolumesStr);
exit (1);
}
//
@ -220,7 +219,7 @@ Returns:
*StackPointer = 0x5AA55AA5;
}
printf (" SEC passing in %d bytes of temp RAM to PEI\n", InitialStackMemorySize);
wprintf (L" SEC passing in %d bytes of temp RAM to PEI\n", InitialStackMemorySize);
//
// Open All the firmware volumes and remember the info in the gFdInfo global
@ -233,7 +232,7 @@ Returns:
StrCpy (FileNamePtr, (CHAR16*)FirmwareVolumesStr);
for (Done = FALSE, Index = 0, PeiIndex = 0, PeiCoreFile = NULL; !Done; Index++) {
for (Done = FALSE, Index = 0, PeiCoreFile = NULL; !Done; Index++) {
FileName = FileNamePtr;
for (Index1 = 0; (FileNamePtr[Index1] != '!') && (FileNamePtr[Index1] != 0); Index1++)
;
@ -255,7 +254,7 @@ Returns:
&gFdInfo[Index].Size
);
if (EFI_ERROR (Status)) {
printf ("ERROR : Can not open Firmware Device File %S (%r). Exiting.\n", FileName, Status);
printf ("ERROR : Can not open Firmware Device File %S (0x%X). Exiting.\n", FileName, Status);
exit (1);
}
@ -275,7 +274,6 @@ Returns:
//
Status = SecFfsFindPeiCore ((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) gFdInfo[Index].Address, &PeiCoreFile);
if (!EFI_ERROR (Status)) {
PeiIndex = Index;
printf (" contains SEC Core");
}
}
@ -476,7 +474,7 @@ Returns:
//
// Processes ASSERT ()
//
printf ("ASSERT %s(%d): %s\n", Filename, LineNumber, Description);
printf ("ASSERT %s(%d): %s\n", Filename, (int)LineNumber, Description);
} else if (ReportStatusCodeExtractDebugInfo (Data, &ErrorLevel, &Marker, &Format)) {
//
@ -571,7 +569,6 @@ Returns:
--*/
{
EFI_STATUS Status;
EFI_PHYSICAL_ADDRESS TopOfMemory;
VOID *TopOfStack;
UINT64 PeiCoreSize;
EFI_PHYSICAL_ADDRESS PeiCoreEntryPoint;
@ -582,7 +579,6 @@ Returns:
//
// Compute Top Of Memory for Stack and PEI Core Allocations
//
TopOfMemory = LargestRegion + LargestRegionSize;
PeiStackSize = (UINTN)RShiftU64((UINT64)STACK_SIZE,1);
//
@ -595,7 +591,6 @@ Returns:
// |-----------| <---- TemporaryRamBase
//
TopOfStack = (VOID *)(LargestRegion + PeiStackSize);
TopOfMemory = LargestRegion + PeiStackSize;
//
// Reservet space for storing PeiCore's parament in stack.

View File

@ -74,3 +74,9 @@
MSFT:*_*_IA32_PP_FLAGS = /nologo /E /TC /FI$(DEST_DIR_DEBUG)/AutoGen.h
MSFT:*_*_IA32_ASM_FLAGS = /nologo /W3 /WX /c /coff /Cx /Zd /W0 /Zi
MSFT:*_*_IA32_ASMLINK_FLAGS = /link /nologo /tiny
INTEL:*_*_IA32_DLINK_FLAGS = /out:"$(BIN_DIR)\SecMain.exe" /base:0x10000000 /pdb:"$(BIN_DIR)\SecMain.pdb" /LIBPATH:"C:\Program Files\Intel\Compiler\C++\9.1\IA32\Lib" /LIBPATH:"$(VCINSTALLDIR)\Lib" /LIBPATH:"$(VCINSTALLDIR)\PlatformSdk\Lib" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:I386 /LTCG Kernel32.lib MSVCRTD.lib Gdi32.lib User32.lib Winmm.lib
INTEL:*_*_IA32_CC_FLAGS = /nologo /W4 /WX /Gy /c /D UNICODE /Od /FI$(DEST_DIR_DEBUG)/AutoGen.h /EHs-c- /GF /Gs8192 /Zi /Gm /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE
INTEL:*_*_IA32_PP_FLAGS = /nologo /E /TC /FI$(DEST_DIR_DEBUG)/AutoGen.h
INTEL:*_*_IA32_ASM_FLAGS = /nologo /W3 /WX /c /coff /Cx /Zd /W0 /Zi
INTEL:*_*_IA32_ASMLINK_FLAGS = /link /nologo /tiny

View File

@ -47,6 +47,10 @@ Abstract:
#pragma warning(disable : 4232)
#pragma warning(disable : 4996)
#if __INTEL_COMPILER
#pragma warning ( disable : 144 )
#endif
EFI_WIN_NT_THUNK_PROTOCOL mWinNtThunkTable = {
EFI_WIN_NT_THUNK_PROTOCOL_SIGNATURE,
GetProcAddress,

View File

@ -536,7 +536,9 @@ Returns:
EFI_STATUS Status;
UINTN Result;
EFI_HANDLE Handle;
EFI_HANDLE hSourceProcessHandle;
EFI_HANDLE hSourceHandle;
EFI_HANDLE hTargetProcessHandle;
//
// Make sure the Timer Architectural Protocol is not already installed in the system
//
@ -545,16 +547,19 @@ Returns:
//
// Get the CPU Architectural Protocol instance
//
Status = gBS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, &mCpu);
Status = gBS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, (VOID**)&mCpu);
ASSERT_EFI_ERROR (Status);
//
// Get our handle so the timer tick thread can suspend
//
hSourceProcessHandle = gWinNt->GetCurrentProcess ();
hSourceHandle = gWinNt->GetCurrentThread ();
hTargetProcessHandle = gWinNt->GetCurrentProcess ();
Result = gWinNt->DuplicateHandle (
gWinNt->GetCurrentProcess (),
gWinNt->GetCurrentThread (),
gWinNt->GetCurrentProcess (),
hSourceProcessHandle,
hSourceHandle,
hTargetProcessHandle,
&mNtMainThreadHandle,
0,
FALSE,

View File

@ -73,11 +73,11 @@ Returns:
// Get the PEI NT Autoscan PPI
//
Status = (**PeiServices).LocatePpi (
PeiServices,
(const EFI_PEI_SERVICES **)PeiServices,
&gPeiNtAutoScanPpiGuid, // GUID
0, // INSTANCE
&PpiDescriptor, // EFI_PEI_PPI_DESCRIPTOR
&PeiNtService // PPI
(VOID**)&PeiNtService // PPI
);
ASSERT_EFI_ERROR (Status);
@ -85,11 +85,11 @@ Returns:
// Get the Memory Test PPI
//
Status = (**PeiServices).LocatePpi (
PeiServices,
(const EFI_PEI_SERVICES **)PeiServices,
&gPeiBaseMemoryTestPpiGuid,
0,
NULL,
&MemoryTestPpi
(VOID**)&MemoryTestPpi
);
ASSERT_EFI_ERROR (Status);
@ -124,7 +124,7 @@ Returns:
//
// Register the "tested" memory with the PEI Core
//
Status = (**PeiServices).InstallPeiMemory (PeiServices, MemoryBase, MemorySize);
Status = (**PeiServices).InstallPeiMemory ((const EFI_PEI_SERVICES **)PeiServices, MemoryBase, MemorySize);
ASSERT_EFI_ERROR (Status);
Attributes |= EFI_RESOURCE_ATTRIBUTE_TESTED;

View File

@ -70,11 +70,11 @@ Returns:
// Get the Fwh Information PPI
//
Status = (**PeiServices).LocatePpi (
PeiServices,
(const EFI_PEI_SERVICES **)PeiServices,
&gNtFwhPpiGuid, // GUID
0, // INSTANCE
&PpiDescriptor, // EFI_PEI_PPI_DESCRIPTOR
&FwhPpi // PPI
(VOID**)&FwhPpi // PPI
);
ASSERT_EFI_ERROR (Status);

View File

@ -70,7 +70,7 @@ Returns:
&gNtFwhPpiGuid, // GUID
0, // INSTANCE
&PpiDescriptor, // EFI_PEI_PPI_DESCRIPTOR
&NtFwhPpi // PPI
(VOID**)&NtFwhPpi // PPI
);
ASSERT_EFI_ERROR (Status);

View File

@ -31,4 +31,4 @@ typedef struct {
EFI_DEVICE_PATH_PROTOCOL EndDevicePath;
} WIN_NT_THUNK_DEVICE_PATH;
#endif
#endif

View File

@ -69,11 +69,11 @@ Returns:
DEBUG ((EFI_D_ERROR, "NT 32 WinNT Stuff PEIM Loaded\n"));
Status = (**PeiServices).LocatePpi (
PeiServices,
(const EFI_PEI_SERVICES **)PeiServices,
&gPeiNtThunkPpiGuid, // GUID
0, // INSTANCE
&PpiDescriptor, // EFI_PEI_PPI_DESCRIPTOR
&PeiNtService // PPI
(VOID**)&PeiNtService // PPI
);
ASSERT_EFI_ERROR (Status);