From: Kevin O'Connor Date: Thu, 23 Oct 2014 20:37:08 +0000 (-0400) Subject: vgabios: Fill in available legacy modes in video_func_static at runtime X-Git-Tag: rel-1.8.0~53 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=12900b1a2431946f59e4973729280296a4a9cffd;p=seabios.git vgabios: Fill in available legacy modes in video_func_static at runtime Instead of hard coding the list of modes, fill them in from the list of supported modes. Signed-off-by: Kevin O'Connor --- diff --git a/vgasrc/stdvgamodes.c b/vgasrc/stdvgamodes.c index 53b7463..c553514 100644 --- a/vgasrc/stdvgamodes.c +++ b/vgasrc/stdvgamodes.c @@ -397,6 +397,15 @@ stdvga_build_video_param(void) , get_global_seg(), GET_GLOBAL(stdmode_g->grdc_regs) , ARRAY_SIZE(vparam_g->grdc_regs)); } + + // Fill available legacy modes in video_func_static table + u32 modes = 0; + for (i = 0; i < ARRAY_SIZE(vga_modes); i++) { + u16 mode = vga_modes[i].mode; + if (mode <= 0x13) + modes |= 1<