// 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(); }
/* Boot */ static void handle_csm_0003(struct bregs *regs) { if (!CONFIG_BOOT) { regs->ax = 1; return; } dprintf(3, "Boot\n"); startBoot(); regs->ax = 1; }
// 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(); }
// Main setup code. static void maininit(void) { // Setup romfile items. qemu_cfg_romfile_setup(); coreboot_cbfs_setup(); // Setup ivt/bda/ebda init_ivt(); init_bda(); // Init base pc hardware. pic_setup(); timer_setup(); mathcp_setup(); // Initialize pci pci_setup(); smm_init(); // Initialize mtrr mtrr_setup(); // Setup Xen hypercalls xen_init_hypercalls(); // Initialize internal tables boot_setup(); // Start hardware initialization (if optionrom threading) if (CONFIG_THREADS && CONFIG_THREAD_OPTIONROMS) init_hw(); // Find and initialize other cpus smp_probe(); // Setup interfaces that option roms may need bios32_setup(); pmm_setup(); pnp_setup(); kbd_setup(); mouse_setup(); init_bios_tables(); // Run vga option rom vga_setup(); // Do hardware initialization (if running synchronously) if (!CONFIG_THREADS || !CONFIG_THREAD_OPTIONROMS) { init_hw(); wait_threads(); } // Run option roms optionrom_setup(); // Run BCVs and show optional boot menu boot_prep(); // Finalize data structures before boot cdemu_setup(); pmm_finalize(); malloc_finalize(); memmap_finalize(); // Setup bios checksum. BiosChecksum -= checksum((u8*)BUILD_BIOS_ADDR, BUILD_BIOS_SIZE); // Write protect bios memory. make_bios_readonly(); // Invoke int 19 to start boot process. startBoot(); }