/* See KiRosFrldrLpbToNtLpb for details */
Extension->AcpiTable = (PVOID)1;
}
-
+
+#ifndef _M_ARM
+ /* Set headless block pointer */
+ extern HEADLESS_LOADER_BLOCK LoaderRedirectionInformation;
+ extern BOOLEAN WinLdrTerminalConnected;
+ if (WinLdrTerminalConnected)
+ {
+ Extension->HeadlessLoaderBlock = MmHeapAlloc(sizeof(HEADLESS_LOADER_BLOCK));
+ if (Extension->HeadlessLoaderBlock == NULL)
+ {
+ UiMessageBox("Failed to allocate HLB Extension!");
+ while (TRUE);
+ return;
+ }
+ RtlCopyMemory(
+ Extension->HeadlessLoaderBlock,
+ &LoaderRedirectionInformation,
+ sizeof(HEADLESS_LOADER_BLOCK));
+ Extension->HeadlessLoaderBlock = PaToVa(Extension->HeadlessLoaderBlock);
+ }
+#endif
/* Load drivers database */
strcpy(MiscFiles, BootPath);
strcat(MiscFiles, "AppPatch\\drvmain.sdb");
if (LoaderBlock->SetupLdrBlock)
LoaderBlock->SetupLdrBlock = PaToVa(LoaderBlock->SetupLdrBlock);
+
}
BOOLEAN
PVOID DriverBase;
// Separate the path to file name and directory path
- sprintf(DriverPath, "%S", FilePath->Buffer);
+ _snprintf(DriverPath, sizeof(DriverPath), "%wZ", FilePath);
DriverNamePos = strrchr(DriverPath, '\\');
if (DriverNamePos != NULL)
{
}
// It's not loaded, we have to load it
- sprintf(FullPath,"%s%S", BootPath, FilePath->Buffer);
+ _snprintf(FullPath, sizeof(FullPath), "%s%wZ", BootPath, FilePath);
Status = WinLdrLoadImage(FullPath, LoaderBootDriver, &DriverBase);
if (!Status)
return FALSE;
DPRINTM(DPRINT_WINDOWS,"BootOptions: '%s'\n", BootOptions);
}
+ /* Append boot-time options */
+ AppendBootTimeOptions(BootOptions);
+
//
// Check if a ramdisk file was given
//
/* Allocate and minimalistic-initialize LPB */
AllocateAndInitLPB(&LoaderBlock);
-
+
+#ifndef _M_ARM
+ /* Setup redirection support */
+ extern void WinLdrSetupEms(IN PCHAR BootOptions);
+ WinLdrSetupEms(BootOptions);
+#endif
/* Detect hardware */
UseRealHeap = TRUE;
LoaderBlock->ConfigurationRoot = MachHwDetect();