aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-07-13 18:50:52 -0400
committerKevin O'Connor <kevin@koconnor.net>2020-07-13 18:50:52 -0400
commit6ada2285d9918859699c92e09540e023e0a16054 (patch)
treefc6391f915e4247dc9642fc5c0b8a7ad1a530f8f
parent88ab0c15525ced2eefe39220742efe4769089ad8 (diff)
downloadseabios-6ada2285d9918859699c92e09540e023e0a16054.tar.gz
vgabios: Fix preserve memory flag in handle_1000
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>
-rw-r--r--vgasrc/vgabios.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/vgasrc/vgabios.c b/vgasrc/vgabios.c
index 3b9694c6..198ee555 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);
}