Branch synchronization with RHEL 8.8.0

This commit is contained in:
Miroslav Rezanina 2023-04-04 08:11:06 -04:00
parent 36b71794b7
commit 41b2ffd2c7
12 changed files with 5 additions and 257 deletions

6
.gitignore vendored
View File

@ -1,2 +1,6 @@
SOURCES/seabios-1.16.0.tar.gz
/seabios-1.12.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
SOURCES/seabios-1.16.0.tar.gz

View File

@ -1,67 +0,0 @@
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
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
RH-Author: Radim Krcmar <rkrcmar@redhat.com>
Message-id: <1394464467-23560-1-git-send-email-rkrcmar@redhat.com>
Patchwork-id: 58069
O-Subject: [RHEL7.0 seabios PATCH] Workaround for a win8.1-32 S4 resume bug
Bugzilla: 1050775
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
bug: https://bugzilla.redhat.com/show_bug.cgi?id=1050775
brew: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=7176174
This patch has no upstream equivalent.
When a 32 bit version of windows 8.1 resumes from suspend, it writes 1
into 0x72 in the early boot because it didn't expect a NULL pointer.
0x72 is lower offset byte of 0x1c interrupt entry, so we jump into a
middle of other function if this interrupt is triggered.
Because 0x1c is only triggered from our handle_08, we detect if our
default value (function that does only iret) has its lower offset byte
overwritten and skip it in that case.
(Windows never sets own callback there, so we always detect this bug
correctly, as seabios doesn't use it either
Other sources shouldn't incorrectly overwrite it or use seabios code,
but it is quite ok even if the guest did this on purpose.)
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(-)
diff --git a/src/clock.c b/src/clock.c
index e44e1120..298a7229 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -309,7 +309,13 @@ handle_08(void)
struct bregs br;
memset(&br, 0, sizeof(br));
br.flags = F_IF;
- call16_int(0x1c, &br);
+ struct segoff_s isr1c = GET_IVT(0x1c);
+ // hardcoded address of entry_iret_official with lower segment byte
+ // overwritten by 1
+ if (isr1c.seg == ((SEG_BIOS & ~0xff) | 0x1) && isr1c.offset == 0xff53)
+ dprintf(1, "Worked around win8.1-32 S4 resume bug\n");
+ else
+ call16_int(0x1c, &br);
pic_eoi1();
}
--
2.31.1

View File

@ -1,18 +0,0 @@
===================
seabios development
===================
seabios is maintained in a `source tree`_ rather than directly in dist-git
using packit service that provides way to develope using regular source code
structure and provides way to generate SRPM and build using koji service.
Developers deliver all changes to source-git using merge request. Only maintainers
will be pushing changes sent to source-git to dist-git.
Each release in dist-git is tagged in the source repository so you can easily
check out the source tree for a build. The tags are in the format
name-version-release, but note release doesn't contain the dist tag since the
source can be built in different build roots (Fedora, CentOS, etc.)
.. _source tree: https://gitlab.com/redhat/centos-stream/src/seabios

View File

@ -1,3 +0,0 @@
CONFIG_BUILD_VGABIOS=y
CONFIG_DISPLAY_BOCHS=y
CONFIG_VGA_PCI=y

View File

@ -1,3 +0,0 @@
CONFIG_BUILD_VGABIOS=y
CONFIG_VGA_CIRRUS=y
CONFIG_VGA_PCI=y

View File

@ -1,6 +0,0 @@
CONFIG_BUILD_VGABIOS=y
CONFIG_VGA_BOCHS=y
CONFIG_VGA_PCI=y
CONFIG_OVERRIDE_PCI_ID=y
CONFIG_VGA_VID=0x1b36
CONFIG_VGA_DID=0x0100

View File

@ -1,3 +0,0 @@
CONFIG_BUILD_VGABIOS=y
CONFIG_VGA_RAMFB=y
CONFIG_VGA_PCI=n

View File

@ -1,3 +0,0 @@
CONFIG_BUILD_VGABIOS=y
CONFIG_VGA_BOCHS=y
CONFIG_VGA_PCI=y

View File

@ -1,6 +0,0 @@
CONFIG_BUILD_VGABIOS=y
CONFIG_VGA_BOCHS=y
CONFIG_VGA_PCI=y
CONFIG_OVERRIDE_PCI_ID=y
CONFIG_VGA_VID=0x1af4
CONFIG_VGA_DID=0x1050

View File

@ -1,8 +0,0 @@
# recipients: kvmqe-ci, yfu, xuwei
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
subject_type: brew-build
rules:
- !PassingTestCaseRule {test_case_name: kvm-ci.seabios.x86_64.brew-build.gating.tier1.functional}

View File

@ -1,70 +0,0 @@
From f8c75c66a29fae7ff1e3bf23f382cd8f04e695a1 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Mon, 25 Apr 2022 09:25:31 +0200
Subject: [PATCH 2/2] malloc: use large ZoneHigh when there is enough memory
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
RH-MergeRequest: 3: malloc: use large ZoneHigh when there is enough memory
RH-Commit: [2/2] 93b15659b39b9772c7620ddfbf558e11008bb8f9 (kraxel/centos-seabios)
RH-Bugzilla: 2004662
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
RH-Acked-by: Oliver Steffen <osteffen@redhat.com>
In case there is enough memory installed use a large ZoneHigh.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit dc88f9b72df52b22c35b127b80c487e0b6fca4af)
---
src/config.h | 3 ++-
src/malloc.c | 14 +++++++++-----
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/config.h b/src/config.h
index 93c8dbc2..9abe355b 100644
--- a/src/config.h
+++ b/src/config.h
@@ -17,7 +17,8 @@
// Maximum number of map entries in the e820 map
#define BUILD_MAX_E820 32
// Space to reserve in high-memory for tables
-#define BUILD_MAX_HIGHTABLE (256*1024)
+#define BUILD_MIN_HIGHTABLE (256*1024)
+#define BUILD_MAX_HIGHTABLE (16*1024*1024)
// Largest supported externaly facing drive id
#define BUILD_MAX_EXTDRIVE 16
// Number of bytes the smbios may be and still live in the f-segment
diff --git a/src/malloc.c b/src/malloc.c
index ecd8c9ac..da840980 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -423,7 +423,7 @@ malloc_preinit(void)
// Populate temp high ram
u32 highram_start = 0;
- u32 highram_size = BUILD_MAX_HIGHTABLE;
+ u32 highram_size = 0;
int i;
for (i=e820_count-1; i>=0; i--) {
struct e820entry *en = &e820_list[i];
@@ -434,10 +434,14 @@ malloc_preinit(void)
continue;
u32 s = en->start, e = end;
if (!highram_start) {
- u32 newe = ALIGN_DOWN(e - highram_size, MALLOC_MIN_ALIGN);
- if (newe <= e && newe >= s) {
- highram_start = newe;
- e = newe;
+ u32 new_max = ALIGN_DOWN(e - BUILD_MAX_HIGHTABLE, MALLOC_MIN_ALIGN);
+ u32 new_min = ALIGN_DOWN(e - BUILD_MIN_HIGHTABLE, MALLOC_MIN_ALIGN);
+ if (new_max <= e && new_max >= s + BUILD_MAX_HIGHTABLE) {
+ highram_start = e = new_max;
+ highram_size = BUILD_MAX_HIGHTABLE;
+ } else if (new_min <= e && new_min >= s) {
+ highram_start = e = new_min;
+ highram_size = BUILD_MIN_HIGHTABLE;
}
}
alloc_add(&ZoneTmpHigh, s, e);
--
2.31.1

View File

@ -1,69 +0,0 @@
From 1c38dda9009b11aa935b9cd32043338c250f4de2 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Mon, 25 Apr 2022 09:20:02 +0200
Subject: [PATCH 1/2] malloc: use variable for ZoneHigh size
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
RH-MergeRequest: 3: malloc: use large ZoneHigh when there is enough memory
RH-Commit: [1/2] 4265a009c535ebb7a592cc610266ba02546ec77d (kraxel/centos-seabios)
RH-Bugzilla: 2004662
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
RH-Acked-by: Oliver Steffen <osteffen@redhat.com>
Use the variable highram_size instead of the BUILD_MAX_HIGHTABLE #define
for the ZoneHigh size. Initialize the new variable with the old #define,
so behavior does not change.
This allows to easily adjust the ZoneHigh size at runtime in a followup
patch.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 3b91e8e9fe93d5ff7edf17f984c401f9e6ba55fe)
---
src/malloc.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/malloc.c b/src/malloc.c
index 3733855c..ecd8c9ac 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -422,7 +422,8 @@ malloc_preinit(void)
e820_add(BUILD_BIOS_ADDR, BUILD_BIOS_SIZE, E820_RESERVED);
// Populate temp high ram
- u32 highram = 0;
+ u32 highram_start = 0;
+ u32 highram_size = BUILD_MAX_HIGHTABLE;
int i;
for (i=e820_count-1; i>=0; i--) {
struct e820entry *en = &e820_list[i];
@@ -432,10 +433,10 @@ malloc_preinit(void)
if (en->type != E820_RAM || end > 0xffffffff)
continue;
u32 s = en->start, e = end;
- if (!highram) {
- u32 newe = ALIGN_DOWN(e - BUILD_MAX_HIGHTABLE, MALLOC_MIN_ALIGN);
+ if (!highram_start) {
+ u32 newe = ALIGN_DOWN(e - highram_size, MALLOC_MIN_ALIGN);
if (newe <= e && newe >= s) {
- highram = newe;
+ highram_start = newe;
e = newe;
}
}
@@ -444,9 +445,9 @@ malloc_preinit(void)
// Populate regions
alloc_add(&ZoneTmpLow, BUILD_STACK_ADDR, BUILD_EBDA_MINIMUM);
- if (highram) {
- alloc_add(&ZoneHigh, highram, highram + BUILD_MAX_HIGHTABLE);
- e820_add(highram, BUILD_MAX_HIGHTABLE, E820_RESERVED);
+ if (highram_start) {
+ alloc_add(&ZoneHigh, highram_start, highram_start + highram_size);
+ e820_add(highram_start, highram_size, E820_RESERVED);
}
}
--
2.31.1