diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-07-11 15:18:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-12 13:55:54 -0400 |
commit | 48c7ae674f03e56c78ff42c6796a36e90db67874 (patch) | |
tree | ecca581aa246142ac4b9ea4f3960cc7817bb3c48 /include/asm-i386 | |
parent | 9c25d134b3735a4b197e108b4c7d6bbec1a275e8 (diff) |
Make struct boot_params a real structure, and remove obsolete fields
Make struct boot_params a real structure, and remove the handling of
some obsolete fields, in particular hd*_info, which was only used by
the ST-506 driver, and likely to be wrong for that driver on any
modern BIOS.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-i386')
-rw-r--r-- | include/asm-i386/bootparam.h | 85 | ||||
-rw-r--r-- | include/asm-i386/setup.h | 10 |
2 files changed, 91 insertions, 4 deletions
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 | |||
11 | struct 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 | |||
42 | struct sys_desc_table { | ||
43 | u16 length; | ||
44 | u8 table[14]; | ||
45 | }; | ||
46 | |||
47 | struct 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" */ | ||
58 | struct 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 | */ |
32 | extern unsigned char boot_params[PARAM_SIZE]; | 35 | extern 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))) |