aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-06-16vgabios: On bda_save_restore() the saved vbe_mode also has flags in itrel-1.8.21.8-stableKevin 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-06-16build: CONFIG_VGA_FIXUP_ASM should depend on CONFIG_BUILD_VGABIOSKevin O'Connor1-0/+1
Add the dependency to CONFIG_VGA_FIXUP_ASM so the menu option only appears when appropriate. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit f24eb2f853d4aa28814761e0bbc7df78149f8029)
2015-06-15smm: ignore bits 16,18-31 of SMM revision IDPaolo Bonzini1-4/+11
Bits 16-31 of the SMM revision ID are feature bits. We only need to check that SMBASE relocation is supported, but do not care about other features. In particular, this allows the SMM I/O instruction restart feature to be present. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> (cherry picked from commit 92f9b9189eb00da42a8bfcf26c664f48ee8d2868)
2015-06-12vga: rework virtio-vga supportGerd Hoffmann1-4/+1
Unlike planned earlier virtio-vga will be compatible with the qemu stdvga, with the framebuffer in bar 0. Drop the virtio-vga chunk, update comment accordingly. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 87f848ec2d6ca609252b313b062bbd57bd290565)
2015-06-12build: Support "make VERSION=xyz" to override the default build versionKevin O'Connor2-8/+12
Add a build option to explicitly set the version information compiled into the seabios and seavgabios binaries. This may assist in reproducible builds or to better link builds to distribution packages. If the new "VERSION=" parameter is not provided then the default build version remains unchanged. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit 624e812764beda88b47c0018b1cee3b86d5c59eb)
2015-06-12ahci: Ignore max_ports.Vladimir Serbinenko1-1/+1
At least AHCI on Intel on some machines claim to support only 6 ports while in fact higher port numbers are present and work. This is needed to access CD-ROM on PackardBell MS2290. Both GRUB and Linux have a similar workaround. Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> (cherry picked from commit 40dfc0ee947c35f31e935ec290622e7780bb52b8)
2015-06-12vgabios: Emulate "leal" instructionKevin O'Connor2-26/+59
Emulate the "leal" instruction so that the vgabios can run on older versions of x86emu. (This removes the previous "leal" trap.) Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit 0b2165d191f51ed2a522142c3ed3db55bc852627)
2015-06-12vgabios: Add config option for assembler fixupsKevin O'Connor3-10/+25
Add a kconfig build option (CONFIG_VGA_FIXUP_ASM) to allow users to build the vgabios without the complex assembler fixups that work around emulator bugs. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit 799b20b0db45891845e2d820368a66af538d5664)
2015-03-13smp: Fix smp race introduced in 0673b787rel-1.8.1Kevin 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> (cherry picked from commit 5ae3dd6f74e17a7cd06165a75214798b0c606115)
2015-03-12fw/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> (cherry picked from commit 0fe4c9ee7af5f6bb3a1fcbf1d39116a894600c90)
2015-03-12fw/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> (cherry picked from commit 5cc7eece39721f20b417770374a4112c454be801)
2015-03-12x86: 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> (cherry picked from commit bc82fa431ef3a0791f637c54fc8065b3fbc13772)
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>
2014-12-29docs: Add page describing SeaBIOS final object linkingKevin O'Connor2-0/+169
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-12-29docs: Add info on MODE16/MODESEGMENT compile time flagsKevin O'Connor1-0/+9
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-12-29docs: Don't point to repo README filesKevin O'Connor1-6/+3
Now that the README files have been simplified, don't point the wiki pages to them. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-12-29Add wiki documentation to repositoryKevin O'Connor11-0/+1039
Add a docs/ directory that contains the contents of the SeaBIOS wiki in markdown format. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-12-29sdcard: Initial support for SD cards on PCI SDHCI controllers on QEMUKevin O'Connor7-1/+339
This adds basic read/write support for SD cards emulated by QEMU. This code is not expected to work on real hardware, because the current controller and card initialization is not robust. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-12-15Simplify README files - point to online documentation insteadKevin O'Connor2-198/+11
The README file and README.CSM file have gotten a bit out of date. Instead of maintaining technical information in the README file, point new users to the SeaBIOS wiki. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-12-15usb: Update USB hub code to support super speed hubsKevin O'Connor2-3/+39
Super speed hubs (usb3 spec) have specific initialization requirements. Add the code necessary to detect and initialize these hubs. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-12-03Eliminate FUNCFSEG - only force portions of inline asm to f-segmentKevin O'Connor2-10/+6
The FUNCFSEG macro was introduced to force a C function into the f-segment. This was needed for some C functions that used inline assembler that contained some 16bit code. Instead of forcing the entire C function into the f-segment, just force the small subset of inline assembler into the f-segment. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>