From: Kevin O'Connor Date: Thu, 26 Nov 2009 00:05:04 +0000 (-0500) Subject: Reorganize main init order and add comments. X-Git-Tag: rel-0.5.0~26 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=969df6062527fe7019aa02241c321557ed9cb0a8;p=seabios.git Reorganize main init order and add comments. Try to organize the main init by class of hardware initialized. --- diff --git a/src/post.c b/src/post.c index 3024eb8..b37a37d 100644 --- a/src/post.c +++ b/src/post.c @@ -159,51 +159,56 @@ init_bios_tables(void) static void post() { + // Detect and init ram. init_ivt(); init_bda(); + memmap_setup(); + ram_probe(); + malloc_setup(); - qemu_cfg_port_probe(); - + // Init base pc hardware. pic_setup(); timer_setup(); mathcp_setup(); + // Initialize smp + qemu_cfg_port_probe(); smp_probe_setup(); - memmap_setup(); - ram_probe(); mtrr_setup(); smp_probe(); - malloc_setup(); - pmm_setup(); + // Initialize pci pci_setup(); smm_init(); + // Run vga option rom. + pmm_setup(); pnp_setup(); vga_setup(); + // Initialize hardware devices usb_setup(); kbd_setup(); lpt_setup(); serial_setup(); mouse_setup(); - init_bios_tables(); - boot_setup(); - drive_setup(); cdemu_setup(); floppy_setup(); ata_setup(); ramdisk_setup(); + // Run option roms (non vga) + init_bios_tables(); wait_threads(); optionrom_setup(); - // Run BCVs + // Run BCVs and show optional boot menu boot_prep(); + // Finalize data structures before boot pmm_finalize(); malloc_finalize(); memmap_finalize();