aboutsummaryrefslogtreecommitdiff
path: root/src/boot.c
AgeCommit message (Collapse)AuthorFilesLines
2013-05-15Cache boot-fail-wait to avoid romfile access after POST.rel-1.7.2.21.7.2-stableKevin O'Connor1-6/+9
Memory allocated with malloc_tmp() can't be used after the POST phase. So, access boot-fail-wait in post phase and store it for the boot phase to use. This fixes the regression introduced by commit 59d6ca52. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> Signed-off-by: Amos Kong <akong@redhat.com> (cherry picked from commit 11a7234491cb2a027b0fa5e82af38a3e78b44c80)
2013-01-12boot: Support "halt" in the boot order to prevent default boot attempts.Kevin O'Connor1-0/+8
Current seabios will attempt to boot from both configured devices and a list of default devices. Sometimes it is desirable to only attempt to boot from the configured devices and not from any of the default devices. This patch adds support for a "HALT" item in the "bootorder" file - its presence will prevent SeaBIOS from attempting any default boot actions. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> Signed-off-by: Amos Kong <akong@redhat.com>
2012-12-21Minor: Separate UUID display from F12 boot prompt.Kevin O'Connor1-1/+1
Place the extra newline as part of the F12 prompt instead of the SeaBIOS version banner so that a UUID report (when present) is still visually separated from the boot menu prompt. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-06-13Support USB MSC devices with multiples LUNsKevin O'Connor1-3/+9
There are USB Mass storage devices which have more than one device. Examples are CD Changers, or USB sticks which are partitioned in a CDROM and Harddisk device. Signed-off-by: Sven Schnelle <svens@stackframe.org> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-06-02Cache romfile entries.Kevin O'Connor1-2/+2
Create a 'struct romfile_s' and populate a list of all romfiles at start of init. Caching the romfiles both simplifies the code and makes it more efficient. Also, convert the ramdisk code to use romfile helpers instead of directly accessing cbfs. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-05-28Rename call16 to farcall16.Kevin O'Connor1-2/+2
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-05-28Rename wait_irq to yield_toirq.Kevin O'Connor1-1/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-05-20Convert disk code EBDA variables to VARLOW variables.Kevin O'Connor1-4/+2
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-05-20Convert boot code EBDA variables to VARLOW variables.Kevin O'Connor1-7/+6
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-05-13Automatically reboot after 60 second delay on failed boot.Kevin O'Connor1-6/+25
If no valid boot devices are found, display the error for 60 seconds (by default) and then reboot. This enables a periodic retry in case one of the boot devices is still coming online. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-03-10usb: Build path via chain of usbdevice_s.Kevin O'Connor1-9/+16
Instead of building a dummy u64 with the path, construct the path via the 'struct usbdevice_s' links. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-03-06add virtio-scsi driverPaolo Bonzini1-0/+14
virtio-scsi is a simple HBA that talks to the host via a single vring. The implementation looks like a hybrid of usb-msc and virtio-blk. Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-01-14BCVs should inherrit the legacy harddrive priority.Kevin O'Connor1-1/+1
A BCV will (almost assuredly) be a hard drive, so it makes sense to prioritize them the same as builtin hard drives when only the legacy priority system is used. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-11-22usb: fix boot pathsPaolo Bonzini1-2/+2
The fw paths for USB devices that SeaBIOS computes are off-by-one, because QEMU builds those paths with a numbering that starts from one (see usb_fill_port and usb_hub_initfn in QEMU). Fix that so that the numbering agrees.
2011-07-10Remove now unneeded find_pci().Kevin O'Connor1-13/+0
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-07-10Push use of 'struct pci_device' to bootprio_find_pci_rom().Kevin O'Connor1-2/+2
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-07-10Push use of 'struct pci_device' to bootprio_find_ata_device().Kevin O'Connor1-3/+3
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-07-10Push use of 'struct pci_device' to bootprio_find_fdc_device().Kevin O'Connor1-3/+3
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-07-10Push use of 'struct pci_device' to bootprio_find_pci_device().Kevin O'Connor1-2/+2
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-07-10Push use of 'struct pci_device' to bootprio_find_usb().Kevin O'Connor1-2/+2
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-07-05Replace CONFIG_BOOTMENU_WAIT with dynamic "etc/boot-menu-wait" file.Kevin O'Connor1-1/+4
2011-06-20Replace PCIPaths code with struct pci_device.Kevin O'Connor1-15/+24
2011-05-10Add config option (CONFIG_BOOTORDER) to disable bootorder support.Kevin O'Connor1-0/+15
2011-01-26Minor boot fixes.Kevin O'Connor1-0/+1
2011-01-10Add ability to track PCI paths and add to build_pci_path().Kevin O'Connor1-5/+12
Improve device path descriptions of devices on PCI buses.
2011-01-08Extract space trimming code from ATA and use in USB and bootorder code.Kevin O'Connor1-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.
2011-01-01Add support for finding the boot priority of USB drives.Kevin O'Connor1-0/+15
Use the device path of the USB device to find a bootorder entry.
2011-01-01Add functions for boot device path parsing.Kevin O'Connor1-13/+95
Add functions that find boot device path for pci/ata/floppy/rom devices.
2010-12-29Remove drive->desc field.Kevin O'Connor1-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.
2010-12-29Minor reorganization of some of the boot_xxx code in boot.c.Kevin O'Connor1-18/+25
2010-12-29Move IPL.fw_bootorder to static variables in boot.c.Kevin O'Connor1-8/+9
2010-12-29Move IPL.bev to static variables in boot.cKevin O'Connor1-7/+19
Move the BEV storage to static variables in boot.c. Also, increase the maximum number of BEV entries from 8 to 20.
2010-12-29Move IPL.checkfloppysig to a global (CheckFloppySig) in boot.c.Kevin O'Connor1-3/+4
2010-12-29Don't access drive_g->desc from boot_cdrom().Kevin O'Connor1-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.
2010-12-29Simplify keyboard reading code in the interactive boot menu.Kevin O'Connor1-16/+16
2010-12-27Add stubs to permit devices to specify their boot priority.Kevin O'Connor1-31/+68
Add support for passing in priorities to bootlist system. Based on patch by: Gleb Natapov <gleb@redhat.com>
2010-12-27Simplify boot ordering by building an inclusive boot list.Kevin O'Connor1-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.
2010-12-24Breakup boot_setup() bootorder code into its own function.Kevin O'Connor1-30/+41
2010-12-24Add romfile_loadfile() helper function.Kevin O'Connor1-16/+2
Add function to find, malloc, and copy a romfile. Use it in the bootsplash and bootorder code.
2010-12-24Read bootorder file into memory.Gleb Natapov1-0/+45
Read bootorder file, parse it and put it into array for easy consumption. Signed-off-by: Gleb Natapov <gleb@redhat.com>
2010-12-12Create separate IPL entry for each CD/DVDGleb Natapov1-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>
2010-08-25Only show bootsplash during boot menu.Kevin O'Connor1-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.
2010-07-26Be sure to disable bootsplash on all BIOS boot cases.Kevin O'Connor1-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.
2010-06-28Initial bootsplash support.Kevin O'Connor1-0/+3
Support displaying a jpeg file (stored in cbfs) during bootup. Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
2010-06-10SeaBIOS CD/DVD abbreviationsStefan Reinauer1-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>
2010-05-23Allow wait_irq to be called in 32bit code.Kevin O'Connor1-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.
2010-05-01Further parallelize init when using CONFIG_THREAD_OPTIONROMS.Kevin O'Connor1-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().
2010-03-20Default CONFIG_COREBOOT_FLASH on; make depend on CONFIG_COREBOOT.Kevin O'Connor1-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.
2010-02-21Cleanup - build drive description in temp memory during init.Kevin O'Connor1-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.
2010-02-15Dynamically allocate each drive_g with malloc_fseg().Kevin O'Connor1-1/+1
This eliminates the limit on the number of available drives. It also allows for each driver to allocate additional custom fields.