Esempio n. 1
0
VOID
HalpRegisterInternalBusHandlers (
    VOID
    )
{
    PBUS_HANDLER     Bus;

    if (KeGetCurrentPrcb()->Number) {
        // only need to do this once
        return ;
    }

    //
    // Initalize BusHandler data before registering any handlers
    //

    HalpInitBusHandler ();

    //
    // Build internal-bus 0, or system level bus
    //

    Bus = HalpAllocateBusHandler (
            Internal,
            ConfigurationSpaceUndefined,
            0,                              // Internal BusNumber 0
            InterfaceTypeUndefined,         // no parent bus
            0,
            0                               // no bus specfic data
            );

    Bus->GetInterruptVector  = HalpGetSystemInterruptVector;
    Bus->TranslateBusAddress = HalpTranslateSystemBusAddress;

    //
    // Build Isa bus 0
    //

    Bus = HalpAllocateBusHandler (Isa, -1, 0, Internal, 0, 0);
    Bus->GetBusData = HalpNoBusData;
    Bus->GetInterruptVector  = HalpGetIsaInterruptVector;
    Bus->AdjustResourceList = HalpAdjustIsaResourceList;


    HalpInitOtherBuses ();
}
Esempio n. 2
0
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();
}
Esempio n. 3
0
VOID
HalpRegisterInternalBusHandlers (
    VOID
    )
/*++

Routine Description:

    This function registers the bushandlers for buses on the system
    that will always be present on the system.

Arguments:

    None.

Return Value:

    None.

--*/
{
    PBUS_HANDLER     Bus;

    //
    // Initalize BusHandler data before registering any handlers
    //

    HalpInitBusHandler ();

    //
    // Build the processor internal bus 0
    //

    HaliRegisterBusHandler (ProcessorInternal,  // Bus Type
			    -1,                 // No config space 
			    0,                  // Bus Number
			    -1,                 // No parent bus type
			    0,                  // No parent bus number
			    0,                  // No extension data
			    NULL,               // No install handler
			    &Bus);              // Bushandler return

    Bus->GetInterruptVector  = HalpGetSystemInterruptVector;
    
    //
    // Build internal-bus 0, or system level bus
    //

    HaliRegisterBusHandler (Internal,           // Bus Type
			    -1,                 // No config space 
			    0,                  // Bus Number
			    -1,                 // No parent bus type
			    0,                  // No parent bus number
			    0,                  // No extension data
			    NULL,               // No install handler
			    &Bus);              // Bushandler return

    Bus->GetInterruptVector  = HalpGetSystemInterruptVector;
    Bus->TranslateBusAddress = HalpTranslateSystemBusAddress;

    //
    // Build Isa bus #0
    //

    HaliRegisterBusHandler (Isa,                // Bus Type
			    -1,                 // No config space 
			    0,                  // Internal bus #0
			    Internal,           // Parent bus type
			    0,                  // Parent bus number
			    0,                  // No extension data
			    NULL,               // No install handler
			    &Bus);              // Bushandler return

    Bus->GetBusData = HalpNoBusData;
    Bus->AdjustResourceList = HalpAdjustIsaResourceList;

}
Esempio n. 4
0
INIT_FUNCTION
VOID
NTAPI
HalpRegisterInternalBusHandlers(VOID)
{
    PBUS_HANDLER Bus;

    /* Only do processor 1 */
    if (KeGetCurrentPrcb()->Number) return;

    /* Register root support */
    HalpInitBusHandler();

    /* Allocate the system bus */
    Bus = HalpAllocateBusHandler(Internal,
                                 ConfigurationSpaceUndefined,
                                 0,
                                 InterfaceTypeUndefined,
                                 0,
                                 0);
    if (Bus)
    {
        /* Set it up */
        Bus->GetInterruptVector = HalpGetSystemInterruptVector;
        Bus->TranslateBusAddress = HalpTranslateSystemBusAddress;
    }

    /* Allocate the CMOS bus */
    Bus = HalpAllocateBusHandler(InterfaceTypeUndefined,
                                 Cmos,
                                 0,
                                 InterfaceTypeUndefined,
                                 0,
                                 0);
    if (Bus)
    {
        /* Set it up */
        Bus->GetBusData = HalpcGetCmosData;
        Bus->SetBusData = HalpcSetCmosData;
    }

    /* Allocate the CMOS bus */
    Bus = HalpAllocateBusHandler(InterfaceTypeUndefined,
                                 Cmos,
                                 1,
                                 InterfaceTypeUndefined,
                                 0,
                                 0);
    if (Bus)
    {
        /* Set it up */
        Bus->GetBusData = HalpcGetCmosData;
        Bus->SetBusData = HalpcSetCmosData;
    }

    /* Allocate ISA bus */
    Bus = HalpAllocateBusHandler(Isa,
                                 ConfigurationSpaceUndefined,
                                 0,
                                 Internal,
                                 0,
                                 0);
    if (Bus)
    {
        /* Set it up */
        Bus->GetBusData = HalpNoBusData;
        Bus->BusAddresses->Memory.Limit = 0xFFFFFF;
        Bus->TranslateBusAddress = HalpTranslateIsaBusAddress;
    }

    /* No support for EISA or MCA */
    ASSERT(HalpBusType == MACHINE_TYPE_ISA);
}