Upstream
  1. Upstream

seabios

Public
AuthorCommitMessageCommit dateIssues
Marcel ApfelbaumKevin O'ConnorMarcel Apfelbaum
14d91c353e1pci: fix 'io hints' capability for RedHat PCI bridgesCommit 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 th...
Paul MenzelKevin O'ConnorPaul Menzel
844b86464a5docs/Download: Use more secure HTTPS URLs where possibleSigned-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Stefan BergerKevin O'ConnorStefan Berger
df46d10c8a7tpm: Add support for TPM2 ACPI tableAdd 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>
Kevin O'ConnorKevin O'Connor
0541f2f0f24paravirt: Only enable sercon in NOGRAPHIC mode if no other console specifiedSigned-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'ConnorKevin O'Connor
9ce6778f08cdocs: Add sercon-port to Runtime_config.md documentationSigned-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'ConnorKevin O'Connor
63451fca13cdocs: Note v1.11.0 releaseSigned-off-by: Kevin O'Connor <kevin@koconnor.net>
Gerd HoffmannKevin O'ConnorGerd Hoffmann
0ca6d6277dfsercon: Disable ScreenAndDebug in case both serial console and serial debug are activeSigned-off-by: Gerd Hoffmann <kraxel@redhat.com>
Kevin O'ConnorKevin O'Connor
488e1c3fef2timer: Avoid integer overflows in usec and nsec calculationsWhen 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>
Filippo SironiKevin O'ConnorFilippo Sironi
cd47172a673nvme: Use the Maximum Queue Entries Supported (MQES) to initialize I/O queuesUse 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 t...
Kevin O'ConnorKevin O'Connor
5c1a2c75951xhci: Verify the device is still present in xhci_cmd_submit()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>
Julian StecklinaKevin O'ConnorJulian Stecklina
f703604b309nvme: fix out of memory behaviorIf 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>
Kevin O'ConnorKevin O'Connor
4b48839999cxhci: Build TRBs directly in xhci_trb_queue()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>
Kevin O'ConnorKevin O'Connor
f3d2a156448virtio: Allocate drive_s storage in low memoryUse 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>
Kevin O'ConnorKevin O'Connor
e5a0b616370block: Rename disk_op_s->drive_gf to drive_flNow 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>
Kevin O'ConnorKevin O'Connor
04db972290adisk: Don't require the 'struct drive_s' to be in the f-segmentAllow 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>
Kevin O'ConnorKevin O'Connor
5e9a6d5b03bboot: Rename drive_g to driveThe '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>
Gerd HoffmannKevin O'ConnorGerd Hoffmann
d6728f301d7add serial console supportRedirect 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>
Gerd HoffmannKevin O'ConnorGerd Hoffmann
0ebc29f9c4dparavirt: serial console configuration.Read QEMU_CFG_NOGRAPHIC, if set add etc/sercon-port file to enable the serial console. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd HoffmannKevin O'ConnorGerd Hoffmann
1bda724cc56romfile: add support for constant files.Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd HoffmannKevin O'ConnorGerd Hoffmann
90fa5115271kbd: make enqueue_key public, add ascii_to_keycodeserial 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>
Gerd HoffmannKevin O'ConnorGerd Hoffmann
44270bc1d28std: add cp437 to unicode mapSigned-off-by: Gerd Hoffmann <kraxel@redhat.com>
Aleksandr BezzubikovKevin O'ConnorAleksandr Bezzubikov
ec6cb17f894pci: enable RedHat PCI bridges to reserve additional resources on PCI initIn 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>
Aleksandr BezzubikovKevin O'ConnorAleksandr Bezzubikov
4c1f7272b41pci: add QEMU-specific PCI capability structureOn 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>
Aleksandr BezzubikovKevin O'ConnorAleksandr Bezzubikov
7de1f65c0cfpci: refactor pci_find_capapibilty to get bdf as the first argument instead of the whole pci_deviceRefactor 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>
Kevin O'ConnorKevin O'Connor
1ef72ab2f89tcgbios: Fix use of unitialized variableReview-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'ConnorKevin O'Connor
828af21d3ecdocs: Fix typos in Memory_Model.mdReviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'ConnorKevin O'Connor
ef5fdc99b77vga: Fix bug in stdvga_get_linesize()Add required GET_GLOBAL() macro to vmode_g access. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Gerd HoffmannGerd Hoffmann
b404a5f417cusb-xhci: use hub portmapxhci 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>
Gerd HoffmannGerd Hoffmann
ca9dcc2edd7usb: add hub portmapAllow 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>
Jason WangKevin O'ConnorJason Wang
dd9bba5b9c1virtio: IOMMU supportSince 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>
Zeh, WernerKevin O'ConnorZeh, Werner
b3a9f27fb1fahci: Disable Native Command QueueingThe 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...
Youness AlaouiKevin O'ConnorYouness Alaoui
7759d3a5be0nvme: Enable NVMe support for non-qemu hardwareNVMe 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>
Patrick RudolphKevin O'ConnorPatrick Rudolph
e30d51cc580SeaVGABios/cbvga: Advertise compatible VESA modesAdvertise 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 likel...
Patrick RudolphKevin O'ConnorPatrick Rudolph
6b69446de71SeaVGABios/cbvga: Use active mode to clear screenAs coreboot framebuffer is immutable always use CBmodeinfo. Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Patrick RudolphKevin O'ConnorPatrick Rudolph
4902b8a7037SeaVGABIOS/vbe: Query driver for scanline pitch v2Query 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>
Patrick RudolphKevin O'ConnorPatrick Rudolph
4b42cc4b31fSeaVGABios/cbvga: Advertise correct pixel formatAccumulate 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>
Roman KaganKevin O'ConnorRoman Kagan
58953eb793bRevert "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...
Roman KaganKevin O'ConnorRoman Kagan
6345621ded7blockcmd: start REPORT_LUNS with the smallest bufferA 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 th...
Kevin O'ConnorKevin O'Connor
dee3c1535d5stacks: There is no need to disable NMI if it is already disabledDon'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 <kevin@koconnor.net>
Kevin O'ConnorKevin O'Connor
8ebb33b1588stacks: Don't update the A20 settings if they haven't changedThe 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 <kevin@koconnor.net>
Kevin O'ConnorKevin O'Connor
5869a6b5874stacks: Make sure to initialize Call16DataInitialize the Call16Data at startup - otherwise some early yield() calls may check for interrupts without using the preferred A20 setting. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'ConnorKevin O'Connor
d8b308077e9smm: Backup and restore A20 on an SMI based mode switchQEMU does not store the A20 setting in the SMM cpu environment area (and it does not look like real CPUs do either). So, manually backup and restore A20 on a mode switch. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'ConnorKevin O'Connor
235a8190a05NVMe: Allow NVMe to be enabled on real hardwareA couple of users have reported success with the NVMe driver on real hardware, so allow it to be enabled outside of QEMU. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'ConnorKevin O'Connor
3fdabaee7d4src: Minor - remove tab characters that slipped into SeaBIOS C codeSigned-off-by: Kevin O'Connor <kevin@koconnor.net>
Roman KaganKevin O'ConnorRoman Kagan
3198c06b7b5lsi-scsi: try to enumerate luns with REPORT LUNSEnumerate active luns with REPORT LUNS and, if that fails[*], fall back to sequentially enumerating them up to (arbitrarily chosen) #8 [**]. [*] in current QEMU, REPORT LUNS does fail in lsi53c895a because the returned data is smaller than the allocation length which is (wrongly) considered an underflow [**] in current QEMU, luns above 0 are not supported in lsi53c895a, so this patch is here ...
Roman KaganKevin O'ConnorRoman Kagan
11277846e81lsi-scsi: reset in case of a serious problemWhen the device reports a serious problem via SIST[01] registers, it needs to be reset, otherwise the following requests will most likely fail, too. In particular, REPORT LUNS which fails (wrongly) with underflow in QEMU makes all the following requests fail, too, rendering the device unusable. Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
Roman KaganKevin O'ConnorRoman Kagan
cf480dd3eddmpt-scsi: try to enumerate luns with REPORT LUNSEnumerate active luns with REPORT LUNS and, if that fails[*], fall back to sequentially enumerating them up to (arbitrarily chosen) #8. Note that this patch also makes mpt_scsi_cmd accept luns other than 0; I've no idea what was the original motivation not to, and what can break due to this change (nothing broke in my basic tests with QEMU). [*] in current QEMU, REPORT LUNS does fail in mptsa...
Roman KaganKevin O'ConnorRoman Kagan
0a6e0a8ddd3pvscsi: fix the comment about lun enumerationThe comment in pvscsi_scan_target (presumably c&p-ed from another driver) reads that REPORTS LUNS should better be used to enumerate the luns on the target. However, according to the Linux driver, the device supports no more than a single lun per target. So adjust the comment to tell exactly that. Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
Roman KaganKevin O'ConnorRoman Kagan
8579fd20c89usb-uas: enumerate luns with REPORT LUNSSigned-off-by: Roman Kagan <rkagan@virtuozzo.com>
Roman KaganKevin O'ConnorRoman Kagan
3aadef4fd9cesp-scsi: enumerate luns with REPORT LUNSSigned-off-by: Roman Kagan <rkagan@virtuozzo.com>