NT_FD_INFO *gFdInfo;\r
\r
//\r
-// Array that supports seperate memory rantes.\r
+// Array that supports separate memory ranges.\r
// The memory ranges are set by PcdWinNtMemorySizeForSecMain.\r
// The number of array elements is allocated base on parsing\r
// PcdWinNtMemorySizeForSecMain value and the memory is never freed.\r
\r
Routine Description:\r
Return the FD Size and base address. Since the FD is loaded from a\r
- file into host memory only the SEC will know it's address.\r
+ file into host memory only the SEC will know its address.\r
\r
Arguments:\r
Index - Which FD, starts at zero.\r
Returns:\r
EFI_SUCCESS - The file was opened and mapped.\r
EFI_NOT_FOUND - FileName was not found in the current directory\r
- EFI_DEVICE_ERROR - An error occured attempting to map the opened file\r
+ EFI_DEVICE_ERROR - An error occurred attempting to map the opened file\r
\r
--*/\r
{\r
INTN\r
EFIAPI\r
main (\r
- IN INTN Argc,\r
+ IN INT Argc,\r
IN CHAR8 **Argv,\r
IN CHAR8 **Envp\r
)\r
VOID *SecFile;\r
CHAR16 *MemorySizeStr;\r
CHAR16 *FirmwareVolumesStr;\r
- UINT32 ProcessAffinityMask;\r
- UINT32 SystemAffinityMask;\r
+ UINTN ProcessAffinityMask;\r
+ UINTN SystemAffinityMask;\r
INT32 LowBit;\r
\r
//\r
MemorySizeStr = (CHAR16 *) PcdGetPtr (PcdEmuMemorySize);\r
FirmwareVolumesStr = (CHAR16 *) PcdGetPtr (PcdEmuFirmwareVolume);\r
\r
- SecPrint ("\nEDK II WIN Host Emulation Environment from http://www.tianocore.org/edk2/\n");\r
+ SecPrint ("\n\rEDK II WIN Host Emulation Environment from http://www.tianocore.org/edk2/\n\r");\r
\r
//\r
// Determine the first thread available to this process.\r
//\r
if (GetProcessAffinityMask (GetCurrentProcess (), &ProcessAffinityMask, &SystemAffinityMask)) {\r
- LowBit = (INT32)LowBitSet32 (ProcessAffinityMask);\r
+ LowBit = (INT32)LowBitSet32 ((UINT32)ProcessAffinityMask);\r
if (LowBit != -1) {\r
//\r
// Force the system to bind the process to a single thread to work\r
gSystemMemoryCount = CountSeparatorsInString (MemorySizeStr, '!') + 1;\r
gSystemMemory = calloc (gSystemMemoryCount, sizeof (NT_SYSTEM_MEMORY));\r
if (gSystemMemory == NULL) {\r
- SecPrint ("ERROR : Can not allocate memory for %S. Exiting.\n", MemorySizeStr);\r
+ SecPrint ("ERROR : Can not allocate memory for %S. Exiting.\n\r", MemorySizeStr);\r
exit (1);\r
}\r
\r
gFdInfoCount = CountSeparatorsInString (FirmwareVolumesStr, '!') + 1;\r
gFdInfo = calloc (gFdInfoCount, sizeof (NT_FD_INFO));\r
if (gFdInfo == NULL) {\r
- SecPrint ("ERROR : Can not allocate memory for %S. Exiting.\n", FirmwareVolumesStr);\r
+ SecPrint ("ERROR : Can not allocate memory for %S. Exiting.\n\r", FirmwareVolumesStr);\r
exit (1);\r
}\r
//\r
// Setup Boot Mode.\r
//\r
- SecPrint (" BootMode 0x%02x\n", PcdGet32 (PcdEmuBootMode));\r
+ SecPrint (" BootMode 0x%02x\n\r", PcdGet32 (PcdEmuBootMode));\r
\r
//\r
// Allocate 128K memory to emulate temp memory for PEI.\r
TemporaryRamSize = TEMPORARY_RAM_SIZE;\r
TemporaryRam = VirtualAlloc (NULL, (SIZE_T) (TemporaryRamSize), MEM_COMMIT, PAGE_EXECUTE_READWRITE);\r
if (TemporaryRam == NULL) {\r
- SecPrint ("ERROR : Can not allocate enough space for SecStack\n");\r
+ SecPrint ("ERROR : Can not allocate enough space for SecStack\n\r");\r
exit (1);\r
}\r
SetMem32 (TemporaryRam, TemporaryRamSize, PcdGet32 (PcdInitValueInTempStack));\r
\r
- SecPrint (" OS Emulator passing in %u KB of temp RAM at 0x%08lx to SEC\n",\r
+ SecPrint (" OS Emulator passing in %u KB of temp RAM at 0x%08lx to SEC\n\r",\r
TemporaryRamSize / SIZE_1KB,\r
TemporaryRam\r
);\r
&Size\r
);\r
if (EFI_ERROR (Status)) {\r
- SecPrint ("ERROR : Could not allocate PeiServicesTablePage @ %p\n", EmuMagicPage);\r
+ SecPrint ("ERROR : Could not allocate PeiServicesTablePage @ %p\n\r", EmuMagicPage);\r
return EFI_DEVICE_ERROR;\r
}\r
}\r
//\r
FileNamePtr = AllocateCopyPool (StrSize (FirmwareVolumesStr), FirmwareVolumesStr);\r
if (FileNamePtr == NULL) {\r
- SecPrint ("ERROR : Can not allocate memory for firmware volume string\n");\r
+ SecPrint ("ERROR : Can not allocate memory for firmware volume string\n\r");\r
exit (1);\r
}\r
\r
&gFdInfo[Index].Size\r
);\r
if (EFI_ERROR (Status)) {\r
- SecPrint ("ERROR : Can not open Firmware Device File %S (0x%X). Exiting.\n", FileName, Status);\r
+ SecPrint ("ERROR : Can not open Firmware Device File %S (0x%X). Exiting.\n\r", FileName, Status);\r
exit (1);\r
}\r
\r
- SecPrint (" FD loaded from %S\n", FileName);\r
+ SecPrint (" FD loaded from %S", FileName);\r
\r
if (SecFile == NULL) {\r
//\r
}\r
}\r
\r
- SecPrint ("\n");\r
+ SecPrint ("\n\r");\r
}\r
//\r
// Calculate memory regions and store the information in the gSystemMemory\r
MemorySizeStr = MemorySizeStr + Index1 + 1;\r
}\r
\r
- SecPrint ("\n");\r
+ SecPrint ("\n\r");\r
\r
//\r
// Hand off to SEC Core\r
// If we get here, then the SEC Core returned. This is an error as SEC should\r
// always hand off to PEI Core and then on to DXE Core.\r
//\r
- SecPrint ("ERROR : SEC returned\n");\r
+ SecPrint ("ERROR : SEC returned\n\r");\r
exit (1);\r
}\r
\r
SecCorePe32File - SEC Core PE32\r
\r
Returns:\r
- Success means control is transfered and thus we should never return\r
+ Success means control is transferred and thus we should never return\r
\r
--*/\r
{\r
// the *.dll file as a library using Windows* APIs. This allows\r
// source level debug. The image is still loaded and relocated\r
// in the Framework memory space like on a real system (by the code above),\r
- // but the entry point points into the DLL loaded by the code bellow.\r
+ // but the entry point points into the DLL loaded by the code below.\r
//\r
\r
DllEntryPoint = NULL;\r