| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
Add --always flag to "git describe" command to get a build identifier
even if one checks out the repo with a depth parameter that prunes out
the last tagged version.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Old versions of KVM would map the same writable copy of the BIOS at
both 0x000f0000 and 0xffff0000. As a result, a reboot on these
machines would result in a reboot loop. So, the code attempts to
check for that situation and invoke a shutdown instead.
Commit b837e68d changed the check to run prior to the first reboot.
However, this broke reboots on the QEMU isapc machine type. Change
the reboot loop check to only be invoked after at least one reboot has
been attempted.
Reported-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
| |
During initialization, real floppy controllers need 4 sense interrupt commands
to clear the interrupt status (this represents the transition from "not ready"
to "ready" for each of the four virtual floppy drives), instead of just one.
This is described in detail in section 7.4 - Drive Polling of the Intel 82077AA
datasheet.
Signed-off-by: Nikolay Nikolov <nickysn@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
| |
When starting up the floppy motor, wait for a certain amount of time, so
that it can spin up and reach a stable speed. This delay is skipped, if the
motor was already running (which can happen, since the floppy motor is
intentionally kept spinning for 2 seconds after the previous floppy
operation completes).
Signed-off-by: Nikolay Nikolov <nickysn@users.sourceforge.net>
|
|
|
|
|
|
| |
The previous version allowed for only two floppies.
Signed-off-by: Nikolay Nikolov <nickysn@users.sourceforge.net>
|
|
|
|
|
|
|
| |
The SPECIFY command sets the Step Rate Time, Head Load Time, Head Unload Time
and the DMA enable/disable bit.
Signed-off-by: Nikolay Nikolov <nickysn@users.sourceforge.net>
|
|
|
|
| |
Signed-off-by: Nikolay Nikolov <nickysn@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use timer_check() instead of using floppy_motor_counter in BDA for the
timeout check in floppy_wait_irq().
The problem with using floppy_motor_counter was that, after it reaches
0, it immediately stops the floppy motors, which is not what is
supposed to happen on real hardware. Instead, after a timeout (like in
the end of every floppy operation, regardless of the result - success,
timeout or error), the floppy motors must be kept spinning for
additional 2 seconds (the FLOPPY_MOTOR_TICKS). So, now the
floppy_motor_counter is initialized to 255 (the max value) in the
beginning of the floppy operation. For IRQ timeouts, a different
timeout is used, specified by the new FLOPPY_IRQ_TIMEOUT constant
(currently set to 5 seconds - a fairly conservative value, but should
work reliably on most floppies).
After the floppy operation, floppy_drive_pio() resets the
floppy_motor_counter to 2 seconds (FLOPPY_MOTOR_TICKS).
This is also consistent with what other PC BIOSes do.
Signed-off-by: Nikolay Nikolov <nickysn@users.sourceforge.net>
|
|
|
|
|
|
|
| |
Reset the floppy motor count, so the motor keeps spinning 2 seconds
after a floppy operation, performed by floppy_drive_pio().
Signed-off-by: Nikolay Nikolov <nickysn@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In case of read or write errors, the floppy system is usually reset and the
operation is retried. In that case, the floppy motor state must be preserved
in order to avoid creating jitter and keep the floppy motor spinning smoothly
at a constant speed. Additionally, the drive select bits should probably also
be preserved, because some systems might need a small delay after selecting a
new drive. In that case, the operation would be retried, without changing
the currently selected drive.
In floppy_enable_controller(), the IRQ bit is now enabled first, before the
reset bit is set. I'm not completely sure whether this is necessary. It is
done just in case some hardware introduces a delay between setting this bit
and actually enabling the IRQ, which would cause us to miss the IRQ, sent by
the controller immediately after reset.
Signed-off-by: Nikolay Nikolov <nickysn@users.sourceforge.net>
|
|
|
|
| |
Signed-off-by: Nikolay Nikolov <nickysn@users.sourceforge.net>
|
|
|
|
| |
Signed-off-by: Nikolay Nikolov <nickysn@users.sourceforge.net>
|
|
|
|
| |
Signed-off-by: Nikolay Nikolov <nickysn@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit ec6cb17f (pci: enable RedHat PCI bridges to reserve additional
resources on PCI init)
added a new vendor specific PCI capability for RedHat PCI bridges
allowing them to reserve additional buses and/or IO/MEM space.
When adding the IO hints PCI capability to the pcie-root-port
without specifying a value for bus reservation, the subordinate bus
computation is wrong and the guest kernel gets messed up.
Fix it by returning to prev code if the value for bus
reservation is not set.
Removed also a wrong debug print "PCI: invalid QEMU resource reserve
cap offset" which appears if the 'IO hints' capability is not present.
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
|
|
|
|
| |
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for the TPM2 ACPI table. If we find it and its
of the appropriate size, we can get the log_area_start_address
and log_area_minimum_size from it.
The latest version of the spec can be found here:
https://trustedcomputinggroup.org/tcg-acpi-specification/
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
are active
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
| |
When timer_calc_usec() is used with large timeout values, such as 60s,
the integer math can overflow and produce different results than when
using timer_calc(time / 1000) for the same timeout.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the Maximum Queue Entries Supported (MQES) to initialize I/O queues
depth rather than picking a fixed number (256) which might not be
supported by some NVMe controllers (the NVMe specification says that an
NVMe controller may support any number between 2 to 4096).
Still cap the I/O queues depth to 256 since, during my testing, SeaBIOS
was running out of memory when using something higher than 256 (4096 on
the NVMe controller that I've had a chance to try).
Signed-off-by: Filippo Sironi <sironi@amazon.de>
|
|
|
|
|
|
|
|
| |
Make sure the USB device is still present before altering the xhci
"slot" for it. It appears some controllers will hang if a request is
sent to a port no longer connected.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
| |
If the allocation of I/O queues ran out of memory, the code would fail to detect
that and happily use these queues at address zero. For me this happens for
systems with more than 7 NVMe controllers.
Fix the out of memory handling to gracefully handle this case.
Signed-off-by: Julian Stecklina <jsteckli@amazon.de>
|
|
|
|
|
|
|
|
|
| |
Use the logic for building a 'struct xhci_trb' that was in
xhci_xfer_queue() up so that command and ring TRBs can also use that
functionality. This eliminates the need to manually generate the
xhci_trb struct from those code paths.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Use the "low" memory segment instead of the f-segment for the drive_s
storage. This can help avoid running out of memory in the f-segment.
Tested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
| |
Now that the drive_s struct does not need to be in the f-segment,
rename references to drive_gf in the generic drive code to drive_fl.
This is just variable renames - no code changes.
Tested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Allow the 'struct drive_s' drive description structure to be in either
the "low" memory segment or the f-segment.
Tested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
The 'struct drive_s' pointer is a 32bit pointer (and boot.c code is
only compiled in 32bit mode), so avoid using the "_g" suffix on the
pointer.
Tested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
Redirect int10 calls to serial console output.
Parse serial input and queue key events.
The serial console can work both as primary display
and in parallel to another vga display (splitmode).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
| |
Read QEMU_CFG_NOGRAPHIC, if set add etc/sercon-port
file to enable the serial console.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
| |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
| |
serial console wants queue key events and needs to map ascii chars to
the keycode, so make enqueue_key public and also exports a helper
function so sercon can use the scan_to_keycode mapping table.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
| |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
| |
In case of Red Hat Generic PCIE Root Port reserve additional buses
and/or IO/MEM/PREF space, which values are provided in a vendor-specific capability.
Signed-off-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On PCI init PCI bridge devices may need some
extra info about bus number to reserve, IO, memory and
prefetchable memory limits. QEMU can provide this
with special vendor-specific PCI capability.
This capability is intended to be used only
for Red Hat PCI bridges, i.e. QEMU cooperation.
Signed-off-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
of the whole pci_device
Refactor pci_find_capability function to get bdf instead of
a whole pci_device* as the only necessary field for this function
is still bdf.
Signed-off-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
|
|
|
|
|
| |
Review-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
| |
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Add required GET_GLOBAL() macro to vmode_g access.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
xhci controllers have two virtual ports per (usb3 capable) physical
port, one for usb2 and one for usb3 devices. Add a hub portmap callback
to map the virtual ports to physical ports.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
| |
Allow usb hubs to map (software) ports to physical ports via op
callback. This is needed to make bootorder work in case there
isn't a simple linear mapping.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Since we don't enable IOMMU at all, we can then simply enable the
IOMMU support by claiming the support of VIRITO_F_IOMMU_PLATFORM. This
fixes booting failure when iommu_platform is set from qemu cli.
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The AHCI driver currently sets the NCQ bit for every command that is
issued to the SATA drive. This is not needed as there is always only
one command active at a time and in turn can lead to a hanging AHCI
controller (true for Marvel 88SE9170). The following patch disables
the usage of NCQ completely. With this patch the Marvel AHCI
controller works just fine without any issues.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
| |
NVMe support was tested on purism/librem13 laptops and SeaBIOS has
no problems in detecting and booting the drives.
This is a continuation of commit 235a8190 which was incomplete.
Signed-off-by: Youness Alaoui <youness.alaoui@puri.sm>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Advertise compatible VESA modes, that are smaller or equal to
coreboot's active framebuffer. Only modes that have the same Bpp
are advertise and can be selected.
Allows the Windows 7 bootloader NTLDR to show up in VESA mode.
Allows to show the Windows 7 boot logo.
Allows Windows to boot in safe mode and in normal boot using
VgaSave driver with resolution up to 1600x1200.
This fixes most likely other bootloader and operating systems as well,
in case the are relying on VESA framebuffer support.
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
|
|
|
|
|
|
| |
As coreboot framebuffer is immutable always use CBmodeinfo.
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Query the driver for the real scanline pitch in bytes.
As cbvga doesn't change the pitch on mode change, always
return the same pitch, that might exceed width times Bytes-per-pixel.
Report the default stdvga pitch for all other drivers.
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Accumulate the pixel format's bits instead relying on coreboot's
bits_per_pixel, which says nothing about the active pixel format.
Allows VBE to correctly advertise XRGB8 and BGRX8 framebuffer formats,
commonly used by coreboot.
Fixes at least Windows Bootloader and gfxboot.
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 11277846e819b9eef3db5ac833a6a47f95f5ef15.
It was originally introduced to deal with the case when REPORT_LUNS
caused an error in QEMU implementation of lsi53c895a and left it in a
"confused" state making further interaction impossible.
However the remedy was worse than the disease: the reset was
controller-wide causing all luns to reset, losing all in-flight requests;
upon that all luns lit up unit_attention condition, so that any
non-informational request would fail with check_condition status. As a
result, the lun enumeration succeeded and I saw the respective entries
in the boot menu during my testing, but the read from those luns ended
with an error and booting failed, which I didn't bother to test.
So this reverts to the original error handling behavior. The problem
with the failing REPORT_LUNS is addressed in the preceding patch, by
making it unlikely to fail.
Reported-by: Maciej Józefczyk <maciej.jozefczyk@corp.ovh.com>
Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
|