setup.c (c18f65816ef80b67eb4511ed8359c2dfcd69680d) | setup.c (4cd9d6f774c7e0578bbc4409d4490d8f2097d40a) |
---|---|
1/* 2 * linux/arch/arm/kernel/setup.c 3 * 4 * Copyright (C) 1995-2001 Russell King 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 10 unchanged lines hidden (view full) --- 19#include <linux/seq_file.h> 20#include <linux/screen_info.h> 21#include <linux/init.h> 22#include <linux/root_dev.h> 23#include <linux/cpu.h> 24#include <linux/interrupt.h> 25#include <linux/smp.h> 26#include <linux/fs.h> | 1/* 2 * linux/arch/arm/kernel/setup.c 3 * 4 * Copyright (C) 1995-2001 Russell King 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 10 unchanged lines hidden (view full) --- 19#include <linux/seq_file.h> 20#include <linux/screen_info.h> 21#include <linux/init.h> 22#include <linux/root_dev.h> 23#include <linux/cpu.h> 24#include <linux/interrupt.h> 25#include <linux/smp.h> 26#include <linux/fs.h> |
27#include <linux/kexec.h> | |
28 29#include <asm/cpu.h> 30#include <asm/elf.h> 31#include <asm/procinfo.h> 32#include <asm/setup.h> 33#include <asm/mach-types.h> 34#include <asm/cacheflush.h> 35#include <asm/tlbflush.h> 36 37#include <asm/mach/arch.h> 38#include <asm/mach/irq.h> 39#include <asm/mach/time.h> 40 41#include "compat.h" | 27 28#include <asm/cpu.h> 29#include <asm/elf.h> 30#include <asm/procinfo.h> 31#include <asm/setup.h> 32#include <asm/mach-types.h> 33#include <asm/cacheflush.h> 34#include <asm/tlbflush.h> 35 36#include <asm/mach/arch.h> 37#include <asm/mach/irq.h> 38#include <asm/mach/time.h> 39 40#include "compat.h" |
41#include "atags.h" |
|
42 43#ifndef MEM_SIZE 44#define MEM_SIZE (16*1024*1024) 45#endif 46 47#if defined(CONFIG_FPE_NWFPE) || defined(CONFIG_FPE_FASTFPE) 48char fpe_type[8]; 49 --- 7 unchanged lines hidden (view full) --- 57#endif 58 59extern void paging_init(struct meminfo *, struct machine_desc *desc); 60extern void reboot_setup(char *str); 61extern int root_mountflags; 62extern void _stext, _text, _etext, __data_start, _edata, _end; 63 64unsigned int processor_id; | 42 43#ifndef MEM_SIZE 44#define MEM_SIZE (16*1024*1024) 45#endif 46 47#if defined(CONFIG_FPE_NWFPE) || defined(CONFIG_FPE_FASTFPE) 48char fpe_type[8]; 49 --- 7 unchanged lines hidden (view full) --- 57#endif 58 59extern void paging_init(struct meminfo *, struct machine_desc *desc); 60extern void reboot_setup(char *str); 61extern int root_mountflags; 62extern void _stext, _text, _etext, __data_start, _edata, _end; 63 64unsigned int processor_id; |
65EXPORT_SYMBOL(processor_id); | |
66unsigned int __machine_arch_type; 67EXPORT_SYMBOL(__machine_arch_type); 68 69unsigned int __atags_pointer __initdata; 70 71unsigned int system_rev; 72EXPORT_SYMBOL(system_rev); 73 --- 706 unchanged lines hidden (view full) --- 780{ 781 /* customizes platform devices, or adds new ones */ 782 if (init_machine) 783 init_machine(); 784 return 0; 785} 786arch_initcall(customize_machine); 787 | 65unsigned int __machine_arch_type; 66EXPORT_SYMBOL(__machine_arch_type); 67 68unsigned int __atags_pointer __initdata; 69 70unsigned int system_rev; 71EXPORT_SYMBOL(system_rev); 72 --- 706 unchanged lines hidden (view full) --- 779{ 780 /* customizes platform devices, or adds new ones */ 781 if (init_machine) 782 init_machine(); 783 return 0; 784} 785arch_initcall(customize_machine); 786 |
788#ifdef CONFIG_KEXEC 789 790/* Physical addr of where the boot params should be for this machine */ 791extern unsigned long kexec_boot_params_address; 792 793/* Physical addr of the buffer into which the boot params are copied */ 794extern unsigned long kexec_boot_params_copy; 795 796/* Pointer to the boot params buffer, for manipulation and display */ 797unsigned long kexec_boot_params; 798EXPORT_SYMBOL(kexec_boot_params); 799 800/* The buffer itself - make sure it is sized correctly */ 801static unsigned long kexec_boot_params_buf[(KEXEC_BOOT_PARAMS_SIZE + 3) / 4]; 802 803#endif 804 | |
805void __init setup_arch(char **cmdline_p) 806{ 807 struct tag *tags = (struct tag *)&init_tags; 808 struct machine_desc *mdesc; 809 char *from = default_command_line; 810 811 setup_processor(); 812 mdesc = setup_machine(machine_arch_type); 813 machine_name = mdesc->name; 814 815 if (mdesc->soft_reboot) 816 reboot_setup("s"); 817 818 if (__atags_pointer) 819 tags = phys_to_virt(__atags_pointer); 820 else if (mdesc->boot_params) 821 tags = phys_to_virt(mdesc->boot_params); 822 | 787void __init setup_arch(char **cmdline_p) 788{ 789 struct tag *tags = (struct tag *)&init_tags; 790 struct machine_desc *mdesc; 791 char *from = default_command_line; 792 793 setup_processor(); 794 mdesc = setup_machine(machine_arch_type); 795 machine_name = mdesc->name; 796 797 if (mdesc->soft_reboot) 798 reboot_setup("s"); 799 800 if (__atags_pointer) 801 tags = phys_to_virt(__atags_pointer); 802 else if (mdesc->boot_params) 803 tags = phys_to_virt(mdesc->boot_params); 804 |
823#ifdef CONFIG_KEXEC 824 kexec_boot_params_copy = virt_to_phys(kexec_boot_params_buf); 825 kexec_boot_params = (unsigned long)kexec_boot_params_buf; 826 if (__atags_pointer) { 827 kexec_boot_params_address = __atags_pointer; 828 memcpy((void *)kexec_boot_params, tags, KEXEC_BOOT_PARAMS_SIZE); 829 } else if (mdesc->boot_params) { 830 kexec_boot_params_address = mdesc->boot_params; 831 memcpy((void *)kexec_boot_params, tags, KEXEC_BOOT_PARAMS_SIZE); 832 } 833#endif 834 | |
835 /* 836 * If we have the old style parameters, convert them to 837 * a tag list. 838 */ 839 if (tags->hdr.tag != ATAG_CORE) 840 convert_to_tag_list(tags); 841 if (tags->hdr.tag != ATAG_CORE) 842 tags = (struct tag *)&init_tags; 843 844 if (mdesc->fixup) 845 mdesc->fixup(mdesc, tags, &from, &meminfo); 846 847 if (tags->hdr.tag == ATAG_CORE) { 848 if (meminfo.nr_banks != 0) 849 squash_mem_tags(tags); | 805 /* 806 * If we have the old style parameters, convert them to 807 * a tag list. 808 */ 809 if (tags->hdr.tag != ATAG_CORE) 810 convert_to_tag_list(tags); 811 if (tags->hdr.tag != ATAG_CORE) 812 tags = (struct tag *)&init_tags; 813 814 if (mdesc->fixup) 815 mdesc->fixup(mdesc, tags, &from, &meminfo); 816 817 if (tags->hdr.tag == ATAG_CORE) { 818 if (meminfo.nr_banks != 0) 819 squash_mem_tags(tags); |
820 save_atags(tags); |
|
850 parse_tags(tags); 851 } 852 853 init_mm.start_code = (unsigned long) &_text; 854 init_mm.end_code = (unsigned long) &_etext; 855 init_mm.end_data = (unsigned long) &_edata; 856 init_mm.brk = (unsigned long) &_end; 857 --- 180 unchanged lines hidden --- | 821 parse_tags(tags); 822 } 823 824 init_mm.start_code = (unsigned long) &_text; 825 init_mm.end_code = (unsigned long) &_etext; 826 init_mm.end_data = (unsigned long) &_edata; 827 init_mm.brk = (unsigned long) &_end; 828 --- 180 unchanged lines hidden --- |