mirror of
https://github.com/reactos/reactos.git
synced 2024-08-20 18:35:32 +00:00
Patch by Anton Yarotsky:
[FREELDR]: Fix Headless support. svn path=/trunk/; revision=48772
This commit is contained in:
parent
7a26c678b7
commit
c806e95592
|
@ -237,11 +237,6 @@ WinLdrInitializeHeadlessPort(VOID)
|
|||
StallExecutionProcessor(WinLdrTerminalDelay);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* The port was bogus, so don't give any information to the kernel */
|
||||
RtlZeroMemory(&LoaderRedirectionInformation, sizeof(HEADLESS_LOADER_BLOCK));
|
||||
}
|
||||
}
|
||||
|
||||
VOID
|
||||
|
@ -249,6 +244,9 @@ WinLdrSetupEms(IN PCHAR BootOptions)
|
|||
{
|
||||
PCHAR RedirectPort;
|
||||
|
||||
/* Start fresh */
|
||||
RtlZeroMemory(&LoaderRedirectionInformation, sizeof(HEADLESS_LOADER_BLOCK));
|
||||
|
||||
/* Use a direction port if one was given, or use ACPI to detect one instead */
|
||||
RedirectPort = strstr(BootOptions, "/redirect=");
|
||||
|
||||
|
|
|
@ -203,6 +203,25 @@ WinLdrInitializePhase1(PLOADER_PARAMETER_BLOCK LoaderBlock,
|
|||
/* See KiRosFrldrLpbToNtLpb for details */
|
||||
Extension->AcpiTable = (PVOID)1;
|
||||
}
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
/* Load drivers database */
|
||||
strcpy(MiscFiles, BootPath);
|
||||
|
@ -215,6 +234,7 @@ WinLdrInitializePhase1(PLOADER_PARAMETER_BLOCK LoaderBlock,
|
|||
|
||||
if (LoaderBlock->SetupLdrBlock)
|
||||
LoaderBlock->SetupLdrBlock = PaToVa(LoaderBlock->SetupLdrBlock);
|
||||
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
|
@ -601,10 +621,6 @@ LoadAndBootWindows(PCSTR OperatingSystemName,
|
|||
|
||||
/* Save final value of LoaderPagesSpanned */
|
||||
LoaderBlockVA->Extension->LoaderPagesSpanned = LoaderPagesSpanned;
|
||||
|
||||
/* Set headless block pointer */
|
||||
extern HEADLESS_LOADER_BLOCK LoaderRedirectionInformation;
|
||||
LoaderBlockVA->Extension->HeadlessLoaderBlock = PaToVa(&LoaderRedirectionInformation);
|
||||
|
||||
DPRINTM(DPRINT_WINDOWS, "Hello from paged mode, KiSystemStartup %p, LoaderBlockVA %p!\n",
|
||||
KiSystemStartup, LoaderBlockVA);
|
||||
|
|
Loading…
Reference in a new issue