6 #define VBE_ATTR_LFB (1 << 7)
7 #define VBE_MODE_LFB (1 << 14)
14 uint8_t caps[4]; /* capabilities */
15 uint32_t vid_mode_ptr; /* vbefarptr to video mode list */
16 uint16_t total_mem; /* num of 64k mem blocks */
17 uint16_t oem_sw_rev; /* VBE implementation software revision */
18 uint32_t oem_vendor_name_ptr;
19 uint32_t oem_product_name_ptr;
20 uint32_t oem_product_rev_ptr;
21 uint8_t reserved[222];
22 uint8_t oem_data[256];
25 struct vbe_mode_info {
27 uint8_t wina_attr, winb_attr;
28 uint16_t win_gran, win_size;
29 uint16_t wina_seg, winb_seg;
31 uint16_t scanline_bytes;
33 /* VBE 1.2 and above */
35 uint8_t xcharsz, ycharsz;
40 uint8_t bank_size; /* bank size in KB */
41 uint8_t num_img_pages;
44 /* direct color fields */
45 uint8_t rmask_size, rpos;
46 uint8_t gmask_size, gpos;
47 uint8_t bmask_size, bpos;
48 uint8_t xmask_size, xpos;
49 uint8_t cmode_info; /* direct color mode attributes */
51 /* VBE 2.0 and above */
52 uint32_t fb_addr; /* physical address of the linear framebuffer */
56 uint8_t reserved4[206];
60 struct vbe_info *vbe_get_info(void);
61 struct vbe_mode_info *vbe_get_mode_info(int mode);
63 int vbe_set_mode(int mode);
65 int vbe_set_palette_bits(int bits);
66 void vbe_set_palette(int idx, int *col, int count, int bits);
68 void print_mode_info(FILE *fp, struct vbe_mode_info *modei);