aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-11-25build: make buildable with intel compiler.rel-1.7.5.21.7.5-stableKevin O'Connor1-8/+2
This is a partial backport of commit e5749978: build: Keep segmented sections separate until final link step. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-11-25add scripts/tarball.shGerd Hoffmann1-0/+36
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit b7f4a76a929ce4acd60e89aa273a8b208daa8233)
2014-11-10megasas: read addional PCI I/O barrel-1.7.5.1Hannes Reinecke1-0/+4
Some newer cards have the I/O bar at BAR 0, so we need to check that, too, if we cannot get an address for BAR 2. Without this patch the new 'megasas-gen2' emulation in qemu is not detected. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 09f876f11743c1143c73a52eb889ae9231f7a5b3)
2014-11-10ehci: Fix bug in hub port assignmentKevin O'Connor1-1/+1
The usbdev->port field is zero indexed, while the USB spec expects the port values to start at one. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit 67d1fbef0f630e1e823f137d1bae7fa5790bcf4e)
2014-11-10build: Avoid absolute paths during "whole-program" compiling.Kevin O'Connor1-2/+2
The build currently does a textual include of all files in order to use the -fwhole-compile optimization. Update it to use relative file paths instead of absolute file paths. This makes the section names in the resulting binary more readable. It also makes the build easier on some Windows hosts. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit ec44fac1f69bd3d513204a6192623de511b11144)
2014-11-10Don't enable thread preemption during S3 resume vga option rom execution.Kevin O'Connor1-1/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit dd7527c6f51fff199285f1e1cdb3e8e16bd1781b)
2014-11-10vgabios: Return from handle_1011() if handler found.Kevin O'Connor1-9/+9
Fix cut-and-paste error in handle_1011() causing spurious debug_stub() calls when CONFIG_VGA_STDVGA_PORTS is enabled. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit c58799cbee6a7a97ad8253494232da29b4a1b275)
2014-08-26boot: Change ":rom%d" boot order rom instance to ":rom%x"Kevin O'Connor1-2/+2
Use hex numbers for the rom instance count in boot order open firmware device naming. The ":rom" suffix isn't part of a standard and it's highly unlikely any rom would have 10 or more drives on it, but this change makes the code more similar to the numbering of other boot order devices. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> Reviewed-by: Markus Armbruster <armbru@redhat.com> (cherry picked from commit e710447ef1d2bd4e61e12b210039c00fbeacf624)
2014-08-26boot: Fix boot order for SCSI target, lun > 9Markus Armbruster1-2/+2
We identify devices by their Open Firmware device paths. The path component for the logical unit on a bus is incorrect: bootprio_find_scsi_device() and bootprio_find_usb() format target (a.k.a. SCSI ID) and lun in decimal, while QEMU uses hexadecimal. Bootorder list entries with target, lun > 9 aren't found (lucky case), or attributed to the wrong logical unit (unlucky case). The relevant spec[*] agrees with QEMU (and OVMF, for that matter). Change %d to %x. No actual impact on USB, because QEMU only uses LUN 0 there. RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1096560 [*] Open Firmware Recommended Practice: SCSI-3 Parallel Interface, Version 1, Section 3.1 Physical Address Formats and Representations http://www.openfirmware.org/1275/practice/spi/spi1_0.ps IEEE Standard for Boot (Initialization Configuration) Firmware: Core Requirements and Practices, IEEE Std 1275-1994, Annex E SCSI host adapter package class, section E.2.1 Physical address formats and representations Signed-off-by: Markus Armbruster <armbru@redhat.com> (cherry picked from commit 275672eb70efdf81c51b997d41a4409b404aa8f6)
2014-07-02hw/pci: reserve IO and mem for pci express downstream ports with no devices ↵Marcel Apfelbaum1-2/+32
attached Commit c6e298e1f12e0f4ca02b6da5e42919ae055f6830 hw/pci: reserve IO and mem for pci-2-pci bridges with no devices attached introduced support for hot-plugging devices behind pci-2-pci bridges. Extend hotplug support also for pci express downstream ports. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 3aa31d7d6375303fc88438021aad485f50bb1e39)
2014-05-27python3 fixes for vgabios and csm builds.rel-1.7.5Kevin O'Connor2-19/+19
Avoid using chr() as this produces unicode strings on python3. Make sure to only use ord() on slices as the python3 bytearray type returns an integer on a non-slice array access. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-05-20Allow using full io region on q35.Gerd Hoffmann2-7/+14
If qemu is new enough to support acpi table loading, then go move pmbase out of the way. This allows to use the whole 0x1000 -> 0xffff io address space on q35. piix has hotplug ports in the 0xa000 -> 0xafff area, so we can't do the same there. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-05-20acpi: remove PORT_ACPI_PM_BASE constantGerd Hoffmann6-19/+19
Use the new acpi_pm_base variable instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-05-20smm: remove code to handle ACPI disable/enablePaolo Bonzini1-25/+0
This is handled already in QEMU, no need to do it in SMM. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-05-13vgabios: Add debug message if x86emu leal check triggers.Kevin O'Connor1-0/+10
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-05-09acpi: Fix acpi dsdt compile warning.rel-1.7.5-rc1Kevin O'Connor2-2/+1
The _EJ0 method should not return a value. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-05-08Fix int 1589 calls when CONFIG_ENTRY_EXTRASTACK is enabled.Kevin O'Connor3-3/+13
The int 1589 call is entered in real mode and returns in protected mode. However, the code to use the "extra stack" does not support that. Fix this by never using the "extra stack" on int 1589 calls. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-05-08build: Make sure romlayout.o is recompiled on Kconfig change.Kevin O'Connor1-1/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-05-08xhci: Use msleep() instead of mdelay() for port status delay.Kevin O'Connor1-1/+1
Use msleep() so that interrupts and other threads can occur during the delay. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-05-08ld: don't hardcode "-melf_i386"Roger Pau Monne1-2/+3
On FreeBSD, the name of the emulation is "-melf_i386_fbsd", so allow SeaBIOS to fetch the emulation to use from the environment variables. This allows SeaBIOS to compile on FreeBSD with gcc. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com>
2014-05-06If an int 1587 call is made from an option rom, stay in bigreal mode.Kevin O'Connor5-7/+17
Modify the int 1587 handler to check if the POST phase is still running. If it is, use bigreal mode segment limits so that the caller remains in bigreal mode when the 1587 handler completes. This helps with SeaVGABIOS' use of "direct" framebuffer accesses (an option rom may attempt to display text during its option rom execution which can cause SeaVGABIOS to make the int 1587 calls). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-05-06SMBIOS: Check for aggregate tables & entry point in fw_cfgGabriel L. Somlo3-2/+138
Check fw_cfg for the presence of an aggregate set of smbios tables (etc/smbios/smbios-tables) and an entry point structure (etc/smbios/smbios-anchor), and, if found, use them instead of generating entries locally. We ensure the presence of a type 0 (bios information) structure by generating it locally if necessary, which is expected to be the common case. Signed-off-by: Gabriel L. Somlo <somlo@cmu.edu> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-04-16hw/pci: check if pci2pci bridges implement optional limit registersMarcel Apfelbaum3-7/+37
<I/O Base Register, I/O Limit Register> pair and <Prefetchable Memory Base Register, Prefetchable Memory Limit Register> pair are both optional. Do not reserve ranges if the above registers are not implemented. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
2014-04-16hw/pci: reserve IO and mem for pci-2-pci bridges with no devices attachedMarcel Apfelbaum3-0/+23
If a pci-2-pci bridge supports hot-plug functionality but there are no devices connected to it, reserve IO/mem in order to be able to attach devices later. Do not waste space, use minimum allowed. Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
2014-04-14vgabios: Define PlatformRunningOn to make compile happy.Kevin O'Connor1-0/+3
With CONFIG_COREBOOT=y, CONFIG_QEMU_HARDWARE=y, CONFIG_VGA_COREBOOT=y, CONFIG_DEBUG_IO=y the compile would break because this variable was missing. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-12Factor out smbios table walking from display_uuid to smbios_next().Kevin O'Connor1-62/+46
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-11Minor - replace some tab characters that slipped into the code.Kevin O'Connor6-10/+10
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-11vgabios: Initial support for coreboot native vga vgabios.Kevin O'Connor7-4/+251
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-11coreboot: Make coreboot table searching available to other code.Kevin O'Connor2-23/+38
Make the coreboot table searching code available to code outside coreboot.c, and make it runnable from 16bit mode. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-11vgabios: PMM scan was incorrectly depending on a zero %ds segment.Kevin O'Connor1-6/+6
Make sure the PMM scanning code uses the GET_FARVAR macro. (The existing code only worked because SeaBIOS happens to call the vgabios in bigreal mode with %ds == %ss = 0.) Also, the scan doesn't require bigreal mode - use accesses relative to the SEG_BIOS segment so that the scan can work in regular real mode. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-11Set the color attribute when calling vgabios print character.Kevin O'Connor1-0/+1
Set the color attribute in case the SeaBIOS console code is used while the vgabios is in a graphics mode. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-11vgabios: Add support for manipulating framebuffers in high memory.Kevin O'Connor2-0/+112
Add code for manipulating "direct" style linear RGB framebuffers that may be in high memory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-11vgabios: Introduce text_address().Kevin O'Connor3-36/+24
Factor out code that calculates the text mode address of a given character. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-11vgabios: Rewrite vgafb.c graphics operations to set of 4 standard operators.Kevin O'Connor2-367/+306
The vgabios graphics manipulations can all be implemented on top of 4 basic primitives: read 8 pixels, write 8 pixels, move pixels, and clear pixels. Implement these four operators for all the graphics modes and rewrite the graphics functions in vgafb.c to use them. This simplifies the graphics code as the high level logic no longer needs to be implemented for each graphical framebuffer type. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-11vgabios: Split vgafb_scroll() into separate move and clear functions.Kevin O'Connor3-122/+178
Rewrite the low-level scroll code so that it is implemented using two basic operations: move text and clear text. This simplifies the low-level code as it no longer needs to handle up scrolling vs down scrolling. Determining the direction of the scroll is now done in the higher level (vgabios.c) code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-11vgabios: Add option to control use of standard VGA IO ports.Kevin O'Connor4-13/+50
Add option CONFIG_VGA_STDVGA_PORTS. When this option is disabled, the main BIOS code will not attempt to access any of the legacy VGA IO ports. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-08Minor - remove unused includes from pci.c.Kevin O'Connor2-5/+2
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-07apm: Remove old Bochs mechanism for shutdown/suspend/standby.Kevin O'Connor2-29/+6
Remove the old mechanism that used port 0x8900 to send apm signals. Recent versions of QEMU no longer support this port. Bochs and QEMU only ever supported shutdown anyway, and shutdown is already available via an ACPI mechanism. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-07Document no new changes to pirtable.c, mptable.c, acpi.c, and smbios.c.Kevin O'Connor4-0/+4
Add a note to the code that generates the pir, mptable, smbios, and smbios tables that no new changes are expected. Going forward, it is expected that if any changes are needed to these bios tables that SeaBIOS will get the tables passed in from upstream. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-07Use biostables.c for copying bios tables even when generating them.Kevin O'Connor6-65/+43
Use the biostables.c copy_pir(), copy_smbios(), copy_acpi_rsdp(), and copy_mptable() code even when using the legacy bios table generation code. This unifies the final bios table deployment code between qemu, coreboot, and csm. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-07Move PirAddr definition from pirtable.c to biostables.c.Kevin O'Connor3-3/+4
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-07smbios: Move smbios parsing logic from smbios.c to biostables.c.Kevin O'Connor3-72/+73
After this change, src/fw/smbios.c only contains the legacy code for generating SMBIOS tables. This change only contains code movement - no logic is changed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-07acpi: Move acpi parsing logic from acpi.c to biostables.c / paravirt.c.Kevin O'Connor4-149/+160
After this change, src/fw/acpi.c only contains the legacy code for generating ACPI tables. This change only contains code movement - no logic is changed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-07Replace CONFIG_THREAD_OPTIONROMS with a runtime config setting.Kevin O'Connor4-19/+30
Replace the CONFIG_THREAD_OPTIONROMS option with the CBFS (or fw_cfg) file "etc/threads". This allows for the "threads during optionrom" capability to be enabled/disabled without requiring SeaBIOS to be recompiled. A value of "2" in this file will enable threads to run during option rom execution. This change also allows for all threads to be disabled via the same runtime config file. Setting the file to a value of "0" will cause SeaBIOS to perform all hardware initialization serially. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-05Minor - fix some typos in comments.Kevin O'Connor2-2/+2
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-04-05usb: Only disable HID devices if both USB_MOUSE and USB_KEYBOARD are off.Kevin O'Connor1-1/+1
Fix typo in code causing both CONFIG_USB_MOUSE and CONFIG_USB_KEYBOARD to be effectively disabled if either is disabled. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-03-20vp_init_simple: enable PCI bus-mastering before relying on DMA.Eric Northup1-0/+1
An analogous change was made in the LSI scsi driver, commit 7d052575258ad2fc487ca3f9a6b62eff1b767900. Qemu works around guests that don't correctly enable PCI bus mastering before using virtio queues' DMA (search for VIRTIO_PCI_BUG_BUS_MASTER / VIRTIO_PCI_FLAG_BUS_MASTER_BUG ), but it'd be better to be correct. Signed-off-by: Eric Northup <digitaleric@google.com>
2014-03-20init_virtio_blk, init_virtio_scsi: reset HBA on errorEric Northup2-3/+3
Extend commit 5f2d17d35b2339526f3b3d580b279ea78e406a25: reset on all error paths, and also for virtio_blk not just virtio_scsi. Signed-off-by: Eric Northup <digitaleric@google.com>
2014-03-20smbios: Default all values to zero.Kevin O'Connor1-0/+1
Make sure to initialize the entire smbios area to zero so that any field not explicitly initialized does not have random values. (It was found that the memory_error_information_handle field in smbios_type_17 was not being set.) Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-03-06vga: rework bar detection, add virtio-vgaGerd Hoffmann1-4/+12
Replace the heuristic which checks the bar 0 attributes to figure whenever bar 0 or bar 1 has the linear framebuffer with a vendor id check. Add support for virtio-vga which uses bar 2 for the linear framebuffer. Cc: Dave Airlie <airlied@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>