diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-07-11 15:18:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-12 13:55:55 -0400 |
commit | 5e8ddcbe8692ca9854991c6875d302fa7e424e3c (patch) | |
tree | 31264c71e36c34ce24db9f26ac2f6384dbd75790 /arch/i386/boot/vesa.h | |
parent | 337496eb73ec970fe008095fdb2b2af60a2a7fa3 (diff) |
Video mode probing support for the new x86 setup code
Video mode probing for the new x86 setup code. This code breaks down
different drivers into modules. This code deliberately drops support
for a lot of the vendor-specific mode probing present in the assembly
version, since a lot of those probes have been found to be stale in
current versions of those chips -- frequently, support for those modes
have been dropped from recent video BIOSes due to space constraints,
but the video BIOS signatures are still the same.
However, additional drivers should be extremely straightforward to plug
in, if desirable.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/i386/boot/vesa.h')
-rw-r--r-- | arch/i386/boot/vesa.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/arch/i386/boot/vesa.h b/arch/i386/boot/vesa.h new file mode 100644 index 000000000000..ff5b73cd406f --- /dev/null +++ b/arch/i386/boot/vesa.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /* ----------------------------------------------------------------------- * | ||
2 | * | ||
3 | * Copyright 1999-2007 H. Peter Anvin - All Rights Reserved | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation, Inc., 53 Temple Place Ste 330, | ||
8 | * Boston MA 02111-1307, USA; either version 2 of the License, or | ||
9 | * (at your option) any later version; incorporated herein by reference. | ||
10 | * | ||
11 | * ----------------------------------------------------------------------- */ | ||
12 | |||
13 | #ifndef BOOT_VESA_H | ||
14 | #define BOOT_VESA_H | ||
15 | |||
16 | typedef struct { | ||
17 | u16 off, seg; | ||
18 | } far_ptr; | ||
19 | |||
20 | /* VESA General Information table */ | ||
21 | struct vesa_general_info { | ||
22 | u32 signature; /* 0 Magic number = "VESA" */ | ||
23 | u16 version; /* 4 */ | ||
24 | far_ptr vendor_string; /* 6 */ | ||
25 | u32 capabilities; /* 10 */ | ||
26 | far_ptr video_mode_ptr; /* 14 */ | ||
27 | u16 total_memory; /* 18 */ | ||
28 | |||
29 | u16 oem_software_rev; /* 20 */ | ||
30 | far_ptr oem_vendor_name_ptr; /* 22 */ | ||
31 | far_ptr oem_product_name_ptr; /* 26 */ | ||
32 | far_ptr oem_product_rev_ptr; /* 30 */ | ||
33 | |||
34 | u8 reserved[222]; /* 34 */ | ||
35 | u8 oem_data[256]; /* 256 */ | ||
36 | } __attribute__ ((packed)); | ||
37 | |||
38 | #define VESA_MAGIC ('V' + ('E' << 8) + ('S' << 16) + ('A' << 24)) | ||
39 | #define VBE2_MAGIC ('V' + ('B' << 8) + ('E' << 16) + ('2' << 24)) | ||
40 | |||
41 | struct vesa_mode_info { | ||
42 | u16 mode_attr; /* 0 */ | ||
43 | u8 win_attr[2]; /* 2 */ | ||
44 | u16 win_grain; /* 4 */ | ||
45 | u16 win_size; /* 6 */ | ||
46 | u16 win_seg[2]; /* 8 */ | ||
47 | far_ptr win_scheme; /* 12 */ | ||
48 | u16 logical_scan; /* 16 */ | ||
49 | |||
50 | u16 h_res; /* 18 */ | ||
51 | u16 v_res; /* 20 */ | ||
52 | u8 char_width; /* 22 */ | ||
53 | u8 char_height; /* 23 */ | ||
54 | u8 memory_planes; /* 24 */ | ||
55 | u8 bpp; /* 25 */ | ||
56 | u8 banks; /* 26 */ | ||
57 | u8 memory_layout; /* 27 */ | ||
58 | u8 bank_size; /* 28 */ | ||
59 | u8 image_planes; /* 29 */ | ||
60 | u8 page_function; /* 30 */ | ||
61 | |||
62 | u8 rmask; /* 31 */ | ||
63 | u8 rpos; /* 32 */ | ||
64 | u8 gmask; /* 33 */ | ||
65 | u8 gpos; /* 34 */ | ||
66 | u8 bmask; /* 35 */ | ||
67 | u8 bpos; /* 36 */ | ||
68 | u8 resv_mask; /* 37 */ | ||
69 | u8 resv_pos; /* 38 */ | ||
70 | u8 dcm_info; /* 39 */ | ||
71 | |||
72 | u32 lfb_ptr; /* 40 Linear frame buffer address */ | ||
73 | u32 offscreen_ptr; /* 44 Offscreen memory address */ | ||
74 | u16 offscreen_size; /* 48 */ | ||
75 | |||
76 | u8 reserved[206]; /* 50 */ | ||
77 | } __attribute__ ((packed)); | ||
78 | |||
79 | #endif /* LIB_SYS_VESA_H */ | ||