aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/kernel/setup.c12
-rw-r--r--include/asm-i386/bootparam.h85
-rw-r--r--include/asm-i386/setup.h10
-rw-r--r--include/asm-x86_64/boot.h16
-rw-r--r--include/asm-x86_64/bootparam.h1
5 files changed, 94 insertions, 30 deletions
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 698c24fe482e..2d61e65eeb50 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -102,19 +102,10 @@ static unsigned int highmem_pages = -1;
102/* 102/*
103 * Setup options 103 * Setup options
104 */ 104 */
105struct drive_info_struct { char dummy[32]; } drive_info;
106#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || \
107 defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
108EXPORT_SYMBOL(drive_info);
109#endif
110struct screen_info screen_info; 105struct screen_info screen_info;
111EXPORT_SYMBOL(screen_info); 106EXPORT_SYMBOL(screen_info);
112struct apm_info apm_info; 107struct apm_info apm_info;
113EXPORT_SYMBOL(apm_info); 108EXPORT_SYMBOL(apm_info);
114struct sys_desc_table_struct {
115 unsigned short length;
116 unsigned char table[0];
117};
118struct edid_info edid_info; 109struct edid_info edid_info;
119EXPORT_SYMBOL_GPL(edid_info); 110EXPORT_SYMBOL_GPL(edid_info);
120struct ist_info ist_info; 111struct ist_info ist_info;
@@ -134,7 +125,7 @@ unsigned long saved_videomode;
134 125
135static char __initdata command_line[COMMAND_LINE_SIZE]; 126static char __initdata command_line[COMMAND_LINE_SIZE];
136 127
137unsigned char __initdata boot_params[PARAM_SIZE]; 128struct boot_params __initdata boot_params;
138 129
139#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) 130#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
140struct edd edd; 131struct edd edd;
@@ -528,7 +519,6 @@ void __init setup_arch(char **cmdline_p)
528#endif 519#endif
529 520
530 ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); 521 ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
531 drive_info = DRIVE_INFO;
532 screen_info = SCREEN_INFO; 522 screen_info = SCREEN_INFO;
533 edid_info = EDID_INFO; 523 edid_info = EDID_INFO;
534 apm_info.bios = APM_BIOS_INFO; 524 apm_info.bios = APM_BIOS_INFO;
diff --git a/include/asm-i386/bootparam.h b/include/asm-i386/bootparam.h
new file mode 100644
index 000000000000..427d8652bfde
--- /dev/null
+++ b/include/asm-i386/bootparam.h
@@ -0,0 +1,85 @@
1#ifndef _ASM_BOOTPARAM_H
2#define _ASM_BOOTPARAM_H
3
4#include <linux/types.h>
5#include <linux/screen_info.h>
6#include <linux/apm_bios.h>
7#include <asm/e820.h>
8#include <linux/edd.h>
9#include <video/edid.h>
10
11struct setup_header {
12 u8 setup_sects;
13 u16 root_flags;
14 u32 syssize;
15 u16 ram_size;
16 u16 vid_mode;
17 u16 root_dev;
18 u16 boot_flag;
19 u16 jump;
20 u32 header;
21 u16 version;
22 u32 realmode_swtch;
23 u16 start_sys;
24 u16 kernel_version;
25 u8 type_of_loader;
26 u8 loadflags;
27#define LOADED_HIGH 0x01
28#define CAN_USE_HEAP 0x80
29 u16 setup_move_size;
30 u32 code32_start;
31 u32 ramdisk_image;
32 u32 ramdisk_size;
33 u32 bootsect_kludge;
34 u16 heap_end_ptr;
35 u16 _pad1;
36 u32 cmd_line_ptr;
37 u32 initrd_addr_max;
38 u32 kernel_alignment;
39 u8 relocatable_kernel;
40} __attribute__((packed));
41
42struct sys_desc_table {
43 u16 length;
44 u8 table[14];
45};
46
47struct efi_info {
48 u32 _pad1;
49 u32 efi_systab;
50 u32 efi_memdesc_size;
51 u32 efi_memdec_version;
52 u32 efi_memmap;
53 u32 fi_memmap_size;
54 u32 _pad2[2];
55};
56
57/* The so-called "zeropage" */
58struct boot_params {
59 struct screen_info screen_info; /* 0x000 */
60 struct apm_bios_info apm_bios_info; /* 0x040 */
61 u8 _pad2[12]; /* 0x054 */
62 u32 speedstep_info[4]; /* 0x060 */
63 u8 _pad3[16]; /* 0x070 */
64 u8 hd0_info[16]; /* obsolete! */ /* 0x080 */
65 u8 hd1_info[16]; /* obsolete! */ /* 0x090 */
66 struct sys_desc_table sys_desc_table; /* 0x0a0 */
67 u8 _pad4[144]; /* 0x0b0 */
68 struct edid_info edid_info; /* 0x140 */
69 struct efi_info efi_info; /* 0x1c0 */
70 u32 alt_mem_k; /* 0x1e0 */
71 u32 scratch; /* Scratch field! */ /* 0x1e4 */
72 u8 e820_entries; /* 0x1e8 */
73 u8 eddbuf_entries; /* 0x1e9 */
74 u8 edd_mbr_sig_buf_entries; /* 0x1ea */
75 u8 _pad6[6]; /* 0x1eb */
76 struct setup_header hdr; /* setup header */ /* 0x1f1 */
77 u8 _pad7[0x290-0x1f1-sizeof(struct setup_header)];
78 u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX]; /* 0x290 */
79 struct e820entry e820_map[E820MAX]; /* 0x2d0 */
80 u8 _pad8[48]; /* 0xcd0 */
81 struct edd_info eddbuf[EDDMAXNR]; /* 0xd00 */
82 u8 _pad9[276]; /* 0xeec */
83} __attribute__((packed));
84
85#endif /* _ASM_BOOTPARAM_H */
diff --git a/include/asm-i386/setup.h b/include/asm-i386/setup.h
index 0e8077cbfdac..0d5bff9dc4a5 100644
--- a/include/asm-i386/setup.h
+++ b/include/asm-i386/setup.h
@@ -26,12 +26,15 @@
26#define NEW_CL_POINTER 0x228 /* Relative to real mode data */ 26#define NEW_CL_POINTER 0x228 /* Relative to real mode data */
27 27
28#ifndef __ASSEMBLY__ 28#ifndef __ASSEMBLY__
29
30#include <asm/bootparam.h>
31
29/* 32/*
30 * This is set up by the setup-routine at boot-time 33 * This is set up by the setup-routine at boot-time
31 */ 34 */
32extern unsigned char boot_params[PARAM_SIZE]; 35extern struct boot_params boot_params;
33 36
34#define PARAM (boot_params) 37#define PARAM ((char *)&boot_params)
35#define SCREEN_INFO (*(struct screen_info *) (PARAM+0)) 38#define SCREEN_INFO (*(struct screen_info *) (PARAM+0))
36#define EXT_MEM_K (*(unsigned short *) (PARAM+2)) 39#define EXT_MEM_K (*(unsigned short *) (PARAM+2))
37#define ALT_MEM_K (*(unsigned long *) (PARAM+0x1e0)) 40#define ALT_MEM_K (*(unsigned long *) (PARAM+0x1e0))
@@ -39,8 +42,7 @@ extern unsigned char boot_params[PARAM_SIZE];
39#define E820_MAP ((struct e820entry *) (PARAM+E820MAP)) 42#define E820_MAP ((struct e820entry *) (PARAM+E820MAP))
40#define APM_BIOS_INFO (*(struct apm_bios_info *) (PARAM+0x40)) 43#define APM_BIOS_INFO (*(struct apm_bios_info *) (PARAM+0x40))
41#define IST_INFO (*(struct ist_info *) (PARAM+0x60)) 44#define IST_INFO (*(struct ist_info *) (PARAM+0x60))
42#define DRIVE_INFO (*(struct drive_info_struct *) (PARAM+0x80)) 45#define SYS_DESC_TABLE (*(struct sys_desc_table *)(PARAM+0xa0))
43#define SYS_DESC_TABLE (*(struct sys_desc_table_struct*)(PARAM+0xa0))
44#define EFI_SYSTAB ((efi_system_table_t *) *((unsigned long *)(PARAM+0x1c4))) 46#define EFI_SYSTAB ((efi_system_table_t *) *((unsigned long *)(PARAM+0x1c4)))
45#define EFI_MEMDESC_SIZE (*((unsigned long *) (PARAM+0x1c8))) 47#define EFI_MEMDESC_SIZE (*((unsigned long *) (PARAM+0x1c8)))
46#define EFI_MEMDESC_VERSION (*((unsigned long *) (PARAM+0x1cc))) 48#define EFI_MEMDESC_VERSION (*((unsigned long *) (PARAM+0x1cc)))
diff --git a/include/asm-x86_64/boot.h b/include/asm-x86_64/boot.h
index 96b228e6e79c..3c46cea8db7f 100644
--- a/include/asm-x86_64/boot.h
+++ b/include/asm-x86_64/boot.h
@@ -1,15 +1 @@
1#ifndef _LINUX_BOOT_H #include <asm-i386/boot.h>
2#define _LINUX_BOOT_H
3
4/* Don't touch these, unless you really know what you're doing. */
5#define DEF_INITSEG 0x9000
6#define DEF_SYSSEG 0x1000
7#define DEF_SETUPSEG 0x9020
8#define DEF_SYSSIZE 0x7F00
9
10/* Internal svga startup constants */
11#define NORMAL_VGA 0xffff /* 80x25 mode */
12#define EXTENDED_VGA 0xfffe /* 80x50 mode */
13#define ASK_VGA 0xfffd /* ask for it at bootup */
14
15#endif
diff --git a/include/asm-x86_64/bootparam.h b/include/asm-x86_64/bootparam.h
new file mode 100644
index 000000000000..aa82e5238d82
--- /dev/null
+++ b/include/asm-x86_64/bootparam.h
@@ -0,0 +1 @@
#include <asm-i386/bootparam.h>