*/ 
*/ 
void __init setup_arch(char **cmdline_p){	unsigned long bootmap_size;	unsigned long start_pfn, max_pfn, max_low_pfn;#ifdef CONFIG_EARLY_PRINTK	extern void enable_early_printk(void);	enable_early_printk();#endif#ifdef CONFIG_CMDLINE_BOOL        strcpy(COMMAND_LINE, CONFIG_CMDLINE);#endif	ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);#ifdef CONFIG_BLK_DEV_RAM	rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK;	rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0);	rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0);#endif	if (!MOUNT_ROOT_RDONLY)		root_mountflags &= ~MS_RDONLY;	init_mm.start_code = (unsigned long) _text;	init_mm.end_code = (unsigned long) _etext;	init_mm.end_data = (unsigned long) _edata;	init_mm.brk = (unsigned long) _end;	code_resource.start = virt_to_bus(_text);	code_resource.end = virt_to_bus(_etext)-1;	data_resource.start = virt_to_bus(_etext);	data_resource.end = virt_to_bus(_edata)-1;	sh_mv_setup(cmdline_p);#define PFN_UP(x)	(((x) + PAGE_SIZE-1) >> PAGE_SHIFT)#define PFN_DOWN(x)	((x) >> PAGE_SHIFT)#define PFN_PHYS(x)	((x) << PAGE_SHIFT)#ifdef CONFIG_DISCONTIGMEM	NODE_DATA(0)->bdata = &discontig_node_bdata[0];	NODE_DATA(1)->bdata = &discontig_node_bdata[1];	bootmap_size = init_bootmem_node(NODE_DATA(1), 					 PFN_UP(__MEMORY_START_2ND),					 PFN_UP(__MEMORY_START_2ND),					 PFN_DOWN(__MEMORY_START_2ND+__MEMORY_SIZE_2ND));	free_bootmem_node(NODE_DATA(1), __MEMORY_START_2ND, __MEMORY_SIZE_2ND);	reserve_bootmem_node(NODE_DATA(1), __MEMORY_START_2ND, bootmap_size);#endif	/*	 * Find the highest page frame number we have available	 */	max_pfn = PFN_DOWN(__pa(memory_end));	/*	 * Determine low and high memory ranges:	 */	max_low_pfn = max_pfn; 	/*	 * Partially used pages are not usable - thus	 * we are rounding upwards: 	 */	start_pfn = PFN_UP(__pa(_end));	/*	 * Find a proper area for the bootmem bitmap. After this	 * bootstrap step all allocations (until the page allocator	 * is intact) must be done via bootmem_alloc().	 */	bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn,					 __MEMORY_START>>PAGE_SHIFT,					 max_low_pfn);	/*	 * Register fully available low RAM pages with the bootmem allocator.	 */	{		unsigned long curr_pfn, last_pfn, pages;		/*		 * We are rounding up the start address of usable memory:		 */		curr_pfn = PFN_UP(__MEMORY_START);		/*		 * ... and at the end of the usable range downwards:		 */		last_pfn = PFN_DOWN(__pa(memory_end));		if (last_pfn > max_low_pfn)			last_pfn = max_low_pfn;		pages = last_pfn - curr_pfn;		free_bootmem_node(NODE_DATA(0), PFN_PHYS(curr_pfn),				  PFN_PHYS(pages));	}	/*	 * Reserve the kernel text and	 * Reserve the bootmem bitmap. We do this in two steps (first step	 * was init_bootmem()), because this catches the (definitely buggy)	 * case of us accidentally initializing the bootmem allocator with	 * an invalid RAM area.	 */	reserve_bootmem_node(NODE_DATA(0), __MEMORY_START+PAGE_SIZE,		(PFN_PHYS(start_pfn)+bootmap_size+PAGE_SIZE-1)-__MEMORY_START);	/*	 * reserve physical page 0 - it's a special BIOS page on many boxes,	 * enabling clean reboots, SMP operation, laptop functions.	 */	reserve_bootmem_node(NODE_DATA(0), __MEMORY_START, PAGE_SIZE);#ifdef CONFIG_BLK_DEV_INITRD 	ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0); 	if (&__rd_start != &__rd_end) {		LOADER_TYPE = 1;		INITRD_START = PHYSADDR((unsigned long)&__rd_start) - __MEMORY_START;		INITRD_SIZE = (unsigned long)&__rd_end - (unsigned long)&__rd_start; 	}	if (LOADER_TYPE && INITRD_START) {		if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {			reserve_bootmem_node(NODE_DATA(0), INITRD_START+__MEMORY_START, INITRD_SIZE);			initrd_start =				INITRD_START ? INITRD_START + PAGE_OFFSET + __MEMORY_START : 0;			initrd_end = initrd_start + INITRD_SIZE;		} else {			printk("initrd extends beyond end of memory "			    "(0x%08lx > 0x%08lx)\ndisabling initrd\n",				    INITRD_START + INITRD_SIZE,				    max_low_pfn << PAGE_SHIFT);			initrd_start = 0;		}	}#endif#ifdef CONFIG_DUMMY_CONSOLE	conswitchp = &dummy_con;#endif	/* Perform the machine specific initialisation */	platform_setup();	paging_init();}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/65463b73b14ed43368dc5961a6c3dcb0d98cfe1f/setup.c/buggy/arch/sh/kernel/setup.c