summaryrefslogtreecommitdiff
path: root/vgasrc/stdvgamodes.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-08-05 10:58:24 -0400
committerKevin O'Connor <kevin@koconnor.net>2016-08-05 11:27:25 -0400
commit536129ac3a434409cf9881706c55d7efd67b231e (patch)
tree23d98add800405f4730d2f234936a3fe16e3ab5c /vgasrc/stdvgamodes.c
parent0397e8052824078edb2690622564c82bcc1a742f (diff)
downloadqemu-seabios-536129ac3a434409cf9881706c55d7efd67b231e.tar.gz
vgainit: Move video param setup to stdvga_build_video_param()
Move the full video_param_table[] setup (including the updating of the BDA) to stdvga_build_video_param(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc/stdvgamodes.c')
-rw-r--r--vgasrc/stdvgamodes.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/vgasrc/stdvgamodes.c b/vgasrc/stdvgamodes.c
index c553514..f61d52f 100644
--- a/vgasrc/stdvgamodes.c
+++ b/vgasrc/stdvgamodes.c
@@ -7,6 +7,7 @@
#include "biosvar.h" // GET_GLOBAL
#include "output.h" // warn_internalerror
+#include "std/vga.h" // struct video_param_s
#include "stdvga.h" // stdvga_find_mode
#include "string.h" // memcpy_far
#include "vgabios.h" // video_param_table
@@ -348,9 +349,18 @@ stdvga_list_modes(u16 seg, u16 *dest, u16 *last)
SET_FARVAR(seg, *dest, 0xffff);
}
+static struct video_save_pointer_s video_save_pointer_table VAR16;
+
+static struct video_param_s video_param_table[29] VAR16;
+
void
stdvga_build_video_param(void)
{
+ SET_BDA(video_savetable
+ , SEGOFF(get_global_seg(), (u32)&video_save_pointer_table));
+ SET_VGA(video_save_pointer_table.videoparam
+ , SEGOFF(get_global_seg(), (u32)video_param_table));
+
static u8 parammodes[] VAR16 = {
0, 0, 0, 0, 0x04, 0x05, 0x06, 0x07,
0, 0, 0, 0, 0, 0x0d, 0x0e, 0,