mirror of https://github.com/acidanthera/audk.git
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:
parent
5f300691d0
commit
0b94e31981
|
@ -86,14 +86,14 @@ Returns:
|
||||||
//
|
//
|
||||||
BootMode = BOOT_WITH_FULL_CONFIGURATION;
|
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);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
Status = (**PeiServices).InstallPpi (PeiServices, &mPpiListBootMode);
|
Status = (**PeiServices).InstallPpi ((const EFI_PEI_SERVICES **)PeiServices, &mPpiListBootMode);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
if (BootMode == BOOT_IN_RECOVERY_MODE) {
|
if (BootMode == BOOT_IN_RECOVERY_MODE) {
|
||||||
Status = (**PeiServices).InstallPpi (PeiServices, &mPpiListRecoveryBootMode);
|
Status = (**PeiServices).InstallPpi ((const EFI_PEI_SERVICES **)PeiServices, &mPpiListRecoveryBootMode);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -254,9 +254,6 @@ Returns:
|
||||||
// TODO: This - add argument and description to function comment
|
// TODO: This - add argument and description to function comment
|
||||||
// TODO: InitType - 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;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -291,7 +288,6 @@ Returns:
|
||||||
// TODO: InterruptType - add argument and description to function comment
|
// TODO: InterruptType - add argument and description to function comment
|
||||||
// TODO: InterruptHandler - 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
|
// Do parameter checking for EFI spec conformance
|
||||||
|
@ -302,7 +298,6 @@ Returns:
|
||||||
//
|
//
|
||||||
// Do nothing for Nt32 emulation
|
// Do nothing for Nt32 emulation
|
||||||
//
|
//
|
||||||
Private = CPU_ARCH_PROTOCOL_PRIVATE_DATA_FROM_THIS (This);
|
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,8 +376,6 @@ Returns:
|
||||||
// TODO: Attributes - add argument and description to function comment
|
// TODO: Attributes - add argument and description to function comment
|
||||||
// TODO: EFI_INVALID_PARAMETER - add return value 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
|
// Check for invalid parameter for Spec conformance
|
||||||
//
|
//
|
||||||
|
@ -393,7 +386,6 @@ Returns:
|
||||||
//
|
//
|
||||||
// Do nothing for Nt32 emulation
|
// Do nothing for Nt32 emulation
|
||||||
//
|
//
|
||||||
Private = CPU_ARCH_PROTOCOL_PRIVATE_DATA_FROM_THIS (This);
|
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -426,7 +418,7 @@ Returns:
|
||||||
//
|
//
|
||||||
// Locate DataHub protocol.
|
// Locate DataHub protocol.
|
||||||
//
|
//
|
||||||
Status = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, &DataHub);
|
Status = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, (VOID**)&DataHub);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -319,7 +319,7 @@ Returns:
|
||||||
Count = 1;
|
Count = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Width = Width & 0x03;
|
Width = (EFI_CPU_IO_PROTOCOL_WIDTH)(Width & 0x03);
|
||||||
if (Address - 1 + (1 << Width) * Count > Limit) {
|
if (Address - 1 + (1 << Width) * Count > Limit) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1080,10 +1080,10 @@ EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
FvbProtocolWrite (
|
FvbProtocolWrite (
|
||||||
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
|
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
|
||||||
IN CONST EFI_LBA Lba,
|
IN EFI_LBA Lba,
|
||||||
IN CONST UINTN Offset,
|
IN UINTN Offset,
|
||||||
IN OUT UINTN *NumBytes,
|
IN OUT UINTN *NumBytes,
|
||||||
IN CONST UINT8 *Buffer
|
IN UINT8 *Buffer
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
|
@ -1263,7 +1263,7 @@ Returns:
|
||||||
Ptr = (UINT16 *) FwVolHeader;
|
Ptr = (UINT16 *) FwVolHeader;
|
||||||
Checksum = 0;
|
Checksum = 0;
|
||||||
while (HeaderLength > 0) {
|
while (HeaderLength > 0) {
|
||||||
Checksum = Checksum + (*Ptr);
|
Checksum = (UINT16)(Checksum + (*Ptr));
|
||||||
HeaderLength--;
|
HeaderLength--;
|
||||||
Ptr++;
|
Ptr++;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ Returns:
|
||||||
Status = gBS->HandleProtocol (
|
Status = gBS->HandleProtocol (
|
||||||
FwbHandle,
|
FwbHandle,
|
||||||
&gEfiFirmwareVolumeBlockProtocolGuid,
|
&gEfiFirmwareVolumeBlockProtocolGuid,
|
||||||
&OldFwbInterface
|
(VOID**)&OldFwbInterface
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
|
|
@ -194,10 +194,10 @@ EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
FvbProtocolWrite (
|
FvbProtocolWrite (
|
||||||
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
|
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
|
||||||
IN CONST EFI_LBA Lba,
|
IN EFI_LBA Lba,
|
||||||
IN CONST UINTN Offset,
|
IN UINTN Offset,
|
||||||
IN OUT UINTN *NumBytes,
|
IN OUT UINTN *NumBytes,
|
||||||
IN CONST UINT8 *Buffer
|
IN UINT8 *Buffer
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
|
|
@ -320,7 +320,7 @@ Returns:
|
||||||
// console directly.
|
// console directly.
|
||||||
//
|
//
|
||||||
BdsLibConnectAllDefaultConsoles ();
|
BdsLibConnectAllDefaultConsoles ();
|
||||||
PlatformBdsDiagnostics (IGNORE, TRUE);
|
PlatformBdsDiagnostics ((EXTENDMEM_COVERAGE_LEVEL)IGNORE, TRUE);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Perform some platform specific connect sequence
|
// Perform some platform specific connect sequence
|
||||||
|
@ -379,7 +379,7 @@ Returns:
|
||||||
PlatformBdsNoConsoleAction ();
|
PlatformBdsNoConsoleAction ();
|
||||||
}
|
}
|
||||||
|
|
||||||
PlatformBdsDiagnostics (IGNORE, TRUE);
|
PlatformBdsDiagnostics ((EXTENDMEM_COVERAGE_LEVEL)IGNORE, TRUE);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Perform some platform specific connect sequence
|
// Perform some platform specific connect sequence
|
||||||
|
|
|
@ -168,7 +168,7 @@ Returns:
|
||||||
//
|
//
|
||||||
// Locate data hub protocol.
|
// Locate data hub protocol.
|
||||||
//
|
//
|
||||||
Status = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, &DataHub);
|
Status = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, (VOID**)&DataHub);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "Could not locate DataHub protocol. %r\n", Status));
|
DEBUG ((EFI_D_ERROR, "Could not locate DataHub protocol. %r\n", Status));
|
||||||
|
|
|
@ -36,7 +36,7 @@ InitializeNtReset (
|
||||||
);
|
);
|
||||||
|
|
||||||
STATIC
|
STATIC
|
||||||
EFI_STATUS
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
WinNtResetSystem (
|
WinNtResetSystem (
|
||||||
IN EFI_RESET_TYPE ResetType,
|
IN EFI_RESET_TYPE ResetType,
|
||||||
|
@ -86,7 +86,7 @@ Returns:
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC
|
STATIC
|
||||||
EFI_STATUS
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
WinNtResetSystem (
|
WinNtResetSystem (
|
||||||
IN EFI_RESET_TYPE ResetType,
|
IN EFI_RESET_TYPE ResetType,
|
||||||
|
@ -124,5 +124,5 @@ Returns:
|
||||||
//
|
//
|
||||||
// Should never go here
|
// Should never go here
|
||||||
//
|
//
|
||||||
return EFI_SUCCESS;
|
ASSERT (FALSE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,7 +158,6 @@ Returns:
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
UINTN Index1;
|
UINTN Index1;
|
||||||
UINTN Index2;
|
UINTN Index2;
|
||||||
UINTN PeiIndex;
|
|
||||||
CHAR16 *FileName;
|
CHAR16 *FileName;
|
||||||
CHAR16 *FileNamePtr;
|
CHAR16 *FileNamePtr;
|
||||||
BOOLEAN Done;
|
BOOLEAN Done;
|
||||||
|
@ -185,7 +184,7 @@ Returns:
|
||||||
gSystemMemoryCount = CountSeperatorsInString (MemorySizeStr, '!') + 1;
|
gSystemMemoryCount = CountSeperatorsInString (MemorySizeStr, '!') + 1;
|
||||||
gSystemMemory = calloc (gSystemMemoryCount, sizeof (NT_SYSTEM_MEMORY));
|
gSystemMemory = calloc (gSystemMemoryCount, sizeof (NT_SYSTEM_MEMORY));
|
||||||
if (gSystemMemory == NULL) {
|
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);
|
exit (1);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -194,7 +193,7 @@ Returns:
|
||||||
gFdInfoCount = CountSeperatorsInString (FirmwareVolumesStr, '!') + 1;
|
gFdInfoCount = CountSeperatorsInString (FirmwareVolumesStr, '!') + 1;
|
||||||
gFdInfo = calloc (gFdInfoCount, sizeof (NT_FD_INFO));
|
gFdInfo = calloc (gFdInfoCount, sizeof (NT_FD_INFO));
|
||||||
if (gFdInfo == NULL) {
|
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);
|
exit (1);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -220,7 +219,7 @@ Returns:
|
||||||
*StackPointer = 0x5AA55AA5;
|
*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
|
// Open All the firmware volumes and remember the info in the gFdInfo global
|
||||||
|
@ -233,7 +232,7 @@ Returns:
|
||||||
|
|
||||||
StrCpy (FileNamePtr, (CHAR16*)FirmwareVolumesStr);
|
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;
|
FileName = FileNamePtr;
|
||||||
for (Index1 = 0; (FileNamePtr[Index1] != '!') && (FileNamePtr[Index1] != 0); Index1++)
|
for (Index1 = 0; (FileNamePtr[Index1] != '!') && (FileNamePtr[Index1] != 0); Index1++)
|
||||||
;
|
;
|
||||||
|
@ -255,7 +254,7 @@ Returns:
|
||||||
&gFdInfo[Index].Size
|
&gFdInfo[Index].Size
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
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);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,7 +274,6 @@ Returns:
|
||||||
//
|
//
|
||||||
Status = SecFfsFindPeiCore ((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) gFdInfo[Index].Address, &PeiCoreFile);
|
Status = SecFfsFindPeiCore ((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) gFdInfo[Index].Address, &PeiCoreFile);
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
PeiIndex = Index;
|
|
||||||
printf (" contains SEC Core");
|
printf (" contains SEC Core");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -476,7 +474,7 @@ Returns:
|
||||||
//
|
//
|
||||||
// Processes ASSERT ()
|
// 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)) {
|
} else if (ReportStatusCodeExtractDebugInfo (Data, &ErrorLevel, &Marker, &Format)) {
|
||||||
//
|
//
|
||||||
|
@ -571,7 +569,6 @@ Returns:
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_PHYSICAL_ADDRESS TopOfMemory;
|
|
||||||
VOID *TopOfStack;
|
VOID *TopOfStack;
|
||||||
UINT64 PeiCoreSize;
|
UINT64 PeiCoreSize;
|
||||||
EFI_PHYSICAL_ADDRESS PeiCoreEntryPoint;
|
EFI_PHYSICAL_ADDRESS PeiCoreEntryPoint;
|
||||||
|
@ -582,7 +579,6 @@ Returns:
|
||||||
//
|
//
|
||||||
// Compute Top Of Memory for Stack and PEI Core Allocations
|
// Compute Top Of Memory for Stack and PEI Core Allocations
|
||||||
//
|
//
|
||||||
TopOfMemory = LargestRegion + LargestRegionSize;
|
|
||||||
PeiStackSize = (UINTN)RShiftU64((UINT64)STACK_SIZE,1);
|
PeiStackSize = (UINTN)RShiftU64((UINT64)STACK_SIZE,1);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -595,7 +591,6 @@ Returns:
|
||||||
// |-----------| <---- TemporaryRamBase
|
// |-----------| <---- TemporaryRamBase
|
||||||
//
|
//
|
||||||
TopOfStack = (VOID *)(LargestRegion + PeiStackSize);
|
TopOfStack = (VOID *)(LargestRegion + PeiStackSize);
|
||||||
TopOfMemory = LargestRegion + PeiStackSize;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Reservet space for storing PeiCore's parament in stack.
|
// Reservet space for storing PeiCore's parament in stack.
|
||||||
|
|
|
@ -74,3 +74,9 @@
|
||||||
MSFT:*_*_IA32_PP_FLAGS = /nologo /E /TC /FI$(DEST_DIR_DEBUG)/AutoGen.h
|
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_ASM_FLAGS = /nologo /W3 /WX /c /coff /Cx /Zd /W0 /Zi
|
||||||
MSFT:*_*_IA32_ASMLINK_FLAGS = /link /nologo /tiny
|
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
|
||||||
|
|
|
@ -47,6 +47,10 @@ Abstract:
|
||||||
#pragma warning(disable : 4232)
|
#pragma warning(disable : 4232)
|
||||||
#pragma warning(disable : 4996)
|
#pragma warning(disable : 4996)
|
||||||
|
|
||||||
|
#if __INTEL_COMPILER
|
||||||
|
#pragma warning ( disable : 144 )
|
||||||
|
#endif
|
||||||
|
|
||||||
EFI_WIN_NT_THUNK_PROTOCOL mWinNtThunkTable = {
|
EFI_WIN_NT_THUNK_PROTOCOL mWinNtThunkTable = {
|
||||||
EFI_WIN_NT_THUNK_PROTOCOL_SIGNATURE,
|
EFI_WIN_NT_THUNK_PROTOCOL_SIGNATURE,
|
||||||
GetProcAddress,
|
GetProcAddress,
|
||||||
|
|
|
@ -536,7 +536,9 @@ Returns:
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINTN Result;
|
UINTN Result;
|
||||||
EFI_HANDLE Handle;
|
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
|
// Make sure the Timer Architectural Protocol is not already installed in the system
|
||||||
//
|
//
|
||||||
|
@ -545,16 +547,19 @@ Returns:
|
||||||
//
|
//
|
||||||
// Get the CPU Architectural Protocol instance
|
// Get the CPU Architectural Protocol instance
|
||||||
//
|
//
|
||||||
Status = gBS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, &mCpu);
|
Status = gBS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, (VOID**)&mCpu);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get our handle so the timer tick thread can suspend
|
// Get our handle so the timer tick thread can suspend
|
||||||
//
|
//
|
||||||
|
hSourceProcessHandle = gWinNt->GetCurrentProcess ();
|
||||||
|
hSourceHandle = gWinNt->GetCurrentThread ();
|
||||||
|
hTargetProcessHandle = gWinNt->GetCurrentProcess ();
|
||||||
Result = gWinNt->DuplicateHandle (
|
Result = gWinNt->DuplicateHandle (
|
||||||
gWinNt->GetCurrentProcess (),
|
hSourceProcessHandle,
|
||||||
gWinNt->GetCurrentThread (),
|
hSourceHandle,
|
||||||
gWinNt->GetCurrentProcess (),
|
hTargetProcessHandle,
|
||||||
&mNtMainThreadHandle,
|
&mNtMainThreadHandle,
|
||||||
0,
|
0,
|
||||||
FALSE,
|
FALSE,
|
||||||
|
|
|
@ -73,11 +73,11 @@ Returns:
|
||||||
// Get the PEI NT Autoscan PPI
|
// Get the PEI NT Autoscan PPI
|
||||||
//
|
//
|
||||||
Status = (**PeiServices).LocatePpi (
|
Status = (**PeiServices).LocatePpi (
|
||||||
PeiServices,
|
(const EFI_PEI_SERVICES **)PeiServices,
|
||||||
&gPeiNtAutoScanPpiGuid, // GUID
|
&gPeiNtAutoScanPpiGuid, // GUID
|
||||||
0, // INSTANCE
|
0, // INSTANCE
|
||||||
&PpiDescriptor, // EFI_PEI_PPI_DESCRIPTOR
|
&PpiDescriptor, // EFI_PEI_PPI_DESCRIPTOR
|
||||||
&PeiNtService // PPI
|
(VOID**)&PeiNtService // PPI
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
@ -85,11 +85,11 @@ Returns:
|
||||||
// Get the Memory Test PPI
|
// Get the Memory Test PPI
|
||||||
//
|
//
|
||||||
Status = (**PeiServices).LocatePpi (
|
Status = (**PeiServices).LocatePpi (
|
||||||
PeiServices,
|
(const EFI_PEI_SERVICES **)PeiServices,
|
||||||
&gPeiBaseMemoryTestPpiGuid,
|
&gPeiBaseMemoryTestPpiGuid,
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
&MemoryTestPpi
|
(VOID**)&MemoryTestPpi
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ Returns:
|
||||||
//
|
//
|
||||||
// Register the "tested" memory with the PEI Core
|
// 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);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
Attributes |= EFI_RESOURCE_ATTRIBUTE_TESTED;
|
Attributes |= EFI_RESOURCE_ATTRIBUTE_TESTED;
|
||||||
|
|
|
@ -70,11 +70,11 @@ Returns:
|
||||||
// Get the Fwh Information PPI
|
// Get the Fwh Information PPI
|
||||||
//
|
//
|
||||||
Status = (**PeiServices).LocatePpi (
|
Status = (**PeiServices).LocatePpi (
|
||||||
PeiServices,
|
(const EFI_PEI_SERVICES **)PeiServices,
|
||||||
&gNtFwhPpiGuid, // GUID
|
&gNtFwhPpiGuid, // GUID
|
||||||
0, // INSTANCE
|
0, // INSTANCE
|
||||||
&PpiDescriptor, // EFI_PEI_PPI_DESCRIPTOR
|
&PpiDescriptor, // EFI_PEI_PPI_DESCRIPTOR
|
||||||
&FwhPpi // PPI
|
(VOID**)&FwhPpi // PPI
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ Returns:
|
||||||
&gNtFwhPpiGuid, // GUID
|
&gNtFwhPpiGuid, // GUID
|
||||||
0, // INSTANCE
|
0, // INSTANCE
|
||||||
&PpiDescriptor, // EFI_PEI_PPI_DESCRIPTOR
|
&PpiDescriptor, // EFI_PEI_PPI_DESCRIPTOR
|
||||||
&NtFwhPpi // PPI
|
(VOID**)&NtFwhPpi // PPI
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
|
|
@ -69,11 +69,11 @@ Returns:
|
||||||
DEBUG ((EFI_D_ERROR, "NT 32 WinNT Stuff PEIM Loaded\n"));
|
DEBUG ((EFI_D_ERROR, "NT 32 WinNT Stuff PEIM Loaded\n"));
|
||||||
|
|
||||||
Status = (**PeiServices).LocatePpi (
|
Status = (**PeiServices).LocatePpi (
|
||||||
PeiServices,
|
(const EFI_PEI_SERVICES **)PeiServices,
|
||||||
&gPeiNtThunkPpiGuid, // GUID
|
&gPeiNtThunkPpiGuid, // GUID
|
||||||
0, // INSTANCE
|
0, // INSTANCE
|
||||||
&PpiDescriptor, // EFI_PEI_PPI_DESCRIPTOR
|
&PpiDescriptor, // EFI_PEI_PPI_DESCRIPTOR
|
||||||
&PeiNtService // PPI
|
(VOID**)&PeiNtService // PPI
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue