VBE function 05h (Display Window Control) is not allowed while a linear
framebuffer mode is set. However, the return status code for this case
was not fully filled out: only the AH register was filled out, but AL
was left unchanged from its original function 05h value, resulting in a
status code of 0x0305, whereas the correct status would be 0x034F
(indicating that the function is supported but is invalid in the current
mode).
This may be a result of a too-literal reading of the VBE specification;
when describing the behavior of this function when called in a linear
mode, it says "the function must fail with completion code AH=03h", not
mentioning the value of AL. However, the general "VBE Return Status"
section still applies, which indicates that AL should be set to 4Fh on
return if the function is supported.
Additionally, the patch changes the status code assignment to use a hex
literal instead of a constant, since this is consistent with all of the
other status code assignments in the VBE code.
Signed-off-by: Daniel Verkamp <daniel@drv.nu>
---
vgasrc/vbe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vgasrc/vbe.c b/vgasrc/vbe.c
index 2ae0a980..67162d97 100644
--- a/vgasrc/vbe.c
+++ b/vgasrc/vbe.c
@@ -257,7 +257,7 @@ vbe_104f05(struct bregs *regs)
if (regs->bh > 1 || regs->bl > 1)
goto fail;
if (GET_BDA_EXT(vbe_mode) & MF_LINEARFB) {
- regs->ah = VBE_RETURN_STATUS_INVALID;
+ regs->ax = 0x034f;
return;
}
struct vgamode_s *curmode_g = get_current_mode();
--
2.54.0
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org