* Fri Aug 21 2026 Jon Maloy <jmaloy@redhat.com> - 1.16.3-6
- seabios-add-romfile_loadbool.patch [RHEL-236811] - seabios-update-pci_pad_mem64-handling.patch [RHEL-236811] - Resolves: RHEL-236811 (Backport opt/org.seabios/pci64 to SeaBIOS 1.16 / el9)
This commit is contained in:
parent
b1eaffacd3
commit
160dabd64a
72
seabios-add-romfile_loadbool.patch
Normal file
72
seabios-add-romfile_loadbool.patch
Normal file
@ -0,0 +1,72 @@
|
||||
From 6cd6830764979960144b63e7aecb0981b1445e43 Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Fri, 22 Nov 2024 15:16:32 +0100
|
||||
Subject: [PATCH 1/2] add romfile_loadbool()
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-MergeRequest: 14: update pci_pad_mem64 handling
|
||||
RH-Jira: RHEL-236811
|
||||
RH-Acked-by: Luigi Leonardi <None>
|
||||
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
RH-Commit: [1/2] af1e580e50ce2405a9fe286ee296a343e811a618 (kraxel.rh/centos-src-seabios)
|
||||
|
||||
Translates strings in fw_cfg files into boolean values.
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
(cherry picked from commit a4fc1845b43687fe01c6f53fca9d7c1ac1b725d7)
|
||||
|
||||
Resolves: RHEL-236811
|
||||
---
|
||||
src/romfile.c | 23 +++++++++++++++++++++++
|
||||
src/romfile.h | 1 +
|
||||
2 files changed, 24 insertions(+)
|
||||
|
||||
diff --git a/src/romfile.c b/src/romfile.c
|
||||
index b598274e..8072a915 100644
|
||||
--- a/src/romfile.c
|
||||
+++ b/src/romfile.c
|
||||
@@ -99,6 +99,29 @@ romfile_loadint(const char *name, u64 defval)
|
||||
return val;
|
||||
}
|
||||
|
||||
+u32
|
||||
+romfile_loadbool(const char *name, u32 defval)
|
||||
+{
|
||||
+ static const char *true_strings[] = { "1", "on", "yes" };
|
||||
+ static const char *false_strings[] = { "0", "off", "no" };
|
||||
+ char *str = romfile_loadfile(name, NULL);
|
||||
+ int i;
|
||||
+
|
||||
+ if (!str)
|
||||
+ return defval;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(true_strings); i++)
|
||||
+ if (0 == strcmp(str, true_strings[i]))
|
||||
+ return 1;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(false_strings); i++)
|
||||
+ if (0 == strcmp(str, false_strings[i]))
|
||||
+ return 0;
|
||||
+
|
||||
+ dprintf(1, "%s: unknown bool string: %s\n", __func__, str);
|
||||
+ return defval;
|
||||
+}
|
||||
+
|
||||
struct const_romfile_s {
|
||||
struct romfile_s file;
|
||||
void *data;
|
||||
diff --git a/src/romfile.h b/src/romfile.h
|
||||
index 3e0f8200..ae2f4ac7 100644
|
||||
--- a/src/romfile.h
|
||||
+++ b/src/romfile.h
|
||||
@@ -15,6 +15,7 @@ struct romfile_s *romfile_findprefix(const char *prefix, struct romfile_s *prev)
|
||||
struct romfile_s *romfile_find(const char *name);
|
||||
void *romfile_loadfile(const char *name, int *psize);
|
||||
u64 romfile_loadint(const char *name, u64 defval);
|
||||
+u32 romfile_loadbool(const char *name, u32 defval);
|
||||
|
||||
void const_romfile_add_int(char *name, u32 value);
|
||||
|
||||
--
|
||||
2.52.0
|
||||
|
||||
61
seabios-update-pci_pad_mem64-handling.patch
Normal file
61
seabios-update-pci_pad_mem64-handling.patch
Normal file
@ -0,0 +1,61 @@
|
||||
From 85dd4b3d7b036e58a051ba78f013c7123d1ea7db Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Thu, 21 Nov 2024 16:35:41 +0100
|
||||
Subject: [PATCH 2/2] update pci_pad_mem64 handling
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-MergeRequest: 14: update pci_pad_mem64 handling
|
||||
RH-Jira: RHEL-236811
|
||||
RH-Acked-by: Luigi Leonardi <None>
|
||||
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
RH-Commit: [2/2] 514f7215773fdd853b562eac3b8ece7f88b98e45 (kraxel.rh/centos-src-seabios)
|
||||
|
||||
Add a new possible state: '-1' means 'use default'. In that case
|
||||
seabios continue to use the current heuristic: In case memory
|
||||
above 4G is present enable 64-bit guest friendly configuration.
|
||||
|
||||
This allows forcing the one or the other behavior by setting the
|
||||
pci_pad_mem64 variable beforehand (which is done by another patch).
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
(cherry picked from commit df9dd418b3b0e586cb208125094620fc7f90f23d)
|
||||
|
||||
Resolves: RHEL-236811
|
||||
---
|
||||
src/fw/pciinit.c | 13 ++++++++++---
|
||||
1 file changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c
|
||||
index bb44dc29..658d806d 100644
|
||||
--- a/src/fw/pciinit.c
|
||||
+++ b/src/fw/pciinit.c
|
||||
@@ -55,7 +55,7 @@ u64 pcimem64_end = BUILD_PCIMEM64_END;
|
||||
// Resource allocation limits
|
||||
static u64 pci_io_low_end = 0xa000;
|
||||
static u64 pci_mem64_top = 0;
|
||||
-static u32 pci_pad_mem64 = 0;
|
||||
+static u32 pci_pad_mem64 = -1;
|
||||
|
||||
struct pci_region_entry {
|
||||
struct pci_device *dev;
|
||||
@@ -1197,8 +1197,15 @@ pci_setup(void)
|
||||
}
|
||||
}
|
||||
|
||||
- if (CPUPhysBits >= 36 && CPULongMode && RamSizeOver4G)
|
||||
- pci_pad_mem64 = 1;
|
||||
+ pci_pad_mem64 = romfile_loadbool("opt/org.seabios/pci64", -1);
|
||||
+
|
||||
+ if (pci_pad_mem64 == -1)
|
||||
+ // when not set enable in case memory over 4G is present
|
||||
+ pci_pad_mem64 = RamSizeOver4G ? 1 : 0;
|
||||
+
|
||||
+ if (!CPULongMode)
|
||||
+ // force off for 32-bit CPUs
|
||||
+ pci_pad_mem64 = 0;
|
||||
|
||||
dprintf(1, "=== PCI bus & bridge init ===\n");
|
||||
if (pci_probe_host() != 0) {
|
||||
--
|
||||
2.52.0
|
||||
|
||||
12
seabios.spec
12
seabios.spec
@ -1,6 +1,6 @@
|
||||
Name: seabios
|
||||
Version: 1.16.3
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
Summary: Open-source legacy BIOS implementation
|
||||
|
||||
License: LGPLv3
|
||||
@ -23,6 +23,10 @@ Patch2: seabios-display-error-message-for-blocksizes-512.patch
|
||||
Patch3: seabios-pciinit-don-t-misalign-large-BARs.patch
|
||||
# For RHEL-131918 - [rhel-9] SeaBIOS date is "stuck" at 2014 even for recent releases
|
||||
Patch4: seabios-update-release-date.patch
|
||||
# For RHEL-236811 - Backport opt/org.seabios/pci64 to SeaBIOS 1.16 / el9
|
||||
Patch5: seabios-add-romfile_loadbool.patch
|
||||
# For RHEL-236811 - Backport opt/org.seabios/pci64 to SeaBIOS 1.16 / el9
|
||||
Patch6: seabios-update-pci_pad_mem64-handling.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc
|
||||
@ -139,6 +143,12 @@ install -m 0644 binaries/vgabios*.bin $RPM_BUILD_ROOT%{_datadir}/seavgabios
|
||||
%{_datadir}/seavgabios/vgabios*.bin
|
||||
|
||||
%changelog
|
||||
* Fri Aug 21 2026 Jon Maloy <jmaloy@redhat.com> - 1.16.3-6
|
||||
- seabios-add-romfile_loadbool.patch [RHEL-236811]
|
||||
- seabios-update-pci_pad_mem64-handling.patch [RHEL-236811]
|
||||
- Resolves: RHEL-236811
|
||||
(Backport opt/org.seabios/pci64 to SeaBIOS 1.16 / el9)
|
||||
|
||||
* Tue Dec 02 2025 Jon Maloy <jmaloy@redhat.com> - 1.16.3-5
|
||||
- seabios-update-release-date.patch [RHEL-131918 RHEL-131921]
|
||||
- seabios-turn-off-SMM-support.patch [RHEL-131918 RHEL-131921]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user