Although the VBE3 spec says there is 189 bytes of pad at the end of
the vbe_info struct, the spec also says the total struct size should
be 256 bytes. The VBE2 spec uses sufficient pad to get to 256 bytes.
So, assume the spec was off by one and make the pad 190 bytes.
Also, use u32 for capabilities and 'struct segoff_s' for
win_func_ptr.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
u32 signature;
u16 version;
struct segoff_s oem_string;
u32 signature;
u16 version;
struct segoff_s oem_string;
struct segoff_s video_mode;
u16 total_memory;
u16 oem_revision;
struct segoff_s video_mode;
u16 total_memory;
u16 oem_revision;
u16 win_size;
u16 winA_seg;
u16 winB_seg;
u16 win_size;
u16 winA_seg;
u16 winB_seg;
+ struct segoff_s win_func_ptr;
u16 bytes_per_scanline;
/* VBE 1.2 */
u16 xres;
u16 bytes_per_scanline;
/* VBE 1.2 */
u16 xres;
u8 linear_alpha_size;
u8 linear_alpha_pos;
u32 pixclock_max;
u8 linear_alpha_size;
u8 linear_alpha_pos;
u32 pixclock_max;
} PACKED;
struct vbe_crtc_info {
} PACKED;
struct vbe_crtc_info {
SET_FARVAR(seg, info->oem_string,
SEGOFF(get_global_seg(), (u32)VBE_OEM_STRING));
SET_FARVAR(seg, info->oem_string,
SEGOFF(get_global_seg(), (u32)VBE_OEM_STRING));
- SET_FARVAR(seg, info->capabilities[0], 0x1); /* 8BIT DAC */
+ 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));
/* We generate our mode list in the reserved field of the info block */
SET_FARVAR(seg, info->video_mode, SEGOFF(seg, regs->di + 34));
SET_FARVAR(seg, info->win_size, 64); /* Bank size 64K */
SET_FARVAR(seg, info->winA_seg, 0xA000);
SET_FARVAR(seg, info->winB_seg, 0x0);
SET_FARVAR(seg, info->win_size, 64); /* Bank size 64K */
SET_FARVAR(seg, info->winA_seg, 0xA000);
SET_FARVAR(seg, info->winB_seg, 0x0);
- SET_FARVAR(seg, info->win_func_ptr, 0x0);
+ SET_FARVAR(seg, info->win_func_ptr.segoff, 0x0);
SET_FARVAR(seg, info->bytes_per_scanline, modeinfo.linesize);
SET_FARVAR(seg, info->xres, modeinfo.width);
SET_FARVAR(seg, info->yres, modeinfo.height);
SET_FARVAR(seg, info->bytes_per_scanline, modeinfo.linesize);
SET_FARVAR(seg, info->xres, modeinfo.width);
SET_FARVAR(seg, info->yres, modeinfo.height);