/* ----------------------------------------------------------------------- *1*2* Copyright 1999-2007 H. Peter Anvin - All Rights Reserved3*4* This program is free software; you can redistribute it and/or modify5* it under the terms of the GNU General Public License as published by6* the Free Software Foundation, Inc., 53 Temple Place Ste 330,7* Boston MA 02111-1307, USA; either version 2 of the License, or8* (at your option) any later version; incorporated herein by reference.9*10* ----------------------------------------------------------------------- */1112#ifndef BOOT_VESA_H13#define BOOT_VESA_H1415typedef struct {16u16 off, seg;17} far_ptr;1819/* VESA General Information table */20struct vesa_general_info {21u32 signature; /* 0 Magic number = "VESA" */22u16 version; /* 4 */23far_ptr vendor_string; /* 6 */24u32 capabilities; /* 10 */25far_ptr video_mode_ptr; /* 14 */26u16 total_memory; /* 18 */2728u8 reserved[236]; /* 20 */29} __attribute__ ((packed));3031#define VESA_MAGIC ('V' + ('E' << 8) + ('S' << 16) + ('A' << 24))3233struct vesa_mode_info {34u16 mode_attr; /* 0 */35u8 win_attr[2]; /* 2 */36u16 win_grain; /* 4 */37u16 win_size; /* 6 */38u16 win_seg[2]; /* 8 */39far_ptr win_scheme; /* 12 */40u16 logical_scan; /* 16 */4142u16 h_res; /* 18 */43u16 v_res; /* 20 */44u8 char_width; /* 22 */45u8 char_height; /* 23 */46u8 memory_planes; /* 24 */47u8 bpp; /* 25 */48u8 banks; /* 26 */49u8 memory_layout; /* 27 */50u8 bank_size; /* 28 */51u8 image_planes; /* 29 */52u8 page_function; /* 30 */5354u8 rmask; /* 31 */55u8 rpos; /* 32 */56u8 gmask; /* 33 */57u8 gpos; /* 34 */58u8 bmask; /* 35 */59u8 bpos; /* 36 */60u8 resv_mask; /* 37 */61u8 resv_pos; /* 38 */62u8 dcm_info; /* 39 */6364u32 lfb_ptr; /* 40 Linear frame buffer address */65u32 offscreen_ptr; /* 44 Offscreen memory address */66u16 offscreen_size; /* 48 */6768u8 reserved[206]; /* 50 */69} __attribute__ ((packed));7071#endif /* LIB_SYS_VESA_H */727374