Check the EBDA is mapped before accessing it.
[v86d.git] / testvbe.h
blob3828927add4b56afa8da334c0d4be555cd90371e
1 #ifndef __H_TESTVBE
2 #define __H_TESTVBE
4 #define VBE_MODE_VGACOMPAT 0x20
5 #define VBE_MODE_COLOR 0x08
6 #define VBE_MODE_SUPPORTEDHW 0x01
7 #define VBE_MODE_GRAPHICS 0x10
8 #define VBE_MODE_LFB 0x80
10 #define VBE_MODE_MASK (VBE_MODE_COLOR | VBE_MODE_SUPPORTEDHW | \
11 VBE_MODE_GRAPHICS | VBE_MODE_LFB)
13 /* VBE Mode Info Block */
14 struct vbe_mode_ib {
15 /* for all VBE revisions */
16 u16 mode_attr;
17 u8 winA_attr;
18 u8 winB_attr;
19 u16 win_granularity;
20 u16 win_size;
21 u16 winA_seg;
22 u16 winB_seg;
23 u32 win_func_ptr;
24 u16 bytes_per_scan_line;
26 /* for VBE 1.2+ */
27 u16 x_res;
28 u16 y_res;
29 u8 x_char_size;
30 u8 y_char_size;
31 u8 planes;
32 u8 bits_per_pixel;
33 u8 banks;
34 u8 memory_model;
35 u8 bank_size;
36 u8 image_pages;
37 u8 reserved1;
39 /* Direct color fields for direct/6 and YUV/7 memory models. */
40 /* Offsets are bit positions of lsb in the mask. */
41 u8 red_len;
42 u8 red_off;
43 u8 green_len;
44 u8 green_off;
45 u8 blue_len;
46 u8 blue_off;
47 u8 rsvd_len;
48 u8 rsvd_off;
49 u8 direct_color_info; /* direct color mode attributes */
51 /* for VBE 2.0+ */
52 u32 phys_base_ptr;
53 u8 reserved2[6];
55 /* for VBE 3.0+ */
56 u16 lin_bytes_per_scan_line;
57 u8 bnk_image_pages;
58 u8 lin_image_pages;
59 u8 lin_red_len;
60 u8 lin_red_off;
61 u8 lin_green_len;
62 u8 lin_green_off;
63 u8 lin_blue_len;
64 u8 lin_blue_off;
65 u8 lin_rsvd_len;
66 u8 lin_rsvd_off;
67 u32 max_pixel_clock;
68 u16 mode_id;
69 u8 depth;
70 } __attribute__ ((packed));
72 #endif /* __H_TESTVBE */