* Thu Apr 21 2022 Paweł Poławski <ppolawsk@redhat.com> - 1.16.0-1

- Rebase to upstream 1.16.0 release [bz#2066826]
- Resolves: bz#2066826
  (rebase seabios to 1.16 release)
This commit is contained in:
Miroslav Rezanina 2022-04-21 08:00:54 -04:00
parent e8c19e4ea7
commit 98ec775211
6 changed files with 17 additions and 182 deletions

1
.gitignore vendored
View File

@ -29,3 +29,4 @@ seabios-0.6.0.tar.gz
/seabios-1.13.0.tar.gz
/seabios-1.14.0.tar.gz
/seabios-1.15.0.tar.gz
/seabios-1.16.0.tar.gz

View File

@ -1,4 +1,4 @@
From 10883a49e78ba83e3667e4386b8f11b4aa18ddb2 Mon Sep 17 00:00:00 2001
From 11b98cdd8d3f07f3b57fa7b4f531b52a4c1018f7 Mon Sep 17 00:00:00 2001
From: Radim Krcmar <rkrcmar@redhat.com>
Date: Mon, 10 Mar 2014 15:14:27 +0100
Subject: Workaround for a win8.1-32 S4 resume bug
@ -36,6 +36,9 @@ The reason Windows uses NULL pointer is still unknown, but this bug is
blocking WHQL certification, so we have to work around it in 7.0.
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
(cherry picked from commit 10883a49e78ba83e3667e4386b8f11b4aa18ddb2)
Signed-off-by: Paweł Poławski <ppolawsk@redhat.com>
---
src/clock.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
@ -60,5 +63,5 @@ index e44e1120..298a7229 100644
pic_eoi1();
}
--
2.27.0
2.31.1

View File

@ -1,90 +0,0 @@
From 87689162d5203522a8e089bb0e46302a07c77301 Mon Sep 17 00:00:00 2001
From: Igor Mammedov <imammedo@redhat.com>
Date: Mon, 29 Nov 2021 06:48:12 -0500
Subject: pci: let firmware reserve IO for pcie-pci-bridge
RH-Bugzilla: 2001732
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 <lvivier@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20211129114812.231849-3-imammedo@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
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 d25931bb..3c99d514 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

View File

@ -1,83 +0,0 @@
From ded76fad62293d5dbe4eebf30d3b19c9eb8330de Mon Sep 17 00:00:00 2001
From: Igor Mammedov <imammedo@redhat.com>
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: 2001732
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 <lvivier@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20211129114812.231849-2-imammedo@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
src/fw/pciinit.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c
index 3c99d514..badf13d3 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

View File

@ -1,16 +1,16 @@
Name: seabios
Version: 1.15.0
Version: 1.16.0
Release: 1%{?dist}
Summary: Open-source legacy BIOS implementation
License: LGPLv3
URL: https://www.coreboot.org/SeaBIOS
Source0: https://code.coreboot.org/p/seabios/downloads/get/seabios-1.15.0.tar.gz
Source0: https://code.coreboot.org/p/seabios/downloads/get/seabios-1.16.0.tar.gz
Patch0002: 0002-Workaround-for-a-win8.1-32-S4-resume-bug.patch
Patch0003: 0003-pci-let-firmware-reserve-IO-for-pcie-pci-bridge.patch
Patch0004: 0004-pci-reserve-resources-for-pcie-pci-bridge-to-fix-reg.patch
# Source-git patches
Source10: config.vga-cirrus
Source12: config.vga-qxl
@ -135,6 +135,11 @@ install -m 0644 binaries/vgabios*.bin $RPM_BUILD_ROOT%{_datadir}/seavgabios
%{_datadir}/seavgabios/vgabios*.bin
%changelog
* Thu Apr 21 2022 Paweł Poławski <ppolawsk@redhat.com> - 1.16.0-1
- Rebase to upstream 1.16.0 release [bz#2066826]
- Resolves: bz#2066826
(rebase seabios to 1.16 release)
* Fri Dec 17 2021 Miroslav Rezanina <mrezanin@redhat.com> - 1.15.0-1
- Rebase to seabios to 1.15.0 [bz#2018393]
- 0003-pci-let-firmware-reserve-IO-for-pcie-pci-bridge.patch [bz#2001732]
@ -144,7 +149,6 @@ install -m 0644 binaries/vgabios*.bin $RPM_BUILD_ROOT%{_datadir}/seavgabios
- Resolves: bz#2001732
([virtual network][qemu-6.1.0-1] Fail to hotplug nic with rtl8139 driver)
* Wed Sep 15 2021 Miroslav Rezanina <mrezanin@redhat.com> - 1.14.0-7
- seabios-Drop-fedora-bits-they-are-not-tested-and-currently-f.patch [bz#2004169]
- seabios-Disable-TPM-support.patch [bz#2004169]

View File

@ -1 +1 @@
SHA512 (seabios-1.15.0.tar.gz) = f894025043aab7d9b0f513216f7abc99904405838632c48b2f0e9c0c09533022cfdef9216082814a941ab0d513d1b02d3b103133ab3aba0fd0f82e96138125fc
SHA512 (seabios-1.16.0.tar.gz) = 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f