diff --git a/.gitignore b/.gitignore index 93078a7..eb8fb8c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/seabios-1.14.0.tar.gz +SOURCES/seabios-1.15.0.tar.gz diff --git a/.seabios.metadata b/.seabios.metadata index 555dd78..7e522e1 100644 --- a/.seabios.metadata +++ b/.seabios.metadata @@ -1 +1 @@ -61be3265b3d98f66cefe43569ab3870f53c7e2ea SOURCES/seabios-1.14.0.tar.gz +1ab1ca5971e59d8d6b5c579b242d586e54a86873 SOURCES/seabios-1.15.0.tar.gz diff --git a/SOURCES/0002-allow-1TB-of-RAM.patch b/SOURCES/0002-allow-1TB-of-RAM.patch index 4c89c0a..c726ce0 100644 --- a/SOURCES/0002-allow-1TB-of-RAM.patch +++ b/SOURCES/0002-allow-1TB-of-RAM.patch @@ -1,4 +1,4 @@ -From 92889386425bab008397e6a48ab922d635b495f6 Mon Sep 17 00:00:00 2001 +From 0dea1df1f9b9a64bd9e71dd1a7b4c6cc9962afa0 Mon Sep 17 00:00:00 2001 From: Andrea Arcangeli Date: Tue, 8 Oct 2013 17:07:23 +0200 Subject: allow >1TB of RAM @@ -64,5 +64,5 @@ index 252e73a..c4369f8 100644 // RTC register flags -- -1.8.3.1 +2.27.0 diff --git a/SOURCES/0003-smbios-set-bios-vendor-version-fields-to-Seabios-0.5.patch b/SOURCES/0003-smbios-set-bios-vendor-version-fields-to-Seabios-0.5.patch index dce6b4e..526a1c6 100644 --- a/SOURCES/0003-smbios-set-bios-vendor-version-fields-to-Seabios-0.5.patch +++ b/SOURCES/0003-smbios-set-bios-vendor-version-fields-to-Seabios-0.5.patch @@ -1,4 +1,4 @@ -From f82eb7cc578ec3496a05c435bdf6b571ec92d07a Mon Sep 17 00:00:00 2001 +From cc21704fcfbc62af6789e1362eb05a2dc2b56cbf Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 28 Jul 2014 12:14:11 +0200 Subject: smbios: set bios vendor/version fields to Seabios/0.5.1 @@ -42,5 +42,5 @@ index 62a563b..4dc1737 100644 p->bios_starting_address_segment = 0xe800; -- -1.8.3.1 +2.27.0 diff --git a/SOURCES/0004-Workaround-for-a-win8.1-32-S4-resume-bug.patch b/SOURCES/0004-Workaround-for-a-win8.1-32-S4-resume-bug.patch index 776ab88..9b72496 100644 --- a/SOURCES/0004-Workaround-for-a-win8.1-32-S4-resume-bug.patch +++ b/SOURCES/0004-Workaround-for-a-win8.1-32-S4-resume-bug.patch @@ -1,4 +1,4 @@ -From e947600eec4921f473c4d087dfb2a2c39684dd77 Mon Sep 17 00:00:00 2001 +From 8629f200084ce1aab31d193280d34b5fb16e543f Mon Sep 17 00:00:00 2001 From: Radim Krcmar Date: Mon, 10 Mar 2014 15:14:27 +0100 Subject: Workaround for a win8.1-32 S4 resume bug @@ -60,5 +60,5 @@ index e44e112..298a722 100644 pic_eoi1(); } -- -1.8.3.1 +2.27.0 diff --git a/SOURCES/0005-pci-let-firmware-reserve-IO-for-pcie-pci-bridge.patch b/SOURCES/0005-pci-let-firmware-reserve-IO-for-pcie-pci-bridge.patch new file mode 100644 index 0000000..614b1f8 --- /dev/null +++ b/SOURCES/0005-pci-let-firmware-reserve-IO-for-pcie-pci-bridge.patch @@ -0,0 +1,90 @@ +From 153f5ec6899055276eaef20eae7b6d9fd090a05a Mon Sep 17 00:00:00 2001 +From: Igor Mammedov +Date: Mon, 29 Nov 2021 06:48:12 -0500 +Subject: pci: let firmware reserve IO for pcie-pci-bridge + +RH-Bugzilla: 2001921 + +With [1] patch hotplug of rtl8139 succeeds, with caveat that it +fails to initialize IO bar, which is caused by [2] that makes +firmware skip IO reservation for any PCIe device, which isn't +correct in case of pcie-pci-bridge. +Fix it by exposing hotplug type and making IO resource optional +only if PCIe hotplug is in use. + +[1] + "pci: reserve resources for pcie-pci-bridge to fix regressed hotplug on q35" +[2] + +Fixes: 76327b9f32a ("fw/pci: do not automatically allocate IO region for PCIe bridges") +Signed-off-by: Igor Mammedov imammedo@redhat.com +CC: mapfelba@redhat.com +CC: kraxel@redhat.com +CC: mst@redhat.com +CC: lvivier@redhat.com +CC: jusual@redhat.com +Tested-by: Laurent Vivier +Acked-by: Michael S. Tsirkin +Message-Id: <20211129114812.231849-3-imammedo@redhat.com> +Signed-off-by: Gerd Hoffmann +--- + src/fw/pciinit.c | 19 ++++++++++++++----- + 1 file changed, 14 insertions(+), 5 deletions(-) + +diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c +index d25931b..3c99d51 100644 +--- a/src/fw/pciinit.c ++++ b/src/fw/pciinit.c +@@ -793,7 +793,13 @@ pci_region_create_entry(struct pci_bus *bus, struct pci_device *dev, + return entry; + } + +-static int pci_bus_hotplug_support(struct pci_bus *bus, u8 pcie_cap) ++typedef enum hotplug_type_t { ++ HOTPLUG_NO_SUPPORTED = 0, ++ HOTPLUG_PCIE, ++ HOTPLUG_SHPC ++} hotplug_type_t; ++ ++static hotplug_type_t pci_bus_hotplug_support(struct pci_bus *bus, u8 pcie_cap) + { + u8 shpc_cap; + +@@ -815,11 +821,12 @@ static int pci_bus_hotplug_support(struct pci_bus *bus, u8 pcie_cap) + */ + u16 slot_implemented = pcie_flags & PCI_EXP_FLAGS_SLOT; + +- return downstream_port && slot_implemented; ++ return downstream_port && slot_implemented ? ++ HOTPLUG_PCIE : HOTPLUG_NO_SUPPORTED; + } + + shpc_cap = pci_find_capability(bus->bus_dev->bdf, PCI_CAP_ID_SHPC, 0); +- return !!shpc_cap; ++ return !!shpc_cap ? HOTPLUG_SHPC : HOTPLUG_NO_SUPPORTED; + } + + /* Test whether bridge support forwarding of transactions +@@ -904,7 +911,7 @@ static int pci_bios_check_devices(struct pci_bus *busses) + u8 pcie_cap = pci_find_capability(bdf, PCI_CAP_ID_EXP, 0); + u8 qemu_cap = pci_find_resource_reserve_capability(bdf); + +- int hotplug_support = pci_bus_hotplug_support(s, pcie_cap); ++ hotplug_type_t hotplug_support = pci_bus_hotplug_support(s, pcie_cap); + for (type = 0; type < PCI_REGION_TYPE_COUNT; type++) { + u64 align = (type == PCI_REGION_TYPE_IO) ? + PCI_BRIDGE_IO_MIN : PCI_BRIDGE_MEM_MIN; +@@ -948,7 +955,9 @@ static int pci_bios_check_devices(struct pci_bus *busses) + if (pci_region_align(&s->r[type]) > align) + align = pci_region_align(&s->r[type]); + u64 sum = pci_region_sum(&s->r[type]); +- int resource_optional = pcie_cap && (type == PCI_REGION_TYPE_IO); ++ int resource_optional = 0; ++ if (hotplug_support == HOTPLUG_PCIE) ++ resource_optional = pcie_cap && (type == PCI_REGION_TYPE_IO); + if (!sum && hotplug_support && !resource_optional) + sum = align; /* reserve min size for hot-plug */ + if (size > sum) { +-- +2.27.0 + diff --git a/SOURCES/0005-redhat-reserve-more-memory-on-fseg.patch b/SOURCES/0005-redhat-reserve-more-memory-on-fseg.patch deleted file mode 100644 index 49090cf..0000000 --- a/SOURCES/0005-redhat-reserve-more-memory-on-fseg.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 798141f00f5c184da5fd096cb1da32706628e890 Mon Sep 17 00:00:00 2001 -From: Gerd Hoffmann -Date: Tue, 19 Apr 2016 11:27:50 +0200 -Subject: redhat: reserve more memory on fseg - -RH-Author: Gerd Hoffmann -Message-id: <1461065271-22039-2-git-send-email-kraxel@redhat.com> -Patchwork-id: 70213 -O-Subject: [RHEL-7.1 seabios PATCH 1/2] redhat: reserve more memory on fseg -Bugzilla: 1327060 -RH-Acked-by: Miroslav Rezanina -RH-Acked-by: Marcel Apfelbaum -RH-Acked-by: Laszlo Ersek - -seabios 1.7.5 has about 8k free space in fseg. - -configure 1.9.1 to keep the same amout space in fseg, so the amout of -disks we are able to handle stays roughly the same. ahci + scsi are -slightly below the 1.7.5 numbers but stay above the documented limits. -virtio-block numbers are higher than the 1.7.5 numbers. - -Signed-off-by: Gerd Hoffmann -Signed-off-by: Miroslav Rezanina -(cherry picked from commit 0561b82b0470679505d62f49eec83adb01eec0ab) ---- - scripts/layoutrom.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/scripts/layoutrom.py b/scripts/layoutrom.py -index 6616721..71841aa 100755 ---- a/scripts/layoutrom.py -+++ b/scripts/layoutrom.py -@@ -66,7 +66,7 @@ BUILD_BIOS_SIZE = 0x10000 - BUILD_ROM_START = 0xc0000 - BUILD_LOWRAM_END = 0xa0000 - # Space to reserve in f-segment for dynamic allocations --BUILD_MIN_BIOSTABLE = 2048 -+BUILD_MIN_BIOSTABLE = 8192 - - # Layout the 16bit code. This ensures sections with fixed offset - # requirements are placed in the correct location. It also places the --- -1.8.3.1 - diff --git a/SOURCES/0006-pci-reserve-resources-for-pcie-pci-bridge-to-fix-reg.patch b/SOURCES/0006-pci-reserve-resources-for-pcie-pci-bridge-to-fix-reg.patch new file mode 100644 index 0000000..6e5900c --- /dev/null +++ b/SOURCES/0006-pci-reserve-resources-for-pcie-pci-bridge-to-fix-reg.patch @@ -0,0 +1,83 @@ +From 4a31485efad9db7feed56f483e123f0b58c38b2f Mon Sep 17 00:00:00 2001 +From: Igor Mammedov +Date: Mon, 29 Nov 2021 06:48:11 -0500 +Subject: pci: reserve resources for pcie-pci-bridge to fix regressed hotplug + on q35 + +RH-Bugzilla: 2001921 + +If QEMU is started with unpopulated pcie-pci-bridge with ACPI PCI +hotplug enabled (default since QEMU-6.1), hotplugging a PCI device +into one of the bridge slots fails due to lack of resources. + +once linux guest is booted (test used Fedora 34), hotplug NIC from +QEMU monitor: + (qemu) device_add rtl8139,bus=pcie-pci-bridge-0,addr=0x2 + +guest fails hotplug with: + pci 0000:01:02.0: [10ec:8139] type 00 class 0x020000 + pci 0000:01:02.0: reg 0x10: [io 0x0000-0x00ff] + pci 0000:01:02.0: reg 0x14: [mem 0x00000000-0x000000ff] + pci 0000:01:02.0: reg 0x30: [mem 0x00000000-0x0003ffff pref] + pci 0000:01:02.0: BAR 6: no space for [mem size 0x00040000 pref] + pci 0000:01:02.0: BAR 6: failed to assign [mem size 0x00040000 pref] + pci 0000:01:02.0: BAR 0: no space for [io size 0x0100] + pci 0000:01:02.0: BAR 0: failed to assign [io size 0x0100] + pci 0000:01:02.0: BAR 1: no space for [mem size 0x00000100] + pci 0000:01:02.0: BAR 1: failed to assign [mem size 0x00000100] + 8139cp: 8139cp: 10/100 PCI Ethernet driver v1.3 (Mar 22, 2004) + PCI Interrupt Link [GSIG] enabled at IRQ 22 + 8139cp 0000:01:02.0: no MMIO resource + 8139cp: probe of 0000:01:02.0 failed with error -5 + +Reason for this is that commit [1] didn't take into account +pcie-pci-bridge, marking bridge as non hotpluggable instead of +handling it as possibly SHPC capable bridge. +Fix issue by checking if pcie-pci-bridge is SHPC capable and +if it is mark it as hotpluggable. + +Fixes regression in QEMU-6.1 and later, since it was switched +to ACPI based PCI hotplug on Q35 by default at that time. + +[1] +Fixes: 3aa31d7d637 ("hw/pci: reserve IO and mem for pci express downstream ports with no devices attached") +Signed-off-by: Igor Mammedov imammedo@redhat.com +CC: mapfelba@redhat.com +CC: kraxel@redhat.com +CC: mst@redhat.com +CC: lvivier@redhat.com +CC: jusual@redhat.com +Tested-by: Laurent Vivier +Acked-by: Michael S. Tsirkin +Message-Id: <20211129114812.231849-2-imammedo@redhat.com> +Signed-off-by: Gerd Hoffmann +--- + src/fw/pciinit.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c +index 3c99d51..badf13d 100644 +--- a/src/fw/pciinit.c ++++ b/src/fw/pciinit.c +@@ -808,6 +808,10 @@ static hotplug_type_t pci_bus_hotplug_support(struct pci_bus *bus, u8 pcie_cap) + pcie_cap + PCI_EXP_FLAGS); + u8 port_type = ((pcie_flags & PCI_EXP_FLAGS_TYPE) >> + (__builtin_ffs(PCI_EXP_FLAGS_TYPE) - 1)); ++ ++ if (port_type == PCI_EXP_TYPE_PCI_BRIDGE) ++ goto check_shpc; ++ + u8 downstream_port = (port_type == PCI_EXP_TYPE_DOWNSTREAM) || + (port_type == PCI_EXP_TYPE_ROOT_PORT); + /* +@@ -825,6 +829,7 @@ static hotplug_type_t pci_bus_hotplug_support(struct pci_bus *bus, u8 pcie_cap) + HOTPLUG_PCIE : HOTPLUG_NO_SUPPORTED; + } + ++check_shpc: + shpc_cap = pci_find_capability(bus->bus_dev->bdf, PCI_CAP_ID_SHPC, 0); + return !!shpc_cap ? HOTPLUG_SHPC : HOTPLUG_NO_SUPPORTED; + } +-- +2.27.0 + diff --git a/SPECS/seabios.spec b/SPECS/seabios.spec index 0a5c702..3d152a1 100644 --- a/SPECS/seabios.spec +++ b/SPECS/seabios.spec @@ -1,5 +1,5 @@ Name: seabios -Version: 1.14.0 +Version: 1.15.0 Release: 1%{?dist} Summary: Open-source legacy BIOS implementation @@ -7,7 +7,7 @@ Group: Applications/Emulators License: LGPLv3 URL: https://www.coreboot.org/SeaBIOS -Source0: https://code.coreboot.org/p/seabios/downloads/get/seabios-1.14.0.tar.gz +Source0: https://code.coreboot.org/p/seabios/downloads/get/seabios-1.15.0.tar.gz Source10: config.vga.cirrus Source11: config.vga.qxl @@ -22,7 +22,8 @@ Source21: config.seabios-256k Patch0002: 0002-allow-1TB-of-RAM.patch Patch0003: 0003-smbios-set-bios-vendor-version-fields-to-Seabios-0.5.patch Patch0004: 0004-Workaround-for-a-win8.1-32-S4-resume-bug.patch -Patch0005: 0005-redhat-reserve-more-memory-on-fseg.patch +Patch0005: 0005-pci-let-firmware-reserve-IO-for-pcie-pci-bridge.patch +Patch0006: 0006-pci-reserve-resources-for-pcie-pci-bridge-to-fix-reg.patch BuildRequires: python3 iasl ExclusiveArch: x86_64 %{power64} @@ -78,6 +79,7 @@ SeaVGABIOS is an open-source VGABIOS implementation. %patch0003 -p1 %patch0004 -p1 %patch0005 -p1 +%patch0006 -p1 %build %ifarch x86_64 @@ -136,22 +138,46 @@ install -m 0644 binaries/vgabios*.bin $RPM_BUILD_ROOT%{_datadir}/seavgabios %changelog -* Thu Sep 2 2021 Danilo C. L. de Paula - 1.14.0-1.fc34 -- Resolves: bz#2000225 - (Rebase virt:rhel module:stream based on AV-8.6) +* Thu Dec 16 2021 Jon Maloy - 1.15.0-1.el8 +- Rebase to 1.15 (bz#2018392) +- Resolves: bz#2018392 -* Mon Jul 13 2020 Danilo C. L. de Paula - 1.13.0 -- Resolves: bz#1844296 -(Upgrade components in virt:rhel module:stream for RHEL-8.3 release) +* Thu Dec 16 2021 Jon Maloy - 1.15.0-1.el8 +- pci-reserve-resources-for-pcie-pci-bridge-to-fix-reg.patch [bz#2001921] +- pci: let firmware reserve IO for pcie-pci-bridge.patch [bz#2001921] +- Resolves: bz#2001921 -* Mon Apr 27 2020 Danilo C. L. de Paula - 1.13.0 -- Resolves: bz#1810193 - (Upgrade components in virt:rhel module:stream for RHEL-8.3 release) +* Tue Aug 11 2020 Miroslav Rezanina - 1.14.0-1.el8 +- Rebase to 1.14 (bz#1809772) +- Resolves: bz#1809772 + (rebase seabios for RHEL AV-8.3.0) -* Fri Jun 28 2019 Danilo de Paula - 1.11.1-4 -- Rebuild all virt packages to fix RHEL's upgrade path -- Resolves: rhbz#1695587 - (Ensure modular RPM upgrade path) +* Tue Jan 21 2020 Miroslav Rezanina - 1.13.0-1.el8 +- Rebase to 1.13 (bz#1793377) +- Resolves: bz#1793377 + (rebase seabios to 1.13) + +* Tue Aug 20 2019 Danilo Cesar Lemes de Paula - 1.12.0-5.el8 +- seabios-add-get_keystroke_full-helper.patch [bz#1693031] +- seabios-bootmenu-add-support-for-more-than-9-entries.patch [bz#1693031] +- Resolves: bz#1693031 + (On systems with more than 10 available boot devices, keys are uninintuitive) + +* Fri Aug 02 2019 Danilo Cesar Lemes de Paula - 1.12.0-4.el8 +- seabios-tpm-Check-for-TPM-related-ACPI-tables-before-attempt.patch [bz#1705212] +- seabios-usb-ehci-Clear-pipe-token-on-pipe-reallocate.patch [bz#1705212] +- Resolves: bz#1705212 + (Backport 1.12.1 patches to RHEL-AV 8.1.0) + +* Tue Jul 09 2019 Miroslav Rezanina - 1.12.0-3.el8 +- seabios-rh-add-configs-for-ramfb-and-bochs-display.patch [bz#1724098] +- Resolves: bz#1724098 + (enable device: bochs-display (seabios)) + +* Mon Jan 21 2019 Miroslav Rezanina - 1.12.0-1.el8 +- Rebase to 1.12.0 [bz#1666134] +- Resolves: bz#1666134 + (Rebase seabios for RHEL-AV release in virt:8.0.0 stream) * Fri Dec 07 2018 Danilo C. L. de Paula - 1.11.1-3.el8 - Resolves: bz#1613465