Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit b7f4a76a929ce4acd60e89aa273a8b208daa8233)
|
|
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)
|
|
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)
|
|
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)
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
(cherry picked from commit dd7527c6f51fff199285f1e1cdb3e8e16bd1781b)
|
|
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)
|
|
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)
|
|
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)
|
|
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)
|
|
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>
|
|
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>
|
|
Use the new acpi_pm_base variable instead.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
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>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
The _EJ0 method should not return a value.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
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>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Use msleep() so that interrupts and other threads can occur during the
delay.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
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>
|
|
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>
|
|
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>
|
|
<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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
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>
|
|
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>
|
|
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>
|
|
Add code for manipulating "direct" style linear RGB framebuffers that
may be in high memory.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Factor out code that calculates the text mode address of a given
character.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|