[SeaBIOS] [PATCH] vga: Don't advertise multiple pages for lfb modes.
kraxel at redhat.com
Tue Sep 10 07:48:08 CEST 2013
On Mo, 2013-09-09 at 12:48 -0400, Kevin O'Connor wrote:
> On Mon, Sep 09, 2013 at 09:24:40AM +0200, Gerd Hoffmann wrote:
> > Seems win8 doesn't like it. With this patch win8 guests allow
> > to set the screen resolution to something != 1024x768.
> > Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
> > ---
> > vgasrc/vbe.c | 1 +
> > 1 file changed, 1 insertion(+)
> > diff --git a/vgasrc/vbe.c b/vgasrc/vbe.c
> > index d962333..b0ee002 100644
> > --- a/vgasrc/vbe.c
> > +++ b/vgasrc/vbe.c
> > @@ -142,6 +142,7 @@ vbe_104f01(struct bregs *regs)
> > framebuffer = GET_GLOBAL(VBE_framebuffer);
> > if (framebuffer)
> > mode_attr |= VBE_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER_MODE;
> > + pages = 1;
> > break;
> > }
> > SET_FARVAR(seg, info->mode_attributes, mode_attr);
> That's odd. According to the vbe spec:
> The NumberOfImagePages field specifies the "total number minus one
> (-1)" of complete display images that will fit into the frame buffer
Odd indeed. But maybe nobody bothers too much. Linux (vesafb) for
example prints it at boot, but otherwise doesn't use it. Instead it
looks at the total_memory value reported by 0x4f00.
> The existing code matches the original bochs vbe code and matches what
> the spec says. I'm surprised win8 would require such an odd value.
I'm surprised too, but that bit really makes the difference.
When reporting the number of pages fitting into memory win8 is fixed at
1024x748, when reporting a single page only win8 offers the whole range
of vesa resolutions supported by the vesa bios ...
I have no idea why that is the case though, maybe the root cause it
something different and this patch just papers over it.
More information about the SeaBIOS