Esempio n. 1
0
// Main setup code.
static void
maininit(void)
{
    // Initialize internal interfaces.
    interface_init();

    // Setup platform devices.
    platform_hardware_setup();

    // call a payload
    if (CONFIG_RUN_PAYLOAD) {
        dprintf(1, "Looking for payload %s\n", CONFIG_RUN_PAYLOAD_FILE);
        struct romfile_s *file = NULL;
        file = romfile_find( CONFIG_RUN_PAYLOAD_FILE );
        if (!file)
            printf("Could not find payload\n");
        else {
            struct cbfs_romfile_s *cfile;
            cfile = container_of(file, struct cbfs_romfile_s, file);
            cbfs_run_payload(cfile->fhdr);
        }
    }

    // Start hardware initialization (if optionrom threading)
    if (CONFIG_THREAD_OPTIONROMS)
        device_hardware_setup();

    // Run vga option rom
    vgarom_setup();

    // Do hardware initialization (if running synchronously)
    if (!CONFIG_THREAD_OPTIONROMS) {
        device_hardware_setup();
        wait_threads();
    }

    // Run option roms
    optionrom_setup();

    // show system info before the F12 menu
    if (CONFIG_DISPLAY_SYSTEM_INFO)
        dprintf(1, "\nBuild date: %s\n", __DATE__);

    // Allow user to modify overall boot order.
    interactive_bootmenu();
    wait_threads();

    // Prepare for boot.
    prepareboot();

    // Write protect bios memory.
    make_bios_readonly();

    // Invoke int 19 to start boot process.
    startBoot();
}
Esempio n. 2
0
// Main setup code.
static void
maininit(void)
{
    // Initialize internal interfaces.
    interface_init();

    // Setup platform devices.
    platform_hardware_setup();

    // Start hardware initialization (if threads allowed during optionroms)
    if (threads_during_optionroms())
        device_hardware_setup();

    // Run vga option rom
    vgarom_setup();
    sercon_setup();
    enable_vga_console();

    // Do hardware initialization (if running synchronously)
    if (!threads_during_optionroms()) {
        device_hardware_setup();
        wait_threads();
    }

    // Run option roms
    optionrom_setup();

    // Allow user to modify overall boot order.
    interactive_bootmenu();
    wait_threads();

    // Prepare for boot.
    prepareboot();

    // Write protect bios memory.
    make_bios_readonly();

    // Invoke int 19 to start boot process.
    startBoot();
}