Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

+139 -185
+1
arch/x86/boot/Makefile
··· 39 39 setup-y += video-vga.o 40 40 setup-y += video-vesa.o 41 41 setup-y += video-bios.o 42 + 42 43 targets += $(setup-y) 43 44 hostprogs-y := tools/build 44 45
+12 -7
arch/x86/kernel/e820_64.c
··· 24 24 #include <asm/page.h> 25 25 #include <asm/e820.h> 26 26 #include <asm/proto.h> 27 - #include <asm/bootsetup.h> 27 + #include <asm/setup.h> 28 28 #include <asm/sections.h> 29 29 30 30 struct e820map e820; ··· 68 68 69 69 /* initrd */ 70 70 #ifdef CONFIG_BLK_DEV_INITRD 71 - if (LOADER_TYPE && INITRD_START && last >= INITRD_START && 72 - addr < INITRD_START+INITRD_SIZE) { 73 - *addrp = PAGE_ALIGN(INITRD_START + INITRD_SIZE); 74 - return 1; 71 + if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) { 72 + unsigned long ramdisk_image = boot_params.hdr.ramdisk_image; 73 + unsigned long ramdisk_size = boot_params.hdr.ramdisk_size; 74 + unsigned long ramdisk_end = ramdisk_image+ramdisk_size; 75 + 76 + if (last >= ramdisk_image && addr < ramdisk_end) { 77 + *addrp = PAGE_ALIGN(ramdisk_end); 78 + return 1; 79 + } 75 80 } 76 81 #endif 77 82 /* kernel code */ ··· 599 594 * Otherwise fake a memory map; one section from 0k->640k, 600 595 * the next section from 1mb->appropriate_mem_k 601 596 */ 602 - sanitize_e820_map(E820_MAP, &E820_MAP_NR); 603 - if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) 597 + sanitize_e820_map(boot_params.e820_map, &boot_params.e820_entries); 598 + if (copy_e820_map(boot_params.e820_map, boot_params.e820_entries) < 0) 604 599 early_panic("Cannot find a valid memory map"); 605 600 printk(KERN_INFO "BIOS-provided physical RAM map:\n"); 606 601 e820_print_map("BIOS-e820");
+5 -10
arch/x86/kernel/early_printk.c
··· 6 6 #include <asm/io.h> 7 7 #include <asm/processor.h> 8 8 #include <asm/fcntl.h> 9 + #include <asm/setup.h> 9 10 #include <xen/hvc-console.h> 10 11 11 12 /* Simple VGA output */ 12 - 13 - #ifdef __i386__ 14 - #include <asm/setup.h> 15 - #else 16 - #include <asm/bootsetup.h> 17 - #endif 18 13 #define VGABASE (__ISA_IO_base + 0xb8000) 19 14 20 15 static int max_ypos = 25, max_xpos = 80; ··· 229 234 early_serial_init(buf); 230 235 early_console = &early_serial_console; 231 236 } else if (!strncmp(buf, "vga", 3) 232 - && SCREEN_INFO.orig_video_isVGA == 1) { 233 - max_xpos = SCREEN_INFO.orig_video_cols; 234 - max_ypos = SCREEN_INFO.orig_video_lines; 235 - current_ypos = SCREEN_INFO.orig_y; 237 + && boot_params.screen_info.orig_video_isVGA == 1) { 238 + max_xpos = boot_params.screen_info.orig_video_cols; 239 + max_ypos = boot_params.screen_info.orig_video_lines; 240 + current_ypos = boot_params.screen_info.orig_y; 236 241 early_console = &early_vga_console; 237 242 } else if (!strncmp(buf, "simnow", 6)) { 238 243 simnow_init(buf + 6);
+9 -6
arch/x86/kernel/efi_32.c
··· 331 331 memset(&efi, 0, sizeof(efi) ); 332 332 memset(&efi_phys, 0, sizeof(efi_phys)); 333 333 334 - efi_phys.systab = EFI_SYSTAB; 335 - memmap.phys_map = EFI_MEMMAP; 336 - memmap.nr_map = EFI_MEMMAP_SIZE/EFI_MEMDESC_SIZE; 337 - memmap.desc_version = EFI_MEMDESC_VERSION; 338 - memmap.desc_size = EFI_MEMDESC_SIZE; 334 + efi_phys.systab = 335 + (efi_system_table_t *)boot_params.efi_info.efi_systab; 336 + memmap.phys_map = (void *)boot_params.efi_info.efi_memmap; 337 + memmap.nr_map = boot_params.efi_info.efi_memmap_size/ 338 + boot_params.efi_info.efi_memdesc_size; 339 + memmap.desc_version = boot_params.efi_info.efi_memdesc_version; 340 + memmap.desc_size = boot_params.efi_info.efi_memdesc_size; 339 341 340 342 efi.systab = (efi_system_table_t *) 341 343 boot_ioremap((unsigned long) efi_phys.systab, ··· 448 446 printk(KERN_ERR PFX "Could not map the runtime service table!\n"); 449 447 450 448 /* Map the EFI memory map for use until paging_init() */ 451 - memmap.map = boot_ioremap((unsigned long) EFI_MEMMAP, EFI_MEMMAP_SIZE); 449 + memmap.map = boot_ioremap(boot_params.efi_info.efi_memmap, 450 + boot_params.efi_info.efi_memmap_size); 452 451 if (memmap.map == NULL) 453 452 printk(KERN_ERR PFX "Could not map the EFI memory map!\n"); 454 453
+4 -16
arch/x86/kernel/head64.c
··· 14 14 #include <asm/processor.h> 15 15 #include <asm/proto.h> 16 16 #include <asm/smp.h> 17 - #include <asm/bootsetup.h> 18 17 #include <asm/setup.h> 19 18 #include <asm/desc.h> 20 19 #include <asm/pgtable.h> ··· 35 36 (unsigned long) __bss_stop - (unsigned long) __bss_start); 36 37 } 37 38 38 - #define NEW_CL_POINTER 0x228 /* Relative to real mode data */ 39 - #define OLD_CL_MAGIC_ADDR 0x20 40 - #define OLD_CL_MAGIC 0xA33F 41 - #define OLD_CL_OFFSET 0x22 42 - 43 39 static void __init copy_bootdata(char *real_mode_data) 44 40 { 45 - unsigned long new_data; 46 41 char * command_line; 47 42 48 - memcpy(x86_boot_params, real_mode_data, BOOT_PARAM_SIZE); 49 - new_data = *(u32 *) (x86_boot_params + NEW_CL_POINTER); 50 - if (!new_data) { 51 - if (OLD_CL_MAGIC != *(u16 *)(real_mode_data + OLD_CL_MAGIC_ADDR)) { 52 - return; 53 - } 54 - new_data = __pa(real_mode_data) + *(u16 *)(real_mode_data + OLD_CL_OFFSET); 43 + memcpy(&boot_params, real_mode_data, sizeof boot_params); 44 + if (boot_params.hdr.cmd_line_ptr) { 45 + command_line = __va(boot_params.hdr.cmd_line_ptr); 46 + memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); 55 47 } 56 - command_line = __va(new_data); 57 - memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); 58 48 } 59 49 60 50 void __init x86_64_start_kernel(char * real_mode_data)
+2 -2
arch/x86/kernel/setup64.c
··· 11 11 #include <linux/bootmem.h> 12 12 #include <linux/bitops.h> 13 13 #include <linux/module.h> 14 - #include <asm/bootsetup.h> 15 14 #include <asm/pda.h> 16 15 #include <asm/pgtable.h> 17 16 #include <asm/processor.h> ··· 22 23 #include <asm/percpu.h> 23 24 #include <asm/proto.h> 24 25 #include <asm/sections.h> 26 + #include <asm/setup.h> 25 27 26 - char x86_boot_params[BOOT_PARAM_SIZE] __initdata; 28 + struct boot_params __initdata boot_params; 27 29 28 30 cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE; 29 31
+36 -31
arch/x86/kernel/setup_32.c
··· 137 137 */ 138 138 static inline void copy_edd(void) 139 139 { 140 - memcpy(edd.mbr_signature, EDD_MBR_SIGNATURE, sizeof(edd.mbr_signature)); 141 - memcpy(edd.edd_info, EDD_BUF, sizeof(edd.edd_info)); 142 - edd.mbr_signature_nr = EDD_MBR_SIG_NR; 143 - edd.edd_info_nr = EDD_NR; 140 + memcpy(edd.mbr_signature, boot_params.edd_mbr_sig_buffer, 141 + sizeof(edd.mbr_signature)); 142 + memcpy(edd.edd_info, boot_params.eddbuf, sizeof(edd.edd_info)); 143 + edd.mbr_signature_nr = boot_params.edd_mbr_sig_buf_entries; 144 + edd.edd_info_nr = boot_params.eddbuf_entries; 144 145 } 145 146 #else 146 147 static inline void copy_edd(void) ··· 435 434 #endif 436 435 numa_kva_reserve(); 437 436 #ifdef CONFIG_BLK_DEV_INITRD 438 - if (LOADER_TYPE && INITRD_START) { 439 - if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) { 440 - reserve_bootmem(INITRD_START, INITRD_SIZE); 441 - initrd_start = INITRD_START + PAGE_OFFSET; 442 - initrd_end = initrd_start+INITRD_SIZE; 443 - } 444 - else { 437 + if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) { 438 + unsigned long ramdisk_image = boot_params.hdr.ramdisk_image; 439 + unsigned long ramdisk_size = boot_params.hdr.ramdisk_size; 440 + unsigned long ramdisk_end = ramdisk_image + ramdisk_size; 441 + unsigned long end_of_lowmem = max_low_pfn << PAGE_SHIFT; 442 + 443 + if (ramdisk_end <= end_of_lowmem) { 444 + reserve_bootmem(ramdisk_image, ramdisk_size); 445 + initrd_start = ramdisk_image + PAGE_OFFSET; 446 + initrd_end = initrd_start+ramdisk_size; 447 + } else { 445 448 printk(KERN_ERR "initrd extends beyond end of memory " 446 - "(0x%08lx > 0x%08lx)\ndisabling initrd\n", 447 - INITRD_START + INITRD_SIZE, 448 - max_low_pfn << PAGE_SHIFT); 449 + "(0x%08lx > 0x%08lx)\ndisabling initrd\n", 450 + ramdisk_end, end_of_lowmem); 449 451 initrd_start = 0; 450 452 } 451 453 } ··· 516 512 * the system table is valid. If not, then initialize normally. 517 513 */ 518 514 #ifdef CONFIG_EFI 519 - if ((LOADER_TYPE == 0x50) && EFI_SYSTAB) 515 + if ((boot_params.hdr.type_of_loader == 0x50) && 516 + boot_params.efi_info.efi_systab) 520 517 efi_enabled = 1; 521 518 #endif 522 519 523 - ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); 524 - screen_info = SCREEN_INFO; 525 - edid_info = EDID_INFO; 526 - apm_info.bios = APM_BIOS_INFO; 527 - ist_info = IST_INFO; 528 - saved_videomode = VIDEO_MODE; 529 - if( SYS_DESC_TABLE.length != 0 ) { 530 - set_mca_bus(SYS_DESC_TABLE.table[3] & 0x2); 531 - machine_id = SYS_DESC_TABLE.table[0]; 532 - machine_submodel_id = SYS_DESC_TABLE.table[1]; 533 - BIOS_revision = SYS_DESC_TABLE.table[2]; 520 + ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev); 521 + screen_info = boot_params.screen_info; 522 + edid_info = boot_params.edid_info; 523 + apm_info.bios = boot_params.apm_bios_info; 524 + ist_info = boot_params.ist_info; 525 + saved_videomode = boot_params.hdr.vid_mode; 526 + if( boot_params.sys_desc_table.length != 0 ) { 527 + set_mca_bus(boot_params.sys_desc_table.table[3] & 0x2); 528 + machine_id = boot_params.sys_desc_table.table[0]; 529 + machine_submodel_id = boot_params.sys_desc_table.table[1]; 530 + BIOS_revision = boot_params.sys_desc_table.table[2]; 534 531 } 535 - bootloader_type = LOADER_TYPE; 532 + bootloader_type = boot_params.hdr.type_of_loader; 536 533 537 534 #ifdef CONFIG_BLK_DEV_RAM 538 - rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK; 539 - rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0); 540 - rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0); 535 + rd_image_start = boot_params.hdr.ram_size & RAMDISK_IMAGE_START_MASK; 536 + rd_prompt = ((boot_params.hdr.ram_size & RAMDISK_PROMPT_FLAG) != 0); 537 + rd_doload = ((boot_params.hdr.ram_size & RAMDISK_LOAD_FLAG) != 0); 541 538 #endif 542 539 ARCH_SETUP 543 540 if (efi_enabled) ··· 550 545 551 546 copy_edd(); 552 547 553 - if (!MOUNT_ROOT_RDONLY) 548 + if (!boot_params.hdr.root_flags) 554 549 root_mountflags &= ~MS_RDONLY; 555 550 init_mm.start_code = (unsigned long) _text; 556 551 init_mm.end_code = (unsigned long) _etext;
+27 -24
arch/x86/kernel/setup_64.c
··· 52 52 #include <asm/dma.h> 53 53 #include <asm/mpspec.h> 54 54 #include <asm/mmu_context.h> 55 - #include <asm/bootsetup.h> 56 55 #include <asm/proto.h> 57 56 #include <asm/setup.h> 58 57 #include <asm/mach_apic.h> ··· 179 180 */ 180 181 static inline void copy_edd(void) 181 182 { 182 - memcpy(edd.mbr_signature, EDD_MBR_SIGNATURE, sizeof(edd.mbr_signature)); 183 - memcpy(edd.edd_info, EDD_BUF, sizeof(edd.edd_info)); 184 - edd.mbr_signature_nr = EDD_MBR_SIG_NR; 185 - edd.edd_info_nr = EDD_NR; 183 + memcpy(edd.mbr_signature, boot_params.edd_mbr_sig_buffer, 184 + sizeof(edd.mbr_signature)); 185 + memcpy(edd.edd_info, boot_params.eddbuf, sizeof(edd.edd_info)); 186 + edd.mbr_signature_nr = boot_params.edd_mbr_sig_buf_entries; 187 + edd.edd_info_nr = boot_params.eddbuf_entries; 186 188 } 187 189 #else 188 190 static inline void copy_edd(void) ··· 220 220 { 221 221 printk(KERN_INFO "Command line: %s\n", boot_command_line); 222 222 223 - ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); 224 - screen_info = SCREEN_INFO; 225 - edid_info = EDID_INFO; 226 - saved_video_mode = SAVED_VIDEO_MODE; 227 - bootloader_type = LOADER_TYPE; 223 + ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev); 224 + screen_info = boot_params.screen_info; 225 + edid_info = boot_params.edid_info; 226 + saved_video_mode = boot_params.hdr.vid_mode; 227 + bootloader_type = boot_params.hdr.type_of_loader; 228 228 229 229 #ifdef CONFIG_BLK_DEV_RAM 230 - rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK; 231 - rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0); 232 - rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0); 230 + rd_image_start = boot_params.hdr.ram_size & RAMDISK_IMAGE_START_MASK; 231 + rd_prompt = ((boot_params.hdr.ram_size & RAMDISK_PROMPT_FLAG) != 0); 232 + rd_doload = ((boot_params.hdr.ram_size & RAMDISK_LOAD_FLAG) != 0); 233 233 #endif 234 234 setup_memory_region(); 235 235 copy_edd(); 236 236 237 - if (!MOUNT_ROOT_RDONLY) 237 + if (!boot_params.hdr.root_flags) 238 238 root_mountflags &= ~MS_RDONLY; 239 239 init_mm.start_code = (unsigned long) &_text; 240 240 init_mm.end_code = (unsigned long) &_etext; ··· 339 339 */ 340 340 find_smp_config(); 341 341 #ifdef CONFIG_BLK_DEV_INITRD 342 - if (LOADER_TYPE && INITRD_START) { 343 - if (INITRD_START + INITRD_SIZE <= (end_pfn << PAGE_SHIFT)) { 344 - reserve_bootmem_generic(INITRD_START, INITRD_SIZE); 345 - initrd_start = INITRD_START + PAGE_OFFSET; 346 - initrd_end = initrd_start+INITRD_SIZE; 347 - } 348 - else { 342 + if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) { 343 + unsigned long ramdisk_image = boot_params.hdr.ramdisk_image; 344 + unsigned long ramdisk_size = boot_params.hdr.ramdisk_size; 345 + unsigned long ramdisk_end = ramdisk_image + ramdisk_size; 346 + unsigned long end_of_mem = end_pfn << PAGE_SHIFT; 347 + 348 + if (ramdisk_end <= end_of_mem) { 349 + reserve_bootmem_generic(ramdisk_image, ramdisk_size); 350 + initrd_start = ramdisk_image + PAGE_OFFSET; 351 + initrd_end = initrd_start+ramdisk_size; 352 + } else { 349 353 printk(KERN_ERR "initrd extends beyond end of memory " 350 - "(0x%08lx > 0x%08lx)\ndisabling initrd\n", 351 - (unsigned long)(INITRD_START + INITRD_SIZE), 352 - (unsigned long)(end_pfn << PAGE_SHIFT)); 354 + "(0x%08lx > 0x%08lx)\ndisabling initrd\n", 355 + ramdisk_end, end_of_mem); 353 356 initrd_start = 0; 354 357 } 355 358 }
+7 -5
arch/x86/mach-default/setup.c
··· 159 159 * Otherwise fake a memory map; one section from 0k->640k, 160 160 * the next section from 1mb->appropriate_mem_k 161 161 */ 162 - sanitize_e820_map(E820_MAP, &E820_MAP_NR); 163 - if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) { 162 + sanitize_e820_map(boot_params.e820_map, &boot_params.e820_entries); 163 + if (copy_e820_map(boot_params.e820_map, boot_params.e820_entries) 164 + < 0) { 164 165 unsigned long mem_size; 165 166 166 167 /* compare results from other methods and take the greater */ 167 - if (ALT_MEM_K < EXT_MEM_K) { 168 - mem_size = EXT_MEM_K; 168 + if (boot_params.alt_mem_k 169 + < boot_params.screen_info.ext_mem_k) { 170 + mem_size = boot_params.screen_info.ext_mem_k; 169 171 who = "BIOS-88"; 170 172 } else { 171 - mem_size = ALT_MEM_K; 173 + mem_size = boot_params.alt_mem_k; 172 174 who = "BIOS-e801"; 173 175 } 174 176
+1 -1
arch/x86/mach-visws/setup.c
··· 152 152 { 153 153 long long gfx_mem_size = 8 * MB; 154 154 155 - mem_size = ALT_MEM_K; 155 + mem_size = boot_params.alt_mem_k; 156 156 157 157 if (!mem_size) { 158 158 printk(KERN_WARNING "Bootloader didn't set memory size, upgrade it !\n");
+8 -6
arch/x86/mach-voyager/setup.c
··· 83 83 84 84 if(inb(catbase) != VOYAGER_DINO) { 85 85 printk(KERN_ERR "Voyager: Failed to get DINO for L4, setting tom to EXT_MEM_K\n"); 86 - tom = (EXT_MEM_K)<<10; 86 + tom = (boot_params.screen_info.ext_mem_k)<<10; 87 87 } 88 88 who = "Voyager-TOM"; 89 89 add_memory_region(0, 0x9f000, E820_RAM); ··· 104 104 * Otherwise fake a memory map; one section from 0k->640k, 105 105 * the next section from 1mb->appropriate_mem_k 106 106 */ 107 - sanitize_e820_map(E820_MAP, &E820_MAP_NR); 108 - if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) { 107 + sanitize_e820_map(boot_params.e820_map, &boot_params.e820_entries); 108 + if (copy_e820_map(boot_params.e820_map, boot_params.e820_entries) 109 + < 0) { 109 110 unsigned long mem_size; 110 111 111 112 /* compare results from other methods and take the greater */ 112 - if (ALT_MEM_K < EXT_MEM_K) { 113 - mem_size = EXT_MEM_K; 113 + if (boot_params.alt_mem_k 114 + < boot_params.screen_info.ext_mem_k) { 115 + mem_size = boot_params.screen_info.ext_mem_k; 114 116 who = "BIOS-88"; 115 117 } else { 116 - mem_size = ALT_MEM_K; 118 + mem_size = boot_params.alt_mem_k; 117 119 who = "BIOS-e801"; 118 120 } 119 121
+3 -2
arch/x86/mm/discontig_32.c
··· 288 288 289 289 #ifdef CONFIG_BLK_DEV_INITRD 290 290 /* Numa kva area is below the initrd */ 291 - if (LOADER_TYPE && INITRD_START) 292 - kva_start_pfn = PFN_DOWN(INITRD_START) - kva_pages; 291 + if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) 292 + kva_start_pfn = PFN_DOWN(boot_params.hdr.ramdisk_image) 293 + - kva_pages; 293 294 #endif 294 295 kva_start_pfn -= kva_start_pfn & (PTRS_PER_PTE-1); 295 296
+4 -3
arch/x86/xen/enlighten.c
··· 1137 1137 new_cpu_data.x86_capability[0] = cpuid_edx(1); 1138 1138 1139 1139 /* Poke various useful things into boot_params */ 1140 - LOADER_TYPE = (9 << 4) | 0; 1141 - INITRD_START = xen_start_info->mod_start ? __pa(xen_start_info->mod_start) : 0; 1142 - INITRD_SIZE = xen_start_info->mod_len; 1140 + boot_params.hdr.type_of_loader = (9 << 4) | 0; 1141 + boot_params.hdr.ramdisk_image = xen_start_info->mod_start 1142 + ? __pa(xen_start_info->mod_start) : 0; 1143 + boot_params.hdr.ramdisk_size = xen_start_info->mod_len; 1143 1144 1144 1145 /* Start the world */ 1145 1146 start_kernel();
+3 -1
drivers/lguest/lguest.c
··· 893 893 894 894 /* The Linux bootloader header contains an "e820" memory map: the 895 895 * Launcher populated the first entry with our memory limit. */ 896 - add_memory_region(E820_MAP->addr, E820_MAP->size, E820_MAP->type); 896 + add_memory_region(boot_params.e820_map[0].addr, 897 + boot_params.e820_map[0].size, 898 + boot_params.e820_map[0].type); 897 899 898 900 /* This string is for the boot messages. */ 899 901 return "LGUEST";
+1 -1
drivers/video/console/vgacon.c
··· 372 372 #endif 373 373 } 374 374 375 - /* SCREEN_INFO initialized? */ 375 + /* boot_params.screen_info initialized? */ 376 376 if ((ORIG_VIDEO_MODE == 0) && 377 377 (ORIG_VIDEO_LINES == 0) && 378 378 (ORIG_VIDEO_COLS == 0))
-1
include/asm-x86/Kbuild
··· 1 1 include include/asm-generic/Kbuild.asm 2 2 3 3 header-y += boot.h 4 - header-y += bootsetup.h 5 4 header-y += debugreg_32.h 6 5 header-y += debugreg_64.h 7 6 header-y += debugreg.h
+3
include/asm-x86/bootparam.h
··· 14 14 u16 root_flags; 15 15 u32 syssize; 16 16 u16 ram_size; 17 + #define RAMDISK_IMAGE_START_MASK 0x07FF 18 + #define RAMDISK_PROMPT_FLAG 0x8000 19 + #define RAMDISK_LOAD_FLAG 0x4000 17 20 u16 vid_mode; 18 21 u16 root_dev; 19 22 u16 boot_flag;
-40
include/asm-x86/bootsetup.h
··· 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
-29
include/asm-x86/setup_32.h
··· 34 34 */ 35 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 38 * Do NOT EVER look at the BIOS memory size location. 68 39 * It does not work on many machines.
+13
include/asm-x86/setup_64.h
··· 3 3 4 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 19 #endif