summaryrefslogtreecommitdiff
path: root/Nt32Pkg/Sec
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-10-14 08:59:32 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-10-14 08:59:32 +0000
commit0b94e31981fde83116598dc7a2c8a346d46fd3cf (patch)
treeb5fe86e1cc9555b1a45434403fa36d7d2331187e /Nt32Pkg/Sec
parent5f300691d0ef724c1580924da6ba6750794d918e (diff)
downloadedk2-platforms-0b94e31981fde83116598dc7a2c8a346d46fd3cf.tar.xz
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
Diffstat (limited to 'Nt32Pkg/Sec')
-rw-r--r--Nt32Pkg/Sec/SecMain.c17
-rw-r--r--Nt32Pkg/Sec/SecMain.inf6
-rw-r--r--Nt32Pkg/Sec/WinNtThunk.c4
3 files changed, 16 insertions, 11 deletions
diff --git a/Nt32Pkg/Sec/SecMain.c b/Nt32Pkg/Sec/SecMain.c
index 54fcaa1225..345f1915e6 100644
--- a/Nt32Pkg/Sec/SecMain.c
+++ b/Nt32Pkg/Sec/SecMain.c
@@ -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.
diff --git a/Nt32Pkg/Sec/SecMain.inf b/Nt32Pkg/Sec/SecMain.inf
index 95cd30e2ea..406e174466 100644
--- a/Nt32Pkg/Sec/SecMain.inf
+++ b/Nt32Pkg/Sec/SecMain.inf
@@ -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
diff --git a/Nt32Pkg/Sec/WinNtThunk.c b/Nt32Pkg/Sec/WinNtThunk.c
index 7e2be38ddd..ef1dcb464d 100644
--- a/Nt32Pkg/Sec/WinNtThunk.c
+++ b/Nt32Pkg/Sec/WinNtThunk.c
@@ -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,