[SeaBIOS] [PATCH] vgabios: Fix preserve memory flag in handle_1000

Kevin O'Connor posted 1 patch 3 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/seabios tags/patchew/20200713225425.2202645-1-kevin@koconnor.net
vgasrc/vgabios.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
[SeaBIOS] [PATCH] vgabios: Fix preserve memory flag in handle_1000
Posted by Kevin O'Connor 3 years, 9 months ago
Commit 5108c69c made a change to the ordering of some code which broke
the check for the MF_NOCLEARMEM flag.

Reported by felix.von.s@posteo.de

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
---
 vgasrc/vgabios.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/vgasrc/vgabios.c b/vgasrc/vgabios.c
index 3b9694c..198ee55 100644
--- a/vgasrc/vgabios.c
+++ b/vgasrc/vgabios.c
@@ -336,6 +336,9 @@ static void
 handle_1000(struct bregs *regs)
 {
     int mode = regs->al & 0x7f;
+    int flags = MF_LEGACY | (GET_BDA(modeset_ctl) & (MF_NOPALETTE|MF_GRAYSUM));
+    if (regs->al & 0x80)
+        flags |= MF_NOCLEARMEM;
 
     // Set regs->al
     if (mode > 7)
@@ -345,10 +348,6 @@ handle_1000(struct bregs *regs)
     else
         regs->al = 0x30;
 
-    int flags = MF_LEGACY | (GET_BDA(modeset_ctl) & (MF_NOPALETTE|MF_GRAYSUM));
-    if (regs->al & 0x80)
-        flags |= MF_NOCLEARMEM;
-
     vga_set_mode(mode, flags);
 }
 
-- 
2.26.2
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] vgabios: Fix preserve memory flag in handle_1000
Posted by Kevin O'Connor 3 years, 9 months ago
On Mon, Jul 13, 2020 at 06:54:25PM -0400, Kevin O'Connor wrote:
> Commit 5108c69c made a change to the ordering of some code which broke
> the check for the MF_NOCLEARMEM flag.
> 
> Reported by felix.von.s@posteo.de
> 
> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>

FYI, I committed this change.

-Kevin
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org