SeaBIOS Git Change Log

Age Message
6 days 13 hours add serial console support

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 <>
6 days 13 hours paravirt: serial console configuration.

Read QEMU_CFG_NOGRAPHIC, if set add etc/sercon-port
file to enable the serial console.

Signed-off-by: Gerd Hoffmann <>
6 days 13 hours romfile: add support for constant files.

Signed-off-by: Gerd Hoffmann <>
6 days 13 hours kbd: make enqueue_key public, add ascii_to_keycode

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 <>
6 days 13 hours std: add cp437 to unicode map

Signed-off-by: Gerd Hoffmann <>
1 month 6 days pci: enable RedHat PCI bridges to reserve additional resources on PCI init

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 <>
Reviewed-by: Marcel Apfelbaum <>
Commit ec6cb17f89498bcd6123e50a0368a414e6e85d82, by Aleksandr Bezzubikov
1 month 6 days pci: add QEMU-specific PCI capability structure

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 <>
Reviewed-by: Marcel Apfelbaum <>
Commit 4c1f7272b41df5ceec0f41c6c14ca4c68a8638ee, by Aleksandr Bezzubikov
1 month 6 days pci: refactor pci_find_capapibilty to get bdf as the first argument instead 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 <>
Reviewed-by: Marcel Apfelbaum <>
Commit 7de1f65c0cf1e11ee3fa580d59eb7acdd0c42ad9, by Aleksandr Bezzubikov
21 days 21 hours tcgbios: Fix use of unitialized variable

Review-by: Stefan Berger <>
Signed-off-by: Kevin O'Connor <>
2 months 13 days docs: Fix typos in

Reviewed-by: Paul Menzel <>
Signed-off-by: Kevin O'Connor <>
26 days 4 hours vga: Fix bug in stdvga_get_linesize()

Add required GET_GLOBAL() macro to vmode_g access.

Signed-off-by: Kevin O'Connor <>
2 months 6 days usb-xhci: use hub portmap

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 <>
2 months 6 days usb: add hub portmap

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 <>
2 months 19 days virtio: IOMMU support

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 <>
Signed-off-by: Jason Wang <>
3 months 1 day ahci: Disable Native Command Queueing

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 <>
3 months 11 days nvme: Enable NVMe support for non-qemu hardware

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 <>
Signed-off-by: Kevin O'Connor <>
Commit 7759d3a5be049eb8d0b4f7c6b1f1a0ba5e871cf3, by Youness Alaoui
3 months 26 days SeaVGABios/cbvga: Advertise compatible VESA modes

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 <>
Commit e30d51cc58065513279cbe3288108555240e7c44, by Patrick Rudolph
3 months 26 days SeaVGABios/cbvga: Use active mode to clear screen

As coreboot framebuffer is immutable always use CBmodeinfo.

Signed-off-by: Patrick Rudolph <>
Commit 6b69446de71a6f8a472798a38c08881ec42a8518, by Patrick Rudolph
3 months 26 days SeaVGABIOS/vbe: Query driver for scanline pitch v2

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 <>
Commit 4902b8a703779ee2d85da406d6f1dc16df71a43d, by Patrick Rudolph
3 months 26 days SeaVGABios/cbvga: Advertise correct pixel format

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 <>
Commit 4b42cc4b31f682214ab473838f0de0584f58cba8, by Patrick Rudolph
3 months 16 days Revert "lsi-scsi: reset in case of a serious problem"

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 <>
Signed-off-by: Roman Kagan <>
3 months 16 days blockcmd: start REPORT_LUNS with the smallest buffer

A number of emulated SCSI devices in QEMU incorrectly return an error
to REPORT_LUNS command when the size of the data returned is smaller
than the allocation length passed in.

To work it around, start with the smallest allocation length possible:
for 1 entry. This is a slight pessimization because it would require
another REPORT_LUNS iteration if the target has more than a single LUN,
but this appears to have negligible impact on boot times, and makes
REPORT_LUNS enumeration work for more QEMU devices (lsi53c895a,

Reported-by: Maciej Józefczyk <>
Signed-off-by: Roman Kagan <>
4 months 8 days stacks: There is no need to disable NMI if it is already disabled

Don't write to the cmos index port on a mode switch if NMI is already
disabled. This reduces the number of outb() calls.

Signed-off-by: Kevin O'Connor <>
4 months 8 days stacks: Don't update the A20 settings if they haven't changed

The A20 setting is almost always enabled - only issue an outb() if the
A20 is actually changing. This reduces the number of outb() calls.

Signed-off-by: Kevin O'Connor <>
4 months 8 days stacks: Make sure to initialize Call16Data

Initialize the Call16Data at startup - otherwise some early yield()
calls may check for interrupts without using the preferred A20

Signed-off-by: Kevin O'Connor <>