aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-03-20checkrom: Fix typo in error messageAndreas Färber1-1/+1
increate -> increase Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-03-19checkstack: Prefer passing "function" class instead of function addressKevin O'Connor1-15/+13
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-03-19checkstack: Simplify yield calculationsKevin O'Connor1-33/+21
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-03-19checkstack: Replace function information tuple with classKevin O'Connor1-69/+77
Replace the six-tuple storing information on each parsed function with a class. This makes the code more readable. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-03-18docs: Clarify that pci-optionrom-exec doesn't apply to roms in cbfsKevin O'Connor1-1/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-03-18vgabios: Don't use extra stack if it appears a modern OS is in useKevin O'Connor4-3/+30
If the last mode set (while not in vm86 mode) was done from a VBE mode set call then disable the extra stack. This works under the premise that only a modern OS would invoke the VBE mode changing facilities and a modern OS would always call the vgabios with sufficient stack space. This is an ugly hack to work around a problem Windows Vista (and possibly later Windows releases) has with the VGA BIOS using a stack in the e-segment. Reported-by: Richard Laager <rlaager@wiktel.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-03-17vgabios: On bda_save_restore() the saved vbe_mode also has flags in itKevin O'Connor1-1/+1
When restoring a saved state, make sure to remove any flags from the video mode prior to searching for that mode. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-03-16docs: Note release date of 1.8.1Kevin O'Connor1-0/+5
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-03-16boot: switch default menu key to ESCPaolo Bonzini2-4/+4
On some platforms, F12 may be hard to access; for example, on OS X machines F9-F12 have been intercepted by the OS for a long time, and on newer OS X releases function keys are basically gone for good. Which keys are and are not available depends on the client, not on the server, but only function keys are usually trapped by terminals. Hence, using ESC for the boot menu avoids the problems associated with F12. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-16boot.c: delay exiting boot if menu key is ESCPaolo Bonzini1-1/+7
If the menu key is ESC, do not restart boot unless 1.5 seconds have passed. Otherwise users (trained by years of repeatedly hitting keys to enter the BIOS) will end up hitting ESC multiple times and immediately booting the primary boot device. Suggested-by: Matt DeVillier <matt.devillier@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-11smp: Fix smp race introduced in 0673b787Kevin O'Connor1-3/+6
In 0673b787 the QEMU SMP init code was changed to run in 32bit mode. Unfortunately, the transition32 assembler function is not multi-processor safe, because it modifies the global RTC index register. This race condition led to sporadic failures when emulating machines with a large number of processors. This patch changes the entry_smp code to use a variant of transition32 that does not touch the RTC registers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-03-06fw/pci: map memory and IO regions for multiple pci root busesMarcel Apfelbaum1-0/+10
For resource sizing and mapping purposes treat devices on extra root buses as if they are on the default root bus (bus 0). Signed-off-by: Kevin O'Connor <kevin@koconnor.net> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-03-06fw/pci: scan all buses if extraroots romfile is presentMarcel Apfelbaum1-0/+9
If there are extra primary root buses, scanning the bus's 0 subtree is not enough. Scan all the range. Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-02-24Add an option to only execute option ROMs contained in CBFStpearson@raptorengineeringinc.com2-4/+5
TEST: Booted ASUS KFSN4-DRE with iPXE ROMs built in to CBFS; with etc/pci-optionrom-exec set to 0 the on-board network ROMs were ignored while the iPXE ROMs executed normally. When set to 2 or greater all option ROMs executed normally. Tests of VGA only were not possible due to a lack of supported hardware. Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-02-24pci: enable SERR# for error forwarding in bridge control registerChen Fan1-0/+4
For PCIe device support AER(Advanced Error Reporting), from the pcie spec 3.0 chapter 6.2.5, ERR_COR, ERR_NONFATAL, and ERR_FATAL can be forwarded from the secondary interface to the primary interface, only require the SERR# Enable bit in the Bridge Control register is set. and at the kernel side, we found only _HPP() method can enable SERR#, So here we want to turn on this bit. Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-02-24docs: Prefer triple backticks to multiple lines with single backticksKevin O'Connor3-8/+16
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-02-19docs: Add page on available CBFS/fw_cfg runtime config filesKevin O'Connor2-4/+193
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-02-18docs: Add page describing the patch contribution processKevin O'Connor2-1/+22
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-02-18docs: add page for SeaVGABIOSKevin O'Connor2-0/+40
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-02-18x86: add barrier to read{b,w,l} and write{b,w,l} functionsAmeya Palande1-3/+12
Use barrier() for memory mapped IO functions. This fixes pvscsi driver to boot on QEMU's pvscsi controller. Test command: qemu -m 512 --enable-kvm -device pvscsi,id=pvscsi0 -device scsi-disk,bus=pvscsi0.0,drive=drive0 -drive id=drive0,if=none,file=ubuntu1410.img,if=none -bios seabios/out/bios.bin Signed-off-by: Ameya Palande <2ameya@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-02-18docs: Note v1.8.0 releaserel-1.8.0Kevin O'Connor1-0/+22
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-02-18docs: There is only one VAR16 flag nowKevin O'Connor1-1/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-02-18docs: Update release history with dates of stable releasesKevin O'Connor1-0/+45
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-02-18docs: Document why v1.6.3 release came after v0.6.2Kevin O'Connor1-0/+5
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-19checkstack: Handle callw instructionKevin O'Connor1-0/+2
Minor update to the checkstack.py tool. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-07usb: Minor - properly free memory on get_device_config() error pathKevin O'Connor1-1/+3
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-07usb: Control transfers always have an 8 byte command sizeKevin O'Connor10-22/+25
There is no need to pass 'cmdsize' to the usb drivers as the cmdsize is always 8 bytes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-07xhci: Merge some xhci_xfer_x() functions into xhci_send_pipe()Kevin O'Connor1-62/+18
The xhci_xfer_setup, xhci_xfer_data, xhci_xfer_status, and xhci_xfer_normal functions are very similar - enhance xhci_xfer_queue to reduce the boiler plate in the above functions. Merge the resulting setup, data, and status code into the only function that uses them - xhci_send_pipe(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-07xhci: Move xhci_xfer_x() functions togetherKevin O'Connor1-81/+81
This is purely code movement - no code changes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-07usb: Use usb_send_pipe() now that all drivers have x_send_pipe()Kevin O'Connor1-25/+15
Now that all drivers have unified control and bulk transmit functions, unify the driver calling code in usb.c as well. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-07xhci: Merge xhci_send_control with xhci_send_bulkKevin O'Connor3-35/+19
Merge both the control and bulk pipe sending functions into one new function: xhci_send_pipe(). This makes the xhci interface similar to the other usb drivers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-07uhci: Merge uhci_send_control with uhci_send_bulkKevin O'Connor3-66/+39
Merge both the control and bulk pipe sending functions into one new function: uhci_send_pipe(). The two existing functions were similar, and by merging them the resulting code supports more flexible control transfers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-07ohci: Merge ohci_send_control with ohci_send_bulkKevin O'Connor3-65/+34
Merge both the control and bulk pipe sending functions into one new function: ohci_send_pipe(). The two existing functions were similar, and by merging them the resulting code supports more flexible control transfers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-07ehci: Merge ehci_send_control with ehci_send_bulkKevin O'Connor3-71/+34
Merge both the control and bulk pipe sending functions into one new function: ehci_send_pipe(). The two existing functions were similar, and by merging them the resulting code supports more flexible control transfers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-07ehci: Simplify fillTDbuffer() and renameKevin O'Connor1-28/+17
Simplify the calculation of the maximum transfer size per qtd, simplify the fillTDbuffer() function so that it only fills the buffer pointers, and rename fillTDbuffer() to ehci_fill_tdbuf(). Also, don't modify 'data' or 'datasize' so that usb_xfer_time() can use 'datasize' at the end of the function. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-07ehci: No need to support td array wrappingKevin O'Connor1-15/+13
The maximum bulk transfer is 64K and 4 QTDs can always transfer 64K. So, there is no need to support a transfer with more than 4 QTDs. Build the entire transaction and then submit it in one operation to simplify the code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-07vgabios: Support emulated text in gfx_read_char()Kevin O'Connor1-6/+19
When emulating text mode on "coreboot framebuffer" SeaVGABIOS, return a foreground and background attribute from gfx_read_char() and prefer returning a space character (instead of null) on blank cells. This also returns the foreground color (instead of always returning zero) for regular graphics mode gfx_read_char() calls. This seems fine as tests show other vgabios implementations also return various values here. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-06vgabios: implement read char in graphics modePaolo Bonzini3-12/+55
GWBasic relies on this, so implement it to enable some serious retrocomputing. There is no better way to do it than trying to match all characters one by one against the current font. This makes it possible to actually do something in SCREEN 1 and SCREEN 2 (without it, you can use graphics in the programs but not in direct mode). I couldn't find documentation for what to return as the attribute, but experimenting with DOSBox suggests 0 (and GWBasic accepts it). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-06vgabios: fix graphics operation with Bochs VGA in non-DISPI modesPaolo Bonzini1-8/+19
For legacy VGA modes that do not set the VBE_DISPI_ENABLED bit, bochsvga_get_linelength returns 0. Thus all characters are squashed into the first scanline. Fix this by falling back to stdvga for the legacy modes. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-01-01uhci: Increase bulk transfer STACKTDS to 16Kevin O'Connor1-2/+2
Increase the number of simultaneous transfer descriptors that the driver will build for uhci. The old value of 4 was a leftover from when SeaBIOS had a tiny 512 byte extra stack - now that there is a 2K extra stack there is plenty of space for additional descriptors. Using a value of 16 should allow for an entire 1ms frame of bulk transfer content to be setup in advance (assuming the max packet size is 64 bytes). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-01uhci: Enable "depth" tree traversal for bulk transfersKevin O'Connor1-3/+3
Set the "depth" flag on bulk transactions. Since SeaBIOS doesn't use bandwidth reclamation, without the depth flag the uhci controller will only transfer one bulk packet per 1 ms frame. This results in a maximum of 64 bytes per millisecond, which severely limits the transfer rate. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-01docs: Add documentation on using readserial.py scriptKevin O'Connor1-0/+37
Update the debugging documentation with info on timing debug output with readserial.py. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-01readserial: Enhance pipe supportKevin O'Connor1-15/+14
Automatically close and open the pipe if it closes. Also, better document that the -f option is for pipes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-01usb: Add support for OHCI bulk transfersKevin O'Connor3-18/+76
Support bulk transfers (usb drives) on OHCI USB controllers. Now that there is support for 32bit only drive controllers, it is not that hard to support disks on OHCI controllers, and it may be useful for some old hardware. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-12-29block: Check for read/write requests over 64KKevin O'Connor2-0/+6
The standard BIOS disk read/write request interface should never get a request for more than 64K of data. Explicitly check for overly large requests and reject them. This way, the low-level drivers do not need to check for or attempt to handle very large requests. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-12-29cdrom: Break up very large read requests into smaller requestsKevin O'Connor1-4/+13
A cdrom boot image could be over 64K in size, but the low level drivers may not support very large reads. If a large cdrom image is found, issue multiple reads so that a read request over 64K is never issued. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-12-29scsi: Don't export cdb_* functionsKevin O'Connor2-16/+7
The low-level cdb_* functions are now only used from within cmdblock.c, so don't export them. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-12-29cdrom: call scsi_process_op() instead of cdb_read()Kevin O'Connor1-3/+4
Use the scsi_process_op() function instead of the lower level cdb_read() function. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-12-29scsi: Move process_scsi_op() to hw/blockcmd.c and renameKevin O'Connor3-23/+24
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-12-29scsi: Move cdb_* functions above scsi_* functionsKevin O'Connor1-88/+98
This is just code movement - no code changes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>