コード例 #1
0
ファイル: freeldr.c プロジェクト: Moteesh/reactos
VOID __cdecl BootMain(IN PCCH CmdLine)
{
    CmdLineParse(CmdLine);

    /* Debugger pre-initialization */
    DebugInit(FALSE);

    TRACE("BootMain() called.\n");

    MachInit(CmdLine);

    /* Check if the CPU is new enough */
    FrLdrCheckCpuCompatibility(); // FIXME: Should be done inside MachInit!

    /* UI pre-initialization */
    if (!UiInitialize(FALSE))
    {
        UiMessageBoxCritical("Unable to initialize UI.");
        goto Quit;
    }

    /* Initialize memory manager */
    if (!MmInitializeMemoryManager())
    {
        UiMessageBoxCritical("Unable to initialize memory manager.");
        goto Quit;
    }

    /* Initialize I/O subsystem */
    FsInit();

    RunLoader();

Quit:
    /* If we reach this point, something went wrong before, therefore reboot */
#if defined(__i386__) || defined(_M_AMD64)
    DiskStopFloppyMotor();
#endif
    Reboot();
}
コード例 #2
0
ファイル: freeldr.c プロジェクト: hoangduit/reactos
VOID BootMain(LPSTR CmdLine)
{
    CmdLineParse(CmdLine);

    MachInit(CmdLine);

    FsInit();

    DebugInit();

    TRACE("BootMain() called.\n");

    /* Check if the CPU is new enough */
    FrLdrCheckCpuCompatiblity();

    if (!UiInitialize(FALSE))
    {
        UiMessageBoxCritical("Unable to initialize UI.\n");
        goto quit;
    }

    if (!MmInitializeMemoryManager())
    {
        UiMessageBoxCritical("Unable to initialize memory manager");
        goto quit;
    }

#ifdef _M_IX86
	HalpInitializePciStubs();
	HalpInitBusHandler();
#endif
	RunLoader();

quit:
    /* If we reach this point, something went wrong before, therefore reboot */
    DiskStopFloppyMotor();
    Reboot();
}