···159159 * Otherwise fake a memory map; one section from 0k->640k,160160 * the next section from 1mb->appropriate_mem_k161161 */162162- sanitize_e820_map(E820_MAP, &E820_MAP_NR);163163- if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) {162162+ sanitize_e820_map(boot_params.e820_map, &boot_params.e820_entries);163163+ if (copy_e820_map(boot_params.e820_map, boot_params.e820_entries)164164+ < 0) {164165 unsigned long mem_size;165166166167 /* compare results from other methods and take the greater */167167- if (ALT_MEM_K < EXT_MEM_K) {168168- mem_size = EXT_MEM_K;168168+ if (boot_params.alt_mem_k169169+ < boot_params.screen_info.ext_mem_k) {170170+ mem_size = boot_params.screen_info.ext_mem_k;169171 who = "BIOS-88";170172 } else {171171- mem_size = ALT_MEM_K;173173+ mem_size = boot_params.alt_mem_k;172174 who = "BIOS-e801";173175 }174176
+1-1
arch/x86/mach-visws/setup.c
···152152{153153 long long gfx_mem_size = 8 * MB;154154155155- mem_size = ALT_MEM_K;155155+ mem_size = boot_params.alt_mem_k;156156157157 if (!mem_size) {158158 printk(KERN_WARNING "Bootloader didn't set memory size, upgrade it !\n");
+8-6
arch/x86/mach-voyager/setup.c
···83838484 if(inb(catbase) != VOYAGER_DINO) {8585 printk(KERN_ERR "Voyager: Failed to get DINO for L4, setting tom to EXT_MEM_K\n");8686- tom = (EXT_MEM_K)<<10;8686+ tom = (boot_params.screen_info.ext_mem_k)<<10;8787 }8888 who = "Voyager-TOM";8989 add_memory_region(0, 0x9f000, E820_RAM);···104104 * Otherwise fake a memory map; one section from 0k->640k,105105 * the next section from 1mb->appropriate_mem_k106106 */107107- sanitize_e820_map(E820_MAP, &E820_MAP_NR);108108- if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) {107107+ sanitize_e820_map(boot_params.e820_map, &boot_params.e820_entries);108108+ if (copy_e820_map(boot_params.e820_map, boot_params.e820_entries)109109+ < 0) {109110 unsigned long mem_size;110111111112 /* compare results from other methods and take the greater */112112- if (ALT_MEM_K < EXT_MEM_K) {113113- mem_size = EXT_MEM_K;113113+ if (boot_params.alt_mem_k114114+ < boot_params.screen_info.ext_mem_k) {115115+ mem_size = boot_params.screen_info.ext_mem_k;114116 who = "BIOS-88";115117 } else {116116- mem_size = ALT_MEM_K;118118+ mem_size = boot_params.alt_mem_k;117119 who = "BIOS-e801";118120 }119121
+3-2
arch/x86/mm/discontig_32.c
···288288289289#ifdef CONFIG_BLK_DEV_INITRD290290 /* Numa kva area is below the initrd */291291- if (LOADER_TYPE && INITRD_START)292292- kva_start_pfn = PFN_DOWN(INITRD_START) - kva_pages;291291+ if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image)292292+ kva_start_pfn = PFN_DOWN(boot_params.hdr.ramdisk_image)293293+ - kva_pages;293294#endif294295 kva_start_pfn -= kva_start_pfn & (PTRS_PER_PTE-1);295296
···893893894894 /* The Linux bootloader header contains an "e820" memory map: the895895 * Launcher populated the first entry with our memory limit. */896896- add_memory_region(E820_MAP->addr, E820_MAP->size, E820_MAP->type);896896+ add_memory_region(boot_params.e820_map[0].addr,897897+ boot_params.e820_map[0].size,898898+ boot_params.e820_map[0].type);897899898900 /* This string is for the boot messages. */899901 return "LGUEST";
···11-22-#ifndef _X86_64_BOOTSETUP_H33-#define _X86_64_BOOTSETUP_H 144-55-#define BOOT_PARAM_SIZE 409666-extern char x86_boot_params[BOOT_PARAM_SIZE];77-88-/*99- * This is set up by the setup-routine at boot-time1010- */1111-#define PARAM ((unsigned char *)x86_boot_params)1212-#define SCREEN_INFO (*(struct screen_info *) (PARAM+0))1313-#define EXT_MEM_K (*(unsigned short *) (PARAM+2))1414-#define ALT_MEM_K (*(unsigned int *) (PARAM+0x1e0))1515-#define E820_MAP_NR (*(char*) (PARAM+E820NR))1616-#define E820_MAP ((struct e820entry *) (PARAM+E820MAP))1717-#define APM_BIOS_INFO (*(struct apm_bios_info *) (PARAM+0x40))1818-#define DRIVE_INFO (*(struct drive_info_struct *) (PARAM+0x80))1919-#define SYS_DESC_TABLE (*(struct sys_desc_table_struct*)(PARAM+0xa0))2020-#define MOUNT_ROOT_RDONLY (*(unsigned short *) (PARAM+0x1F2))2121-#define RAMDISK_FLAGS (*(unsigned short *) (PARAM+0x1F8))2222-#define SAVED_VIDEO_MODE (*(unsigned short *) (PARAM+0x1FA))2323-#define ORIG_ROOT_DEV (*(unsigned short *) (PARAM+0x1FC))2424-#define AUX_DEVICE_INFO (*(unsigned char *) (PARAM+0x1FF))2525-#define LOADER_TYPE (*(unsigned char *) (PARAM+0x210))2626-#define KERNEL_START (*(unsigned int *) (PARAM+0x214))2727-#define INITRD_START (*(unsigned int *) (PARAM+0x218))2828-#define INITRD_SIZE (*(unsigned int *) (PARAM+0x21c))2929-#define EDID_INFO (*(struct edid_info *) (PARAM+0x140))3030-#define EDD_NR (*(unsigned char *) (PARAM+EDDNR))3131-#define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF))3232-#define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF))3333-#define EDD_BUF ((struct edd_info *) (PARAM+EDDBUF))3434-#define COMMAND_LINE boot_command_line3535-3636-#define RAMDISK_IMAGE_START_MASK 0x07FF3737-#define RAMDISK_PROMPT_FLAG 0x80003838-#define RAMDISK_LOAD_FLAG 0x4000 3939-4040-#endif
-29
include/asm-x86/setup_32.h
···3434 */3535extern struct boot_params boot_params;36363737-#define PARAM ((char *)&boot_params)3838-#define SCREEN_INFO (*(struct screen_info *) (PARAM+0))3939-#define EXT_MEM_K (*(unsigned short *) (PARAM+2))4040-#define ALT_MEM_K (*(unsigned long *) (PARAM+0x1e0))4141-#define E820_MAP_NR (*(char*) (PARAM+E820NR))4242-#define E820_MAP ((struct e820entry *) (PARAM+E820MAP))4343-#define APM_BIOS_INFO (*(struct apm_bios_info *) (PARAM+0x40))4444-#define IST_INFO (*(struct ist_info *) (PARAM+0x60))4545-#define SYS_DESC_TABLE (*(struct sys_desc_table *)(PARAM+0xa0))4646-#define EFI_SYSTAB ((efi_system_table_t *) *((unsigned long *)(PARAM+0x1c4)))4747-#define EFI_MEMDESC_SIZE (*((unsigned long *) (PARAM+0x1c8)))4848-#define EFI_MEMDESC_VERSION (*((unsigned long *) (PARAM+0x1cc)))4949-#define EFI_MEMMAP ((void *) *((unsigned long *)(PARAM+0x1d0)))5050-#define EFI_MEMMAP_SIZE (*((unsigned long *) (PARAM+0x1d4)))5151-#define MOUNT_ROOT_RDONLY (*(unsigned short *) (PARAM+0x1F2))5252-#define RAMDISK_FLAGS (*(unsigned short *) (PARAM+0x1F8))5353-#define VIDEO_MODE (*(unsigned short *) (PARAM+0x1FA))5454-#define ORIG_ROOT_DEV (*(unsigned short *) (PARAM+0x1FC))5555-#define AUX_DEVICE_INFO (*(unsigned char *) (PARAM+0x1FF))5656-#define LOADER_TYPE (*(unsigned char *) (PARAM+0x210))5757-#define KERNEL_START (*(unsigned long *) (PARAM+0x214))5858-#define INITRD_START (*(unsigned long *) (PARAM+0x218))5959-#define INITRD_SIZE (*(unsigned long *) (PARAM+0x21c))6060-#define EDID_INFO (*(struct edid_info *) (PARAM+0x140))6161-#define EDD_NR (*(unsigned char *) (PARAM+EDDNR))6262-#define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF))6363-#define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF))6464-#define EDD_BUF ((struct edd_info *) (PARAM+EDDBUF))6565-6637/*6738 * Do NOT EVER look at the BIOS memory size location.6839 * It does not work on many machines.
+13
include/asm-x86/setup_64.h
···3344#define COMMAND_LINE_SIZE 20485566+#ifdef __KERNEL__77+88+#ifndef __ASSEMBLY__99+#include <asm/bootparam.h>1010+1111+/*1212+ * This is set up by the setup-routine at boot-time1313+ */1414+extern struct boot_params boot_params;1515+1616+#endif /* not __ASSEMBLY__ */1717+#endif /* __KERNEL__ */1818+619#endif