aboutsummaryrefslogtreecommitdiffstats
path: root/src/boot.c
Commit message (Collapse)AuthorAgeFilesLines
* Minor boot fixes.Kevin O'Connor2011-01-261-0/+1
|
* Add ability to track PCI paths and add to build_pci_path().Kevin O'Connor2011-01-101-5/+12
| | | | Improve device path descriptions of devices on PCI buses.
* Extract space trimming code from ATA and use in USB and bootorder code.Kevin O'Connor2011-01-081-0/+1
| | | | | | Introduce function nullTrailingSpace() that nulls blank characters from the end of a string. Use this function in the ATA, USB MSC, and bootorder code.
* Add support for finding the boot priority of USB drives.Kevin O'Connor2011-01-011-0/+15
| | | | Use the device path of the USB device to find a bootorder entry.
* Add functions for boot device path parsing.Kevin O'Connor2011-01-011-13/+95
| | | | Add functions that find boot device path for pci/ata/floppy/rom devices.
* Remove drive->desc field.Kevin O'Connor2010-12-291-7/+7
| | | | | | | | | | | | | | The description field is only available during the POST phase - it is confusing to have it live in a structure available through all phases. The description was only used by the boot menu code - pass each drive description directly to the bootlist code. Add a helper (znprintf) to automatically malloc_tmp the required space. Also, fixup ramdisk handling - it was using an incorrect floppy priority.
* Minor reorganization of some of the boot_xxx code in boot.c.Kevin O'Connor2010-12-291-18/+25
|
* Move IPL.fw_bootorder to static variables in boot.c.Kevin O'Connor2010-12-291-8/+9
|
* Move IPL.bev to static variables in boot.cKevin O'Connor2010-12-291-7/+19
| | | | | | Move the BEV storage to static variables in boot.c. Also, increase the maximum number of BEV entries from 8 to 20.
* Move IPL.checkfloppysig to a global (CheckFloppySig) in boot.c.Kevin O'Connor2010-12-291-3/+4
|
* Don't access drive_g->desc from boot_cdrom().Kevin O'Connor2010-12-291-1/+1
| | | | | | The drive description is allocated with malloc_tmp() and is thus only available during the POST phase - boot_cdrom() is called during the boot phase.
* Simplify keyboard reading code in the interactive boot menu.Kevin O'Connor2010-12-291-16/+16
|
* Add stubs to permit devices to specify their boot priority.Kevin O'Connor2010-12-271-31/+68
| | | | | | Add support for passing in priorities to bootlist system. Based on patch by: Gleb Natapov <gleb@redhat.com>
* Simplify boot ordering by building an inclusive boot list.Kevin O'Connor2010-12-271-254/+165
| | | | | | | | | | | | | | | | | Replace the bcv list with a full list of all "bootable objects". All ordering can then be done on this list. The final boot menu, drive mapping, and BEV list generation is then driven from this authoritative list. Move "Floppy" and "DVD/CD" description prefixes into drive description generation code to simplify boot menu generation. Rework QEMU's CMOS defined bootorder to work with priority scheme in new boot list. Have every CBFS entry create it's own BEV entry (instead of one entry for all CBFS payloads). Move CBFS payload detection code into coreboot.c.
* Breakup boot_setup() bootorder code into its own function.Kevin O'Connor2010-12-241-30/+41
|
* Add romfile_loadfile() helper function.Kevin O'Connor2010-12-241-16/+2
| | | | | Add function to find, malloc, and copy a romfile. Use it in the bootsplash and bootorder code.
* Read bootorder file into memory.Gleb Natapov2010-12-241-0/+45
| | | | | | | Read bootorder file, parse it and put it into array for easy consumption. Signed-off-by: Gleb Natapov <gleb@redhat.com>
* Create separate IPL entry for each CD/DVDGleb Natapov2010-12-121-8/+31
| | | | | | | | | | Current code creates only one IPL entry of type IPL_TYPE_CDROM even if there are more then one CDROM drive present. If CDROM that the entry refers to is not bootable there is no way to retry boot from another CDROM. Fix this by creating IPL entry for each CDROM drive found. First CDROM will always be placed in IPL entry 3 for backwards compatibility. Signed-off-by: Gleb Natapov <gleb@redhat.com>
* Only show bootsplash during boot menu.Kevin O'Connor2010-08-251-4/+2
| | | | | | When the bootsplash picture is shown, it's not possible to see text. So, only display the picture while prompting the user for the boot menu.
* Be sure to disable bootsplash on all BIOS boot cases.Kevin O'Connor2010-07-261-4/+4
| | | | | | | | Disable the bootsplash on cbfs payload exec, and if something hooks int19. Also, be sure to only disable the bootsplash (revert to text mode) once.
* Initial bootsplash support.Kevin O'Connor2010-06-281-0/+3
| | | | | | Support displaying a jpeg file (stored in cbfs) during bootup. Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
* SeaBIOS CD/DVD abbreviationsStefan Reinauer2010-06-101-3/+3
| | | | | | | - Use the same description text for CD and DVD drives all over the tree. - Mention DVD first as it's more likely these days Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
* Allow wait_irq to be called in 32bit code.Kevin O'Connor2010-05-231-1/+1
| | | | | | | | | | | If wait_irq() is called from 32bit code, then jump to 16bit mode for the wait. Have wait_irq check for threads, and have it use yield if threads are pending. This ensures threads aren't delayed if anything calls wait_irq. Use wait_irq() in 32bit mode during a failed boot.
* Further parallelize init when using CONFIG_THREAD_OPTIONROMS.Kevin O'Connor2010-05-011-1/+5
| | | | | | | When optionrom threading is enabled, allow hardware init to run in parallel with boot menu key press delay and with the smp detection. Also, run qemu_cfg_port_probe() before ram_probe().
* Default CONFIG_COREBOOT_FLASH on; make depend on CONFIG_COREBOOT.Kevin O'Connor2010-03-201-2/+2
| | | | | | Coreboot users will almost certainly want CBFS support, and non-coreboot users have no use for it. So, make that the default behaviour.
* Cleanup - build drive description in temp memory during init.Kevin O'Connor2010-02-211-9/+4
| | | | | | | | | Remove describe_drive() mechanism for calling printf with a drive description. Instead, have each drive build a description in temporary ram during drive initialization. Also, remove fields now unneeded from 'struct disk_s' - model and cntl_info.
* Dynamically allocate each drive_g with malloc_fseg().Kevin O'Connor2010-02-151-1/+1
| | | | | This eliminates the limit on the number of available drives. It also allows for each driver to allocate additional custom fields.
* Be sure to add "void" to all function prototypes that take no args.Kevin O'Connor2010-01-031-5/+5
| | | | Omitting "void" leads to a K&R style declaration which was not intended.
* Introduce MODESEGMENT define; rename VISIBLE32 to VISIBLE32FLAT.Kevin O'Connor2009-12-261-2/+2
| | | | | Prepare for support of segmented 32bit code. Add new MODESEGMENT definition, and clarify existing 32bit mode defs.
* Fix use before free in boot_cbfs (boot.c).Kevin O'Connor2009-12-131-1/+1
|
* Add simple cooperative threading scheme to allow parallel hw init.Kevin O'Connor2009-10-241-0/+19
| | | | | | | | | Enable system for running hardware initialization in parallel. The yield() call can now round-robin between "threads". Rework ata controller init to use a thread per controller. Make sure internal drives are registered in a defined order. Run keyboard initialization in a thread. Rework usb init to use a thread per controller.
* Replace irq_enable() regions with explicit calls to check for irqs.Kevin O'Connor2009-10-241-2/+2
| | | | | | | | Add new function yield() which will permit irqs to trigger. The yield() call enables irqs to occur in 32bit mode. Add [num]sleep calls that yield instead of just spinning. Rename existing int 1586 usleep call to biosusleep. Convert many calls to mdelay to msleep.
* Pass 'drive_s' pointer instead of driveid.Kevin O'Connor2009-10-221-8/+8
| | | | | | Pass a pointer to the drive_s struct instead of a driveid array offset. Don't allocate ata drive's until a real drive found. Introduce getDrive() and allocDrive() functions.
* Move qemu config code from smbios.c to its own files. Add support forKevin O'Connor2009-10-041-1/+2
| | | | | | -boot menu=on|off qemu option. Signed-off-by: Gleb Natapov <gleb@redhat.com>
* Interrupts should be enabled when calling 16bit code.Kevin O'Connor2009-09-241-0/+3
| | | | | Set most code paths to have interrupts on when calling 16bit code. This fixes at least one optionrom that needed irqs on.
* Fix uninitialized variable in cbfs menu code.Kevin O'Connor2009-09-201-2/+2
|
* Add mechanism for describing internal drives in boot menu.Kevin O'Connor2009-09-121-13/+18
| | | | | | | | Allow each drive type to describe itself on the boot menu. This fixes a bug where driveid was used in place of ataid in the boot menu. Also, expand descriptions for each drive type. Don't overload the IPL type for BCVs - instead introduce new types.
* Replace common segment/offset pairs with struct segoff_s.Kevin O'Connor2009-09-091-2/+1
| | | | Introduce 'struct segoff_s' to more places.
* Rework coreboot cbfs interface for added flexibility.Kevin O'Connor2009-08-161-6/+14
| | | | | Allow callers to track the cbfs_file pointer. Also, remove obsolete code for brute-force flash scanning.
* Enhance boot menu to allow selection of floppy to boot from.Kevin O'Connor2009-08-161-4/+12
| | | | | | The bootmenu can now reorder the first floppy drive. Note - only the drive mapping is changed - floppy variables in the BDA are still set depending on the real floppy index.
* Add floppy controllers to "drives" list also.Kevin O'Connor2009-08-161-2/+2
| | | | | | | | | | | | The Drives.drives list now contains floppies, harddrives, and cdroms. Add mapping table for external/internal drive ids for floppies. Rename CONFIG_FLOPPY_SUPPORT to CONFIG_FLOPPY (for consistency). Be consistent with "driveid" and "floppyid" variable names. Replace switch statements of drive parameters into a global array. There are some externally visible changes with this patch: - Some calls will now return EPARAM instead of ETIMEOUT (or ECHANGED) - floppy_1301/1308 are now only available when regs->dl is valid - floppy_1308/1315 return EPARAM on invalid drives
* Store cdrom emulated driveid directly.Kevin O'Connor2009-08-111-1/+1
|
* Separate ATA code from generic disk code.Kevin O'Connor2009-08-111-5/+5
| | | | | | | | Move generic code from ata.c to new file block.c. Rename atabits.h to ata.h and move ata header definitions from disk.h. Rename ATA.channels to ATA_channels. Rename ATA structure to Drives. Support both CONFIG_DRIVES and CONFIG_ATA options.
* Optionrom code cleanup.Kevin O'Connor2009-07-041-1/+1
| | | | | | | | | | | | | Nearly all calers of callrom() use OPTION_ROM_INITVECTOR - make it default. Prefer (void*) to explicit casts. Rename init_optionrom to init_pcirom; rename verifysize_optionrom to init_optionrom. Add 'isvga' parameter to init_optionrom/init_pcirom; unify vga call path to use these functions. Extract cbfs directory scanning into new function run_cbfs_roms(). Allow roms in "vgaroms/" to run even if no pci vga device exists. Comment improvements.
* Avoid -fwhole-program on broken gcc instead of stopping build.Kevin O'Connor2009-06-151-4/+0
| | | | | Enhance build to detect and avoid gcc with broken -fwhole-program Also, remove workaround for older gcc that mess up global exports.
* Add support for field width argument to %x (eg, %08x).Kevin O'Connor2009-05-051-1/+1
| | | | Patch from Stefan Reinauer; modified by Kevin O'Connor.
* Add config option to set boot menu delay time.Kevin O'Connor2009-04-291-1/+1
| | | | Add CONFIG_BOOTMENU_WAIT option with delay time (in milliseconds).
* Allow booting from any device when under coreboot.Kevin O'Connor2009-04-181-11/+5
| | | | Don't just try floppy/cdrom/harddrive - try any available boot method.
* Initial support for running CBFS payloads.Kevin O'Connor2009-04-131-15/+46
| | | | | | | Add boot menu option for CBFS payloads. Rework "override" system so that it is done per BEV. Add file prefix scanning code to CBFS. Add CBFS payload launching support.
* Enhance boot menu to allow user to select which CD drive to boot from.Kevin O'Connor2009-02-161-9/+19
|