diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2012-01-09 20:55:31 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2012-01-14 17:19:39 -0500 |
commit | 34203cdf8a89c747e221005850a4558252235360 (patch) | |
tree | 242c7c5d45d96fc25612612048c763ffbbfcd856 /vgasrc/vbe.c | |
parent | c4a0b976c06837636533d561c59d22feb03baec3 (diff) | |
download | seabios-34203cdf8a89c747e221005850a4558252235360.zip seabios-34203cdf8a89c747e221005850a4558252235360.tar.gz seabios-34203cdf8a89c747e221005850a4558252235360.tar.bz2 |
vgabios: Unify code to generate the vbe mode list.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc/vbe.c')
-rw-r--r-- | vgasrc/vbe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vgasrc/vbe.c b/vgasrc/vbe.c index 8256cae..daf8c51 100644 --- a/vgasrc/vbe.c +++ b/vgasrc/vbe.c @@ -39,7 +39,8 @@ vbe_104f00(struct bregs *regs) SET_FARVAR(seg, info->capabilities, 0x1); /* 8BIT DAC */ /* We generate our mode list in the reserved field of the info block */ - SET_FARVAR(seg, info->video_mode, SEGOFF(seg, regs->di + 34)); + u16 *destmode = (void*)info->reserved; + SET_FARVAR(seg, info->video_mode, SEGOFF(seg, (u32)destmode)); /* Total memory (in 64 blocks) */ SET_FARVAR(seg, info->total_memory, bochsvga_total_mem()); @@ -52,7 +53,8 @@ vbe_104f00(struct bregs *regs) SEGOFF(get_global_seg(), (u32)VBE_REVISION_STRING)); /* Fill list of modes */ - bochsvga_list_modes(seg, regs->di + 32); + u16 *last = (void*)&info->reserved[sizeof(info->reserved)]; + vgahw_list_modes(seg, destmode, last - 1); regs->al = regs->ah; /* 0x4F, Function supported */ regs->ah = 0x0; /* 0x0, Function call successful */ |