diff options
-rw-r--r-- | Documentation/lguest/lguest.c | 2 | ||||
-rw-r--r-- | include/asm-x86/Kbuild | 3 | ||||
-rw-r--r-- | include/asm-x86/bootparam.h | 108 | ||||
-rw-r--r-- | include/asm-x86/e820.h | 28 | ||||
-rw-r--r-- | include/asm-x86/e820_32.h | 21 | ||||
-rw-r--r-- | include/asm-x86/e820_64.h | 20 | ||||
-rw-r--r-- | include/asm-x86/ist.h | 12 | ||||
-rw-r--r-- | include/linux/Kbuild | 2 | ||||
-rw-r--r-- | include/linux/apm_bios.h | 30 | ||||
-rw-r--r-- | include/linux/edd.h | 137 | ||||
-rw-r--r-- | include/linux/screen_info.h | 81 | ||||
-rw-r--r-- | include/video/Kbuild | 1 | ||||
-rw-r--r-- | include/video/edid.h | 9 |
13 files changed, 229 insertions, 225 deletions
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index 103e346c8b6a..c7fc995076cf 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c | |||
@@ -46,7 +46,7 @@ typedef uint32_t u32; | |||
46 | typedef uint16_t u16; | 46 | typedef uint16_t u16; |
47 | typedef uint8_t u8; | 47 | typedef uint8_t u8; |
48 | #include "../../include/linux/lguest_launcher.h" | 48 | #include "../../include/linux/lguest_launcher.h" |
49 | #include "../../include/asm-x86/e820_32.h" | 49 | #include "../../include/asm-x86/e820.h" |
50 | /*:*/ | 50 | /*:*/ |
51 | 51 | ||
52 | #define PAGE_PRESENT 0x7 /* Present, RW, Execute */ | 52 | #define PAGE_PRESENT 0x7 /* Present, RW, Execute */ |
diff --git a/include/asm-x86/Kbuild b/include/asm-x86/Kbuild index 559830ece755..5e3539c129b9 100644 --- a/include/asm-x86/Kbuild +++ b/include/asm-x86/Kbuild | |||
@@ -1,6 +1,7 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | 2 | ||
3 | header-y += boot.h | 3 | header-y += boot.h |
4 | header-y += bootparam.h | ||
4 | header-y += debugreg.h | 5 | header-y += debugreg.h |
5 | header-y += ldt.h | 6 | header-y += ldt.h |
6 | header-y += msr-index.h | 7 | header-y += msr-index.h |
@@ -14,8 +15,10 @@ unifdef-y += a.out_32.h | |||
14 | unifdef-y += a.out_64.h | 15 | unifdef-y += a.out_64.h |
15 | unifdef-y += byteorder_32.h | 16 | unifdef-y += byteorder_32.h |
16 | unifdef-y += byteorder_64.h | 17 | unifdef-y += byteorder_64.h |
18 | unifdef-y += e820.h | ||
17 | unifdef-y += elf_32.h | 19 | unifdef-y += elf_32.h |
18 | unifdef-y += elf_64.h | 20 | unifdef-y += elf_64.h |
21 | unifdef-y += ist.h | ||
19 | unifdef-y += mce.h | 22 | unifdef-y += mce.h |
20 | unifdef-y += msgbuf_32.h | 23 | unifdef-y += msgbuf_32.h |
21 | unifdef-y += msgbuf_64.h | 24 | unifdef-y += msgbuf_64.h |
diff --git a/include/asm-x86/bootparam.h b/include/asm-x86/bootparam.h index dc031cf44633..19f3ddf2df4b 100644 --- a/include/asm-x86/bootparam.h +++ b/include/asm-x86/bootparam.h | |||
@@ -10,85 +10,85 @@ | |||
10 | #include <video/edid.h> | 10 | #include <video/edid.h> |
11 | 11 | ||
12 | struct setup_header { | 12 | struct setup_header { |
13 | u8 setup_sects; | 13 | __u8 setup_sects; |
14 | u16 root_flags; | 14 | __u16 root_flags; |
15 | u32 syssize; | 15 | __u32 syssize; |
16 | u16 ram_size; | 16 | __u16 ram_size; |
17 | #define RAMDISK_IMAGE_START_MASK 0x07FF | 17 | #define RAMDISK_IMAGE_START_MASK 0x07FF |
18 | #define RAMDISK_PROMPT_FLAG 0x8000 | 18 | #define RAMDISK_PROMPT_FLAG 0x8000 |
19 | #define RAMDISK_LOAD_FLAG 0x4000 | 19 | #define RAMDISK_LOAD_FLAG 0x4000 |
20 | u16 vid_mode; | 20 | __u16 vid_mode; |
21 | u16 root_dev; | 21 | __u16 root_dev; |
22 | u16 boot_flag; | 22 | __u16 boot_flag; |
23 | u16 jump; | 23 | __u16 jump; |
24 | u32 header; | 24 | __u32 header; |
25 | u16 version; | 25 | __u16 version; |
26 | u32 realmode_swtch; | 26 | __u32 realmode_swtch; |
27 | u16 start_sys; | 27 | __u16 start_sys; |
28 | u16 kernel_version; | 28 | __u16 kernel_version; |
29 | u8 type_of_loader; | 29 | __u8 type_of_loader; |
30 | u8 loadflags; | 30 | __u8 loadflags; |
31 | #define LOADED_HIGH (1<<0) | 31 | #define LOADED_HIGH (1<<0) |
32 | #define KEEP_SEGMENTS (1<<6) | 32 | #define KEEP_SEGMENTS (1<<6) |
33 | #define CAN_USE_HEAP (1<<7) | 33 | #define CAN_USE_HEAP (1<<7) |
34 | u16 setup_move_size; | 34 | __u16 setup_move_size; |
35 | u32 code32_start; | 35 | __u32 code32_start; |
36 | u32 ramdisk_image; | 36 | __u32 ramdisk_image; |
37 | u32 ramdisk_size; | 37 | __u32 ramdisk_size; |
38 | u32 bootsect_kludge; | 38 | __u32 bootsect_kludge; |
39 | u16 heap_end_ptr; | 39 | __u16 heap_end_ptr; |
40 | u16 _pad1; | 40 | __u16 _pad1; |
41 | u32 cmd_line_ptr; | 41 | __u32 cmd_line_ptr; |
42 | u32 initrd_addr_max; | 42 | __u32 initrd_addr_max; |
43 | u32 kernel_alignment; | 43 | __u32 kernel_alignment; |
44 | u8 relocatable_kernel; | 44 | __u8 relocatable_kernel; |
45 | u8 _pad2[3]; | 45 | __u8 _pad2[3]; |
46 | u32 cmdline_size; | 46 | __u32 cmdline_size; |
47 | u32 hardware_subarch; | 47 | __u32 hardware_subarch; |
48 | u64 hardware_subarch_data; | 48 | __u64 hardware_subarch_data; |
49 | } __attribute__((packed)); | 49 | } __attribute__((packed)); |
50 | 50 | ||
51 | struct sys_desc_table { | 51 | struct sys_desc_table { |
52 | u16 length; | 52 | __u16 length; |
53 | u8 table[14]; | 53 | __u8 table[14]; |
54 | }; | 54 | }; |
55 | 55 | ||
56 | struct efi_info { | 56 | struct efi_info { |
57 | u32 _pad1; | 57 | __u32 _pad1; |
58 | u32 efi_systab; | 58 | __u32 efi_systab; |
59 | u32 efi_memdesc_size; | 59 | __u32 efi_memdesc_size; |
60 | u32 efi_memdesc_version; | 60 | __u32 efi_memdesc_version; |
61 | u32 efi_memmap; | 61 | __u32 efi_memmap; |
62 | u32 efi_memmap_size; | 62 | __u32 efi_memmap_size; |
63 | u32 _pad2[2]; | 63 | __u32 _pad2[2]; |
64 | }; | 64 | }; |
65 | 65 | ||
66 | /* The so-called "zeropage" */ | 66 | /* The so-called "zeropage" */ |
67 | struct boot_params { | 67 | struct boot_params { |
68 | struct screen_info screen_info; /* 0x000 */ | 68 | struct screen_info screen_info; /* 0x000 */ |
69 | struct apm_bios_info apm_bios_info; /* 0x040 */ | 69 | struct apm_bios_info apm_bios_info; /* 0x040 */ |
70 | u8 _pad2[12]; /* 0x054 */ | 70 | __u8 _pad2[12]; /* 0x054 */ |
71 | struct ist_info ist_info; /* 0x060 */ | 71 | struct ist_info ist_info; /* 0x060 */ |
72 | u8 _pad3[16]; /* 0x070 */ | 72 | __u8 _pad3[16]; /* 0x070 */ |
73 | u8 hd0_info[16]; /* obsolete! */ /* 0x080 */ | 73 | __u8 hd0_info[16]; /* obsolete! */ /* 0x080 */ |
74 | u8 hd1_info[16]; /* obsolete! */ /* 0x090 */ | 74 | __u8 hd1_info[16]; /* obsolete! */ /* 0x090 */ |
75 | struct sys_desc_table sys_desc_table; /* 0x0a0 */ | 75 | struct sys_desc_table sys_desc_table; /* 0x0a0 */ |
76 | u8 _pad4[144]; /* 0x0b0 */ | 76 | __u8 _pad4[144]; /* 0x0b0 */ |
77 | struct edid_info edid_info; /* 0x140 */ | 77 | struct edid_info edid_info; /* 0x140 */ |
78 | struct efi_info efi_info; /* 0x1c0 */ | 78 | struct efi_info efi_info; /* 0x1c0 */ |
79 | u32 alt_mem_k; /* 0x1e0 */ | 79 | __u32 alt_mem_k; /* 0x1e0 */ |
80 | u32 scratch; /* Scratch field! */ /* 0x1e4 */ | 80 | __u32 scratch; /* Scratch field! */ /* 0x1e4 */ |
81 | u8 e820_entries; /* 0x1e8 */ | 81 | __u8 e820_entries; /* 0x1e8 */ |
82 | u8 eddbuf_entries; /* 0x1e9 */ | 82 | __u8 eddbuf_entries; /* 0x1e9 */ |
83 | u8 edd_mbr_sig_buf_entries; /* 0x1ea */ | 83 | __u8 edd_mbr_sig_buf_entries; /* 0x1ea */ |
84 | u8 _pad6[6]; /* 0x1eb */ | 84 | __u8 _pad6[6]; /* 0x1eb */ |
85 | struct setup_header hdr; /* setup header */ /* 0x1f1 */ | 85 | struct setup_header hdr; /* setup header */ /* 0x1f1 */ |
86 | u8 _pad7[0x290-0x1f1-sizeof(struct setup_header)]; | 86 | __u8 _pad7[0x290-0x1f1-sizeof(struct setup_header)]; |
87 | u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX]; /* 0x290 */ | 87 | __u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX]; /* 0x290 */ |
88 | struct e820entry e820_map[E820MAX]; /* 0x2d0 */ | 88 | struct e820entry e820_map[E820MAX]; /* 0x2d0 */ |
89 | u8 _pad8[48]; /* 0xcd0 */ | 89 | __u8 _pad8[48]; /* 0xcd0 */ |
90 | struct edd_info eddbuf[EDDMAXNR]; /* 0xd00 */ | 90 | struct edd_info eddbuf[EDDMAXNR]; /* 0xd00 */ |
91 | u8 _pad9[276]; /* 0xeec */ | 91 | __u8 _pad9[276]; /* 0xeec */ |
92 | } __attribute__((packed)); | 92 | } __attribute__((packed)); |
93 | 93 | ||
94 | #endif /* _ASM_BOOTPARAM_H */ | 94 | #endif /* _ASM_BOOTPARAM_H */ |
diff --git a/include/asm-x86/e820.h b/include/asm-x86/e820.h index 5d4d2183e5db..3e214f39fad3 100644 --- a/include/asm-x86/e820.h +++ b/include/asm-x86/e820.h | |||
@@ -1,5 +1,33 @@ | |||
1 | #ifndef __ASM_E820_H | ||
2 | #define __ASM_E820_H | ||
3 | #define E820MAP 0x2d0 /* our map */ | ||
4 | #define E820MAX 128 /* number of entries in E820MAP */ | ||
5 | #define E820NR 0x1e8 /* # entries in E820MAP */ | ||
6 | |||
7 | #define E820_RAM 1 | ||
8 | #define E820_RESERVED 2 | ||
9 | #define E820_ACPI 3 | ||
10 | #define E820_NVS 4 | ||
11 | |||
12 | #ifndef __ASSEMBLY__ | ||
13 | struct e820entry { | ||
14 | __u64 addr; /* start of memory segment */ | ||
15 | __u64 size; /* size of memory segment */ | ||
16 | __u32 type; /* type of memory segment */ | ||
17 | } __attribute__((packed)); | ||
18 | |||
19 | struct e820map { | ||
20 | __u32 nr_map; | ||
21 | struct e820entry map[E820MAX]; | ||
22 | }; | ||
23 | #endif /* __ASSEMBLY__ */ | ||
24 | |||
25 | #ifdef __KERNEL__ | ||
1 | #ifdef CONFIG_X86_32 | 26 | #ifdef CONFIG_X86_32 |
2 | # include "e820_32.h" | 27 | # include "e820_32.h" |
3 | #else | 28 | #else |
4 | # include "e820_64.h" | 29 | # include "e820_64.h" |
5 | #endif | 30 | #endif |
31 | #endif /* __KERNEL__ */ | ||
32 | |||
33 | #endif /* __ASM_E820_H */ | ||
diff --git a/include/asm-x86/e820_32.h b/include/asm-x86/e820_32.h index cf67dbb1db79..03f60c690c8a 100644 --- a/include/asm-x86/e820_32.h +++ b/include/asm-x86/e820_32.h | |||
@@ -12,30 +12,10 @@ | |||
12 | #ifndef __E820_HEADER | 12 | #ifndef __E820_HEADER |
13 | #define __E820_HEADER | 13 | #define __E820_HEADER |
14 | 14 | ||
15 | #define E820MAP 0x2d0 /* our map */ | ||
16 | #define E820MAX 128 /* number of entries in E820MAP */ | ||
17 | #define E820NR 0x1e8 /* # entries in E820MAP */ | ||
18 | |||
19 | #define E820_RAM 1 | ||
20 | #define E820_RESERVED 2 | ||
21 | #define E820_ACPI 3 | ||
22 | #define E820_NVS 4 | ||
23 | |||
24 | #define HIGH_MEMORY (1024*1024) | 15 | #define HIGH_MEMORY (1024*1024) |
25 | 16 | ||
26 | #ifndef __ASSEMBLY__ | 17 | #ifndef __ASSEMBLY__ |
27 | 18 | ||
28 | struct e820entry { | ||
29 | u64 addr; /* start of memory segment */ | ||
30 | u64 size; /* size of memory segment */ | ||
31 | u32 type; /* type of memory segment */ | ||
32 | } __attribute__((packed)); | ||
33 | |||
34 | struct e820map { | ||
35 | u32 nr_map; | ||
36 | struct e820entry map[E820MAX]; | ||
37 | }; | ||
38 | |||
39 | extern struct e820map e820; | 19 | extern struct e820map e820; |
40 | 20 | ||
41 | extern int e820_all_mapped(unsigned long start, unsigned long end, | 21 | extern int e820_all_mapped(unsigned long start, unsigned long end, |
@@ -56,5 +36,4 @@ static inline void e820_mark_nosave_regions(void) | |||
56 | #endif | 36 | #endif |
57 | 37 | ||
58 | #endif/*!__ASSEMBLY__*/ | 38 | #endif/*!__ASSEMBLY__*/ |
59 | |||
60 | #endif/*__E820_HEADER*/ | 39 | #endif/*__E820_HEADER*/ |
diff --git a/include/asm-x86/e820_64.h b/include/asm-x86/e820_64.h index 3486e701bd86..0bd4787a5d57 100644 --- a/include/asm-x86/e820_64.h +++ b/include/asm-x86/e820_64.h | |||
@@ -11,27 +11,7 @@ | |||
11 | #ifndef __E820_HEADER | 11 | #ifndef __E820_HEADER |
12 | #define __E820_HEADER | 12 | #define __E820_HEADER |
13 | 13 | ||
14 | #define E820MAP 0x2d0 /* our map */ | ||
15 | #define E820MAX 128 /* number of entries in E820MAP */ | ||
16 | #define E820NR 0x1e8 /* # entries in E820MAP */ | ||
17 | |||
18 | #define E820_RAM 1 | ||
19 | #define E820_RESERVED 2 | ||
20 | #define E820_ACPI 3 | ||
21 | #define E820_NVS 4 | ||
22 | |||
23 | #ifndef __ASSEMBLY__ | 14 | #ifndef __ASSEMBLY__ |
24 | struct e820entry { | ||
25 | u64 addr; /* start of memory segment */ | ||
26 | u64 size; /* size of memory segment */ | ||
27 | u32 type; /* type of memory segment */ | ||
28 | } __attribute__((packed)); | ||
29 | |||
30 | struct e820map { | ||
31 | u32 nr_map; | ||
32 | struct e820entry map[E820MAX]; | ||
33 | }; | ||
34 | |||
35 | extern unsigned long find_e820_area(unsigned long start, unsigned long end, | 15 | extern unsigned long find_e820_area(unsigned long start, unsigned long end, |
36 | unsigned size); | 16 | unsigned size); |
37 | extern void add_memory_region(unsigned long start, unsigned long size, | 17 | extern void add_memory_region(unsigned long start, unsigned long size, |
diff --git a/include/asm-x86/ist.h b/include/asm-x86/ist.h index ef2003ebc6f9..6ec6ceed95a7 100644 --- a/include/asm-x86/ist.h +++ b/include/asm-x86/ist.h | |||
@@ -17,17 +17,17 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | 19 | ||
20 | #ifdef __KERNEL__ | ||
21 | |||
22 | #include <linux/types.h> | 20 | #include <linux/types.h> |
23 | 21 | ||
24 | struct ist_info { | 22 | struct ist_info { |
25 | u32 signature; | 23 | __u32 signature; |
26 | u32 command; | 24 | __u32 command; |
27 | u32 event; | 25 | __u32 event; |
28 | u32 perf_level; | 26 | __u32 perf_level; |
29 | }; | 27 | }; |
30 | 28 | ||
29 | #ifdef __KERNEL__ | ||
30 | |||
31 | extern struct ist_info ist_info; | 31 | extern struct ist_info ist_info; |
32 | 32 | ||
33 | #endif /* __KERNEL__ */ | 33 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index e3ffd14a3f0b..758834538a19 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -186,6 +186,7 @@ unifdef-y += cyclades.h | |||
186 | unifdef-y += dccp.h | 186 | unifdef-y += dccp.h |
187 | unifdef-y += dirent.h | 187 | unifdef-y += dirent.h |
188 | unifdef-y += dlm.h | 188 | unifdef-y += dlm.h |
189 | unifdef-y += edd.h | ||
189 | unifdef-y += elfcore.h | 190 | unifdef-y += elfcore.h |
190 | unifdef-y += errno.h | 191 | unifdef-y += errno.h |
191 | unifdef-y += errqueue.h | 192 | unifdef-y += errqueue.h |
@@ -306,6 +307,7 @@ unifdef-y += rtc.h | |||
306 | unifdef-y += rtnetlink.h | 307 | unifdef-y += rtnetlink.h |
307 | unifdef-y += scc.h | 308 | unifdef-y += scc.h |
308 | unifdef-y += sched.h | 309 | unifdef-y += sched.h |
310 | unifdef-y += screen_info.h | ||
309 | unifdef-y += sdla.h | 311 | unifdef-y += sdla.h |
310 | unifdef-y += selinux_netlink.h | 312 | unifdef-y += selinux_netlink.h |
311 | unifdef-y += sem.h | 313 | unifdef-y += sem.h |
diff --git a/include/linux/apm_bios.h b/include/linux/apm_bios.h index 5f921c84827a..9754baa14921 100644 --- a/include/linux/apm_bios.h +++ b/include/linux/apm_bios.h | |||
@@ -16,29 +16,29 @@ | |||
16 | * General Public License for more details. | 16 | * General Public License for more details. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | typedef unsigned short apm_event_t; | 19 | #include <linux/types.h> |
20 | typedef unsigned short apm_eventinfo_t; | 20 | |
21 | struct apm_bios_info { | ||
22 | __u16 version; | ||
23 | __u16 cseg; | ||
24 | __u32 offset; | ||
25 | __u16 cseg_16; | ||
26 | __u16 dseg; | ||
27 | __u16 flags; | ||
28 | __u16 cseg_len; | ||
29 | __u16 cseg_16_len; | ||
30 | __u16 dseg_len; | ||
31 | }; | ||
21 | 32 | ||
22 | #ifdef __KERNEL__ | 33 | #ifdef __KERNEL__ |
23 | 34 | ||
24 | #include <linux/types.h> | 35 | typedef unsigned short apm_event_t; |
36 | typedef unsigned short apm_eventinfo_t; | ||
25 | 37 | ||
26 | #define APM_CS (GDT_ENTRY_APMBIOS_BASE * 8) | 38 | #define APM_CS (GDT_ENTRY_APMBIOS_BASE * 8) |
27 | #define APM_CS_16 (APM_CS + 8) | 39 | #define APM_CS_16 (APM_CS + 8) |
28 | #define APM_DS (APM_CS_16 + 8) | 40 | #define APM_DS (APM_CS_16 + 8) |
29 | 41 | ||
30 | struct apm_bios_info { | ||
31 | u16 version; | ||
32 | u16 cseg; | ||
33 | u32 offset; | ||
34 | u16 cseg_16; | ||
35 | u16 dseg; | ||
36 | u16 flags; | ||
37 | u16 cseg_len; | ||
38 | u16 cseg_16_len; | ||
39 | u16 dseg_len; | ||
40 | }; | ||
41 | |||
42 | /* Results of APM Installation Check */ | 42 | /* Results of APM Installation Check */ |
43 | #define APM_16_BIT_SUPPORT 0x0001 | 43 | #define APM_16_BIT_SUPPORT 0x0001 |
44 | #define APM_32_BIT_SUPPORT 0x0002 | 44 | #define APM_32_BIT_SUPPORT 0x0002 |
diff --git a/include/linux/edd.h b/include/linux/edd.h index 7b647822d6dc..5d747c5cd0fe 100644 --- a/include/linux/edd.h +++ b/include/linux/edd.h | |||
@@ -67,113 +67,113 @@ | |||
67 | #define EDD_INFO_USE_INT13_FN50 (1 << 7) | 67 | #define EDD_INFO_USE_INT13_FN50 (1 << 7) |
68 | 68 | ||
69 | struct edd_device_params { | 69 | struct edd_device_params { |
70 | u16 length; | 70 | __u16 length; |
71 | u16 info_flags; | 71 | __u16 info_flags; |
72 | u32 num_default_cylinders; | 72 | __u32 num_default_cylinders; |
73 | u32 num_default_heads; | 73 | __u32 num_default_heads; |
74 | u32 sectors_per_track; | 74 | __u32 sectors_per_track; |
75 | u64 number_of_sectors; | 75 | __u64 number_of_sectors; |
76 | u16 bytes_per_sector; | 76 | __u16 bytes_per_sector; |
77 | u32 dpte_ptr; /* 0xFFFFFFFF for our purposes */ | 77 | __u32 dpte_ptr; /* 0xFFFFFFFF for our purposes */ |
78 | u16 key; /* = 0xBEDD */ | 78 | __u16 key; /* = 0xBEDD */ |
79 | u8 device_path_info_length; /* = 44 */ | 79 | __u8 device_path_info_length; /* = 44 */ |
80 | u8 reserved2; | 80 | __u8 reserved2; |
81 | u16 reserved3; | 81 | __u16 reserved3; |
82 | u8 host_bus_type[4]; | 82 | __u8 host_bus_type[4]; |
83 | u8 interface_type[8]; | 83 | __u8 interface_type[8]; |
84 | union { | 84 | union { |
85 | struct { | 85 | struct { |
86 | u16 base_address; | 86 | __u16 base_address; |
87 | u16 reserved1; | 87 | __u16 reserved1; |
88 | u32 reserved2; | 88 | __u32 reserved2; |
89 | } __attribute__ ((packed)) isa; | 89 | } __attribute__ ((packed)) isa; |
90 | struct { | 90 | struct { |
91 | u8 bus; | 91 | __u8 bus; |
92 | u8 slot; | 92 | __u8 slot; |
93 | u8 function; | 93 | __u8 function; |
94 | u8 channel; | 94 | __u8 channel; |
95 | u32 reserved; | 95 | __u32 reserved; |
96 | } __attribute__ ((packed)) pci; | 96 | } __attribute__ ((packed)) pci; |
97 | /* pcix is same as pci */ | 97 | /* pcix is same as pci */ |
98 | struct { | 98 | struct { |
99 | u64 reserved; | 99 | __u64 reserved; |
100 | } __attribute__ ((packed)) ibnd; | 100 | } __attribute__ ((packed)) ibnd; |
101 | struct { | 101 | struct { |
102 | u64 reserved; | 102 | __u64 reserved; |
103 | } __attribute__ ((packed)) xprs; | 103 | } __attribute__ ((packed)) xprs; |
104 | struct { | 104 | struct { |
105 | u64 reserved; | 105 | __u64 reserved; |
106 | } __attribute__ ((packed)) htpt; | 106 | } __attribute__ ((packed)) htpt; |
107 | struct { | 107 | struct { |
108 | u64 reserved; | 108 | __u64 reserved; |
109 | } __attribute__ ((packed)) unknown; | 109 | } __attribute__ ((packed)) unknown; |
110 | } interface_path; | 110 | } interface_path; |
111 | union { | 111 | union { |
112 | struct { | 112 | struct { |
113 | u8 device; | 113 | __u8 device; |
114 | u8 reserved1; | 114 | __u8 reserved1; |
115 | u16 reserved2; | 115 | __u16 reserved2; |
116 | u32 reserved3; | 116 | __u32 reserved3; |
117 | u64 reserved4; | 117 | __u64 reserved4; |
118 | } __attribute__ ((packed)) ata; | 118 | } __attribute__ ((packed)) ata; |
119 | struct { | 119 | struct { |
120 | u8 device; | 120 | __u8 device; |
121 | u8 lun; | 121 | __u8 lun; |
122 | u8 reserved1; | 122 | __u8 reserved1; |
123 | u8 reserved2; | 123 | __u8 reserved2; |
124 | u32 reserved3; | 124 | __u32 reserved3; |
125 | u64 reserved4; | 125 | __u64 reserved4; |
126 | } __attribute__ ((packed)) atapi; | 126 | } __attribute__ ((packed)) atapi; |
127 | struct { | 127 | struct { |
128 | u16 id; | 128 | __u16 id; |
129 | u64 lun; | 129 | __u64 lun; |
130 | u16 reserved1; | 130 | __u16 reserved1; |
131 | u32 reserved2; | 131 | __u32 reserved2; |
132 | } __attribute__ ((packed)) scsi; | 132 | } __attribute__ ((packed)) scsi; |
133 | struct { | 133 | struct { |
134 | u64 serial_number; | 134 | __u64 serial_number; |
135 | u64 reserved; | 135 | __u64 reserved; |
136 | } __attribute__ ((packed)) usb; | 136 | } __attribute__ ((packed)) usb; |
137 | struct { | 137 | struct { |
138 | u64 eui; | 138 | __u64 eui; |
139 | u64 reserved; | 139 | __u64 reserved; |
140 | } __attribute__ ((packed)) i1394; | 140 | } __attribute__ ((packed)) i1394; |
141 | struct { | 141 | struct { |
142 | u64 wwid; | 142 | __u64 wwid; |
143 | u64 lun; | 143 | __u64 lun; |
144 | } __attribute__ ((packed)) fibre; | 144 | } __attribute__ ((packed)) fibre; |
145 | struct { | 145 | struct { |
146 | u64 identity_tag; | 146 | __u64 identity_tag; |
147 | u64 reserved; | 147 | __u64 reserved; |
148 | } __attribute__ ((packed)) i2o; | 148 | } __attribute__ ((packed)) i2o; |
149 | struct { | 149 | struct { |
150 | u32 array_number; | 150 | __u32 array_number; |
151 | u32 reserved1; | 151 | __u32 reserved1; |
152 | u64 reserved2; | 152 | __u64 reserved2; |
153 | } __attribute__ ((packed)) raid; | 153 | } __attribute__ ((packed)) raid; |
154 | struct { | 154 | struct { |
155 | u8 device; | 155 | __u8 device; |
156 | u8 reserved1; | 156 | __u8 reserved1; |
157 | u16 reserved2; | 157 | __u16 reserved2; |
158 | u32 reserved3; | 158 | __u32 reserved3; |
159 | u64 reserved4; | 159 | __u64 reserved4; |
160 | } __attribute__ ((packed)) sata; | 160 | } __attribute__ ((packed)) sata; |
161 | struct { | 161 | struct { |
162 | u64 reserved1; | 162 | __u64 reserved1; |
163 | u64 reserved2; | 163 | __u64 reserved2; |
164 | } __attribute__ ((packed)) unknown; | 164 | } __attribute__ ((packed)) unknown; |
165 | } device_path; | 165 | } device_path; |
166 | u8 reserved4; | 166 | __u8 reserved4; |
167 | u8 checksum; | 167 | __u8 checksum; |
168 | } __attribute__ ((packed)); | 168 | } __attribute__ ((packed)); |
169 | 169 | ||
170 | struct edd_info { | 170 | struct edd_info { |
171 | u8 device; | 171 | __u8 device; |
172 | u8 version; | 172 | __u8 version; |
173 | u16 interface_support; | 173 | __u16 interface_support; |
174 | u16 legacy_max_cylinder; | 174 | __u16 legacy_max_cylinder; |
175 | u8 legacy_max_head; | 175 | __u8 legacy_max_head; |
176 | u8 legacy_sectors_per_track; | 176 | __u8 legacy_sectors_per_track; |
177 | struct edd_device_params params; | 177 | struct edd_device_params params; |
178 | } __attribute__ ((packed)); | 178 | } __attribute__ ((packed)); |
179 | 179 | ||
@@ -184,8 +184,9 @@ struct edd { | |||
184 | unsigned char edd_info_nr; | 184 | unsigned char edd_info_nr; |
185 | }; | 185 | }; |
186 | 186 | ||
187 | #ifdef __KERNEL__ | ||
187 | extern struct edd edd; | 188 | extern struct edd edd; |
188 | 189 | #endif /* __KERNEL__ */ | |
189 | #endif /*!__ASSEMBLY__ */ | 190 | #endif /*!__ASSEMBLY__ */ |
190 | 191 | ||
191 | #endif /* _LINUX_EDD_H */ | 192 | #endif /* _LINUX_EDD_H */ |
diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h index ba81ffe9958a..827b85bbf388 100644 --- a/include/linux/screen_info.h +++ b/include/linux/screen_info.h | |||
@@ -8,45 +8,43 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | struct screen_info { | 10 | struct screen_info { |
11 | u8 orig_x; /* 0x00 */ | 11 | __u8 orig_x; /* 0x00 */ |
12 | u8 orig_y; /* 0x01 */ | 12 | __u8 orig_y; /* 0x01 */ |
13 | u16 ext_mem_k; /* 0x02 */ | 13 | __u16 ext_mem_k; /* 0x02 */ |
14 | u16 orig_video_page; /* 0x04 */ | 14 | __u16 orig_video_page; /* 0x04 */ |
15 | u8 orig_video_mode; /* 0x06 */ | 15 | __u8 orig_video_mode; /* 0x06 */ |
16 | u8 orig_video_cols; /* 0x07 */ | 16 | __u8 orig_video_cols; /* 0x07 */ |
17 | u16 unused2; /* 0x08 */ | 17 | __u16 unused2; /* 0x08 */ |
18 | u16 orig_video_ega_bx; /* 0x0a */ | 18 | __u16 orig_video_ega_bx;/* 0x0a */ |
19 | u16 unused3; /* 0x0c */ | 19 | __u16 unused3; /* 0x0c */ |
20 | u8 orig_video_lines; /* 0x0e */ | 20 | __u8 orig_video_lines; /* 0x0e */ |
21 | u8 orig_video_isVGA; /* 0x0f */ | 21 | __u8 orig_video_isVGA; /* 0x0f */ |
22 | u16 orig_video_points; /* 0x10 */ | 22 | __u16 orig_video_points;/* 0x10 */ |
23 | 23 | ||
24 | /* VESA graphic mode -- linear frame buffer */ | 24 | /* VESA graphic mode -- linear frame buffer */ |
25 | u16 lfb_width; /* 0x12 */ | 25 | __u16 lfb_width; /* 0x12 */ |
26 | u16 lfb_height; /* 0x14 */ | 26 | __u16 lfb_height; /* 0x14 */ |
27 | u16 lfb_depth; /* 0x16 */ | 27 | __u16 lfb_depth; /* 0x16 */ |
28 | u32 lfb_base; /* 0x18 */ | 28 | __u32 lfb_base; /* 0x18 */ |
29 | u32 lfb_size; /* 0x1c */ | 29 | __u32 lfb_size; /* 0x1c */ |
30 | u16 cl_magic, cl_offset; /* 0x20 */ | 30 | __u16 cl_magic, cl_offset; /* 0x20 */ |
31 | u16 lfb_linelength; /* 0x24 */ | 31 | __u16 lfb_linelength; /* 0x24 */ |
32 | u8 red_size; /* 0x26 */ | 32 | __u8 red_size; /* 0x26 */ |
33 | u8 red_pos; /* 0x27 */ | 33 | __u8 red_pos; /* 0x27 */ |
34 | u8 green_size; /* 0x28 */ | 34 | __u8 green_size; /* 0x28 */ |
35 | u8 green_pos; /* 0x29 */ | 35 | __u8 green_pos; /* 0x29 */ |
36 | u8 blue_size; /* 0x2a */ | 36 | __u8 blue_size; /* 0x2a */ |
37 | u8 blue_pos; /* 0x2b */ | 37 | __u8 blue_pos; /* 0x2b */ |
38 | u8 rsvd_size; /* 0x2c */ | 38 | __u8 rsvd_size; /* 0x2c */ |
39 | u8 rsvd_pos; /* 0x2d */ | 39 | __u8 rsvd_pos; /* 0x2d */ |
40 | u16 vesapm_seg; /* 0x2e */ | 40 | __u16 vesapm_seg; /* 0x2e */ |
41 | u16 vesapm_off; /* 0x30 */ | 41 | __u16 vesapm_off; /* 0x30 */ |
42 | u16 pages; /* 0x32 */ | 42 | __u16 pages; /* 0x32 */ |
43 | u16 vesa_attributes; /* 0x34 */ | 43 | __u16 vesa_attributes; /* 0x34 */ |
44 | u32 capabilities; /* 0x36 */ | 44 | __u32 capabilities; /* 0x36 */ |
45 | u8 _reserved[6]; /* 0x3a */ | 45 | __u8 _reserved[6]; /* 0x3a */ |
46 | } __attribute__((packed)); | 46 | } __attribute__((packed)); |
47 | 47 | ||
48 | extern struct screen_info screen_info; | ||
49 | |||
50 | #define VIDEO_TYPE_MDA 0x10 /* Monochrome Text Display */ | 48 | #define VIDEO_TYPE_MDA 0x10 /* Monochrome Text Display */ |
51 | #define VIDEO_TYPE_CGA 0x11 /* CGA Display */ | 49 | #define VIDEO_TYPE_CGA 0x11 /* CGA Display */ |
52 | #define VIDEO_TYPE_EGAM 0x20 /* EGA/VGA in Monochrome Mode */ | 50 | #define VIDEO_TYPE_EGAM 0x20 /* EGA/VGA in Monochrome Mode */ |
@@ -65,4 +63,17 @@ extern struct screen_info screen_info; | |||
65 | 63 | ||
66 | #define VIDEO_TYPE_PMAC 0x60 /* PowerMacintosh frame buffer. */ | 64 | #define VIDEO_TYPE_PMAC 0x60 /* PowerMacintosh frame buffer. */ |
67 | 65 | ||
66 | #ifdef __KERNEL__ | ||
67 | extern struct screen_info screen_info; | ||
68 | |||
69 | #define ORIG_X (screen_info.orig_x) | ||
70 | #define ORIG_Y (screen_info.orig_y) | ||
71 | #define ORIG_VIDEO_MODE (screen_info.orig_video_mode) | ||
72 | #define ORIG_VIDEO_COLS (screen_info.orig_video_cols) | ||
73 | #define ORIG_VIDEO_EGA_BX (screen_info.orig_video_ega_bx) | ||
74 | #define ORIG_VIDEO_LINES (screen_info.orig_video_lines) | ||
75 | #define ORIG_VIDEO_ISVGA (screen_info.orig_video_isVGA) | ||
76 | #define ORIG_VIDEO_POINTS (screen_info.orig_video_points) | ||
77 | #endif /* __KERNEL__ */ | ||
78 | |||
68 | #endif /* _SCREEN_INFO_H */ | 79 | #endif /* _SCREEN_INFO_H */ |
diff --git a/include/video/Kbuild b/include/video/Kbuild index 53a6c7310e61..0e406f730c2f 100644 --- a/include/video/Kbuild +++ b/include/video/Kbuild | |||
@@ -1 +1,2 @@ | |||
1 | unifdef-y += sisfb.h uvesafb.h | 1 | unifdef-y += sisfb.h uvesafb.h |
2 | unifdef-y += edid.h | ||
diff --git a/include/video/edid.h b/include/video/edid.h index f6a42d6c2e2d..928c342b33d6 100644 --- a/include/video/edid.h +++ b/include/video/edid.h | |||
@@ -1,17 +1,16 @@ | |||
1 | #ifndef __linux_video_edid_h__ | 1 | #ifndef __linux_video_edid_h__ |
2 | #define __linux_video_edid_h__ | 2 | #define __linux_video_edid_h__ |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #if !defined(__KERNEL__) || defined(CONFIG_X86) |
5 | |||
6 | 5 | ||
7 | #ifdef CONFIG_X86 | ||
8 | struct edid_info { | 6 | struct edid_info { |
9 | unsigned char dummy[128]; | 7 | unsigned char dummy[128]; |
10 | }; | 8 | }; |
11 | 9 | ||
10 | #ifdef __KERNEL__ | ||
12 | extern struct edid_info edid_info; | 11 | extern struct edid_info edid_info; |
13 | #endif /* CONFIG_X86 */ | ||
14 | |||
15 | #endif /* __KERNEL__ */ | 12 | #endif /* __KERNEL__ */ |
16 | 13 | ||
14 | #endif | ||
15 | |||
17 | #endif /* __linux_video_edid_h__ */ | 16 | #endif /* __linux_video_edid_h__ */ |