diff options
| author | H. Peter Anvin <hpa@zytor.com> | 2007-10-15 20:13:22 -0400 |
|---|---|---|
| committer | H. Peter Anvin <hpa@zytor.com> | 2007-10-16 20:38:31 -0400 |
| commit | 30c826451d3e5bbc6e11bba0e7fee5d2f49d9b75 (patch) | |
| tree | 61abd11d1703673ff21227d42ed4b07d85dd0290 /include | |
| parent | 2b0460b534f383eca744eb8fff66ec9f57e702b9 (diff) | |
[x86] remove uses of magic macros for boot_params access
Instead of using magic macros for boot_params access, simply use the
boot_params structure.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-x86/Kbuild | 1 | ||||
| -rw-r--r-- | include/asm-x86/bootparam.h | 3 | ||||
| -rw-r--r-- | include/asm-x86/bootsetup.h | 40 | ||||
| -rw-r--r-- | include/asm-x86/setup_32.h | 29 | ||||
| -rw-r--r-- | include/asm-x86/setup_64.h | 13 |
5 files changed, 16 insertions, 70 deletions
diff --git a/include/asm-x86/Kbuild b/include/asm-x86/Kbuild index c5e43cb39874..80744dbcfafd 100644 --- a/include/asm-x86/Kbuild +++ b/include/asm-x86/Kbuild | |||
| @@ -1,7 +1,6 @@ | |||
| 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 += bootsetup.h | ||
| 5 | header-y += debugreg_32.h | 4 | header-y += debugreg_32.h |
| 6 | header-y += debugreg_64.h | 5 | header-y += debugreg_64.h |
| 7 | header-y += debugreg.h | 6 | header-y += debugreg.h |
diff --git a/include/asm-x86/bootparam.h b/include/asm-x86/bootparam.h index b91b01783e4b..ef67b59dbdb9 100644 --- a/include/asm-x86/bootparam.h +++ b/include/asm-x86/bootparam.h | |||
| @@ -14,6 +14,9 @@ struct setup_header { | |||
| 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 | ||
| 18 | #define RAMDISK_PROMPT_FLAG 0x8000 | ||
| 19 | #define RAMDISK_LOAD_FLAG 0x4000 | ||
| 17 | u16 vid_mode; | 20 | u16 vid_mode; |
| 18 | u16 root_dev; | 21 | u16 root_dev; |
| 19 | u16 boot_flag; | 22 | u16 boot_flag; |
diff --git a/include/asm-x86/bootsetup.h b/include/asm-x86/bootsetup.h deleted file mode 100644 index 7b1c3ad155fd..000000000000 --- a/include/asm-x86/bootsetup.h +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | |||
| 2 | #ifndef _X86_64_BOOTSETUP_H | ||
| 3 | #define _X86_64_BOOTSETUP_H 1 | ||
| 4 | |||
| 5 | #define BOOT_PARAM_SIZE 4096 | ||
| 6 | extern char x86_boot_params[BOOT_PARAM_SIZE]; | ||
| 7 | |||
| 8 | /* | ||
| 9 | * This is set up by the setup-routine at boot-time | ||
| 10 | */ | ||
| 11 | #define PARAM ((unsigned char *)x86_boot_params) | ||
| 12 | #define SCREEN_INFO (*(struct screen_info *) (PARAM+0)) | ||
| 13 | #define EXT_MEM_K (*(unsigned short *) (PARAM+2)) | ||
| 14 | #define ALT_MEM_K (*(unsigned int *) (PARAM+0x1e0)) | ||
| 15 | #define E820_MAP_NR (*(char*) (PARAM+E820NR)) | ||
| 16 | #define E820_MAP ((struct e820entry *) (PARAM+E820MAP)) | ||
| 17 | #define APM_BIOS_INFO (*(struct apm_bios_info *) (PARAM+0x40)) | ||
| 18 | #define DRIVE_INFO (*(struct drive_info_struct *) (PARAM+0x80)) | ||
| 19 | #define SYS_DESC_TABLE (*(struct sys_desc_table_struct*)(PARAM+0xa0)) | ||
| 20 | #define MOUNT_ROOT_RDONLY (*(unsigned short *) (PARAM+0x1F2)) | ||
| 21 | #define RAMDISK_FLAGS (*(unsigned short *) (PARAM+0x1F8)) | ||
| 22 | #define SAVED_VIDEO_MODE (*(unsigned short *) (PARAM+0x1FA)) | ||
| 23 | #define ORIG_ROOT_DEV (*(unsigned short *) (PARAM+0x1FC)) | ||
| 24 | #define AUX_DEVICE_INFO (*(unsigned char *) (PARAM+0x1FF)) | ||
| 25 | #define LOADER_TYPE (*(unsigned char *) (PARAM+0x210)) | ||
| 26 | #define KERNEL_START (*(unsigned int *) (PARAM+0x214)) | ||
| 27 | #define INITRD_START (*(unsigned int *) (PARAM+0x218)) | ||
| 28 | #define INITRD_SIZE (*(unsigned int *) (PARAM+0x21c)) | ||
| 29 | #define EDID_INFO (*(struct edid_info *) (PARAM+0x140)) | ||
| 30 | #define EDD_NR (*(unsigned char *) (PARAM+EDDNR)) | ||
| 31 | #define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF)) | ||
| 32 | #define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF)) | ||
| 33 | #define EDD_BUF ((struct edd_info *) (PARAM+EDDBUF)) | ||
| 34 | #define COMMAND_LINE boot_command_line | ||
| 35 | |||
| 36 | #define RAMDISK_IMAGE_START_MASK 0x07FF | ||
| 37 | #define RAMDISK_PROMPT_FLAG 0x8000 | ||
| 38 | #define RAMDISK_LOAD_FLAG 0x4000 | ||
| 39 | |||
| 40 | #endif | ||
diff --git a/include/asm-x86/setup_32.h b/include/asm-x86/setup_32.h index 7862fe858a9e..7a57ca8a1793 100644 --- a/include/asm-x86/setup_32.h +++ b/include/asm-x86/setup_32.h | |||
| @@ -34,35 +34,6 @@ | |||
| 34 | */ | 34 | */ |
| 35 | extern struct boot_params boot_params; | 35 | extern struct boot_params boot_params; |
| 36 | 36 | ||
| 37 | #define PARAM ((char *)&boot_params) | ||
| 38 | #define SCREEN_INFO (*(struct screen_info *) (PARAM+0)) | ||
| 39 | #define EXT_MEM_K (*(unsigned short *) (PARAM+2)) | ||
| 40 | #define ALT_MEM_K (*(unsigned long *) (PARAM+0x1e0)) | ||
| 41 | #define E820_MAP_NR (*(char*) (PARAM+E820NR)) | ||
| 42 | #define E820_MAP ((struct e820entry *) (PARAM+E820MAP)) | ||
| 43 | #define APM_BIOS_INFO (*(struct apm_bios_info *) (PARAM+0x40)) | ||
| 44 | #define IST_INFO (*(struct ist_info *) (PARAM+0x60)) | ||
| 45 | #define SYS_DESC_TABLE (*(struct sys_desc_table *)(PARAM+0xa0)) | ||
| 46 | #define EFI_SYSTAB ((efi_system_table_t *) *((unsigned long *)(PARAM+0x1c4))) | ||
| 47 | #define EFI_MEMDESC_SIZE (*((unsigned long *) (PARAM+0x1c8))) | ||
| 48 | #define EFI_MEMDESC_VERSION (*((unsigned long *) (PARAM+0x1cc))) | ||
| 49 | #define EFI_MEMMAP ((void *) *((unsigned long *)(PARAM+0x1d0))) | ||
| 50 | #define EFI_MEMMAP_SIZE (*((unsigned long *) (PARAM+0x1d4))) | ||
| 51 | #define MOUNT_ROOT_RDONLY (*(unsigned short *) (PARAM+0x1F2)) | ||
| 52 | #define RAMDISK_FLAGS (*(unsigned short *) (PARAM+0x1F8)) | ||
| 53 | #define VIDEO_MODE (*(unsigned short *) (PARAM+0x1FA)) | ||
| 54 | #define ORIG_ROOT_DEV (*(unsigned short *) (PARAM+0x1FC)) | ||
| 55 | #define AUX_DEVICE_INFO (*(unsigned char *) (PARAM+0x1FF)) | ||
| 56 | #define LOADER_TYPE (*(unsigned char *) (PARAM+0x210)) | ||
| 57 | #define KERNEL_START (*(unsigned long *) (PARAM+0x214)) | ||
| 58 | #define INITRD_START (*(unsigned long *) (PARAM+0x218)) | ||
| 59 | #define INITRD_SIZE (*(unsigned long *) (PARAM+0x21c)) | ||
| 60 | #define EDID_INFO (*(struct edid_info *) (PARAM+0x140)) | ||
| 61 | #define EDD_NR (*(unsigned char *) (PARAM+EDDNR)) | ||
| 62 | #define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF)) | ||
| 63 | #define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF)) | ||
| 64 | #define EDD_BUF ((struct edd_info *) (PARAM+EDDBUF)) | ||
| 65 | |||
| 66 | /* | 37 | /* |
| 67 | * Do NOT EVER look at the BIOS memory size location. | 38 | * Do NOT EVER look at the BIOS memory size location. |
| 68 | * It does not work on many machines. | 39 | * It does not work on many machines. |
diff --git a/include/asm-x86/setup_64.h b/include/asm-x86/setup_64.h index eaeff73d6c10..a04aadcccf67 100644 --- a/include/asm-x86/setup_64.h +++ b/include/asm-x86/setup_64.h | |||
| @@ -3,4 +3,17 @@ | |||
| 3 | 3 | ||
| 4 | #define COMMAND_LINE_SIZE 2048 | 4 | #define COMMAND_LINE_SIZE 2048 |
| 5 | 5 | ||
| 6 | #ifdef __KERNEL__ | ||
| 7 | |||
| 8 | #ifndef __ASSEMBLY__ | ||
| 9 | #include <asm/bootparam.h> | ||
| 10 | |||
| 11 | /* | ||
| 12 | * This is set up by the setup-routine at boot-time | ||
| 13 | */ | ||
| 14 | extern struct boot_params boot_params; | ||
| 15 | |||
| 16 | #endif /* not __ASSEMBLY__ */ | ||
| 17 | #endif /* __KERNEL__ */ | ||
| 18 | |||
| 6 | #endif | 19 | #endif |
